diff --git a/FEATURE_COMPATIBILITY_MATRIX.md b/FEATURE_COMPATIBILITY_MATRIX.md index 7a353c6..9f076c4 100644 --- a/FEATURE_COMPATIBILITY_MATRIX.md +++ b/FEATURE_COMPATIBILITY_MATRIX.md @@ -87,6 +87,11 @@ DevBuddy is a multi-platform ticket management extension for VS Code. This matri | **AI Model Selection** | ✅ | ✅ | ⏳ | ⏳ | ⏳ | | **Privacy Mode (No AI)** | ✅ | ✅ | ⏳ | ⏳ | ⏳ | | **Fallback Summarizer** | ✅ | ✅ | ⏳ | ⏳ | ⏳ | +| **BYOT: OpenAI** | 🧪 Beta | 🧪 Beta | 🧪 Beta | 🧪 Beta | 🧪 Beta | +| **BYOT: Anthropic** | 🧪 Beta | 🧪 Beta | 🧪 Beta | 🧪 Beta | 🧪 Beta | +| **BYOT: Google AI** | 🧪 Beta | 🧪 Beta | 🧪 Beta | 🧪 Beta | 🧪 Beta | + +> **🧪 BYOT (Bring Your Own Token) - Beta:** Use your own API keys for OpenAI, Anthropic, or Google AI instead of GitHub Copilot. This feature is in beta. See [BYOT AI Providers](docs/features/ai/BYOT_AI_PROVIDERS.md) for setup instructions. ### 5. Chat Participant diff --git a/README.md b/README.md index 29998cc..56122fc 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,12 @@ DevBuddy brings your tickets into a single sidebar so you can browse, create, up | Feature | Description | Platforms | |---------|-------------|-----------| | **Unified Issue Explorer** | View and manage all tickets from VS Code | Linear, Jira Cloud, Jira Server (beta) | -| **AI Agents Know Your Tickets** | Let `@workspace` and Copilot help you with your work | Linear, Jira Cloud | +| **Rich Text Editor** | WYSIWYG Markdown editor for tickets & comments with toolbar, shortcuts, and live preview | Linear, Jira Cloud | +| **AI Tool Integration** | AI agents like `@workspace` and Copilot automatically access your tickets | Linear, Jira Cloud | | **TODO Converter** | Convert TODOs to tickets with automatic code permalinks | Linear, Jira Cloud | | **AI Workflows** | Generate PR summaries and standups automatically | Linear, Jira Cloud | | **Branch Integration** | Create and manage branches directly from tickets | Linear, Jira Cloud | +| **Multi-Repo Support** | Track branch associations across multiple repositories | All platforms | | **Chat Participant** | Ask `@devbuddy` questions in natural language | Linear, Jira Cloud | | **Monorepo Support** | Intelligent package detection and validation | All platforms | @@ -44,11 +46,15 @@ Write a TODO comment, right-click → "Convert TODO to Ticket". DevBuddy automat Right-click any ticket → "Start Branch for Ticket". DevBuddy creates a branch with smart naming (conventional, simple, or custom) and automatically associates it with the ticket. -### Edit Tickets Directly in VS Code +### Edit Tickets with Rich Text Editor ![Edit Ticket Demo](https://raw.githubusercontent.com/angelo-hub/devbuddy/main/media/walkthrough/videos/edit_ticket.gif) -Click any ticket to view full details, update status, add comments, and manage all ticket properties without leaving your editor. +Click any ticket to view full details. Edit descriptions and comments with our WYSIWYG Markdown editor featuring: +- **Formatting toolbar** for quick text styling +- **Keyboard shortcuts** (Cmd+B, Cmd+I, Cmd+K for links) +- **Code blocks** with syntax highlighting +- **Tables, lists, and headings** ### AI-Powered Standup Generator @@ -97,12 +103,24 @@ Connect GitHub Copilot or another LLM provider to unlock: - ✅ Only Jira/Linear APIs you configure are contacted - ✅ Privacy-first: AI is completely optional -## What's New in v0.8.0 🎉 +## What's New in v1.0.0 🎉 -### 🤖 AI Agents Now Understand Your Tickets -**Teach VS Code's AI assistants about your work—automatically.** +### ✏️ Rich Text WYSIWYG Editor +**Professional-grade editing for tickets and comments.** -DevBuddy extends `@workspace`, GitHub Copilot, and other AI agents with real-time access to your Linear and Jira tickets. No more hallucinations, no more guessing—your AI assistants finally know what you're working on. +DevBuddy now includes a beautiful Markdown editor with: +- **Formatting toolbar** - Bold, italic, code, links, lists, headings +- **Keyboard shortcuts** - Cmd/Ctrl+B for bold, Cmd/Ctrl+I for italic, and more +- **Live preview** - See your formatted text as you type +- **Code blocks** - Syntax highlighting for 50+ languages +- **Tables support** - Create and edit tables visually + +Works in ticket descriptions, comments, and ticket creation forms. + +### 🤖 AI Tool Integration (Language Model Tools) +**Your AI assistants now understand your tickets—automatically.** + +DevBuddy extends `@workspace`, GitHub Copilot, and other AI agents with real-time access to your Linear and Jira tickets. No more hallucinations, no more guessing. **Just ask naturally:** ``` @@ -116,30 +134,35 @@ DevBuddy extends `@workspace`, GitHub Copilot, and other AI agents with real-tim → [AI generates implementation plan with full ticket context] ``` -**How it works:** -- DevBuddy provides **3 powerful tools** that AI agents automatically discover -- 🎫 **Get Ticket Details** - Fetch any ticket by ID -- 📋 **List My Tickets** - See all your active work -- 🌿 **Get Current Ticket** - Detect ticket from your branch name +**Available Tools:** +| Tool | Description | +|------|-------------| +| `#getTicket` | Fetch any ticket by ID (e.g., `#getTicket ENG-125`) | +| `#listMyTickets` | List all your active tickets | +| `#getCurrentTicket` | Detect ticket from your current branch | +| `#createTicket` | Create tickets with AI assistance (Pro) | + +**Configure:** Settings → Search "language model tools" to enable/disable individual tools. -**The magic:** When you ask `@workspace` or Copilot questions about your tickets, they automatically invoke DevBuddy's tools to provide accurate, real-time information—no hallucinations, just facts from your Linear or Jira workspace. +[Learn more about AI tool integration →](https://github.com/angelo-hub/devbuddy/blob/main/docs/features/ai/LANGUAGE_MODEL_TOOLS.md) -**You can also reference tools directly:** -``` -@workspace #getCurrentTicket -@workspace #listMyTickets -@workspace #getTicket ENG-125 -``` +### 🔀 Multi-Repository Support +**Track branches across all your repositories.** -**Configure:** Settings → Search "language model tools" to enable/disable individual tools. +For teams working with microservices or multiple repos: +- **Global branch associations** - Track which ticket belongs to which repo +- **Auto-discovery** - Scans parent directory for related repositories +- **Cross-workspace navigation** - Click to open ticket in correct repo +- **Repository indicators** - See which repo a branch lives in -[Learn more about AI agent integration →](https://github.com/angelo-hub/devbuddy/blob/main/docs/features/ai/LANGUAGE_MODEL_TOOLS.md) +Enable in settings: `devBuddy.multiRepo.enabled` -### 🎯 Also in v0.8.0 +### 🎯 Also in v1.0.0 +- **Jira Sidebar Parity** - Recently completed, current sprint, project unassigned sections +- **Jira Branch Manager** - Full branch association support in Jira ticket panels +- **Lucide React Icons** - Modern, consistent iconography throughout - **Enhanced Chat Participant** - Natural language ticket planning with `@devbuddy` - **Smart Work Suggestions** - AI-powered recommendations on what to work on next -- **Debug Logging** - Comprehensive diagnostics for troubleshooting -- **Version Banner** - See your DevBuddy version and build type on startup ## Commands Overview @@ -157,12 +180,15 @@ DevBuddy extends `@workspace`, GitHub Copilot, and other AI agents with real-tim ## Roadmap - ✅ Linear - Full support -- ✅ Jira Cloud - Full support +- ✅ Jira Cloud - Full support +- ✅ Multi-repository branch tracking +- ✅ AI Tool Integration (LM Tools) +- ✅ WYSIWYG Markdown Editor - 🚧 Jira Server/Data Center - Beta (editing coming soon) - ⏳ GitHub Issues integration - ⏳ YouTrack support - ⏳ Monday.com integration -- ⏳ Enhanced multi-account workflows +- ⏳ Developer Stats Dashboard (Pro) Track updates: [GitHub Repository](https://github.com/angelo-hub/devbuddy) @@ -203,5 +229,5 @@ All current features are free to use. Future Pro features will require a subscri --- -**Version 0.8.0** | Made with ❤️ for developers who hate context switching +**Version 1.0.0** | Made with ❤️ for developers who hate context switching diff --git a/docs/features/ai/BYOT_AI_PROVIDERS.md b/docs/features/ai/BYOT_AI_PROVIDERS.md new file mode 100644 index 0000000..ea0dcdf --- /dev/null +++ b/docs/features/ai/BYOT_AI_PROVIDERS.md @@ -0,0 +1,205 @@ +# BYOT (Bring Your Own Token) AI Providers 🧪 Beta + +> **Beta Feature:** BYOT providers are in beta. While functional, you may encounter occasional issues. Please report bugs via GitHub Issues. + +DevBuddy supports multiple AI providers for features like Standup Builder and PR Summary generation. You can use the default GitHub Copilot integration or bring your own API keys for direct access to OpenAI, Anthropic, or Google AI. + +## Why BYOT? + +- **Cost Control**: Pay only for what you use with your own API keys +- **Model Selection**: Choose the exact model that fits your needs +- **No Copilot Required**: Use AI features without a GitHub Copilot subscription +- **Privacy Options**: Some organizations prefer direct API access + +## Supported Providers + +### 🔷 GitHub Copilot (Default) + +Uses VS Code's Language Model API through your GitHub Copilot subscription. + +**Pros:** +- No additional setup if you have Copilot +- Automatic model selection +- Native VS Code integration + +**Models:** GPT-4o, GPT-4.1, GPT-4-Turbo, GPT-4, GPT-4o-mini, GPT-3.5-Turbo, Gemini 2.0 Flash + +### 🟢 OpenAI + +Direct access to OpenAI's API with your own API key. + +**Setup:** +1. Get an API key from [OpenAI Platform](https://platform.openai.com/api-keys) +2. Run command: `DevBuddy: Set OpenAI API Key` +3. Set provider in settings: `"devBuddy.ai.provider": "openai"` + +**Models:** +| Model | Description | Best For | +|-------|-------------|----------| +| `gpt-4o` | Latest flagship | Highest quality | +| `gpt-4o-mini` | Fast & affordable | **Recommended** | +| `gpt-4-turbo` | Fast & powerful | Complex tasks | +| `gpt-4` | Classic GPT-4 | Reliability | +| `gpt-3.5-turbo` | Fastest | Quick tasks | +| `o1-preview` | Reasoning model | Complex analysis | +| `o1-mini` | Fast reasoning | Quick reasoning | + +### 🟣 Anthropic (Claude) + +Direct access to Anthropic's Claude models. + +**Setup:** +1. Get an API key from [Anthropic Console](https://console.anthropic.com/) +2. Run command: `DevBuddy: Set Anthropic API Key` +3. Set provider in settings: `"devBuddy.ai.provider": "anthropic"` + +**Models:** +| Model | Description | Best For | +|-------|-------------|----------| +| `claude-sonnet-4-20250514` | Latest Sonnet | Highest quality | +| `claude-3-5-sonnet-20241022` | Claude 3.5 Sonnet | Excellent quality | +| `claude-3-5-haiku-20241022` | Claude 3.5 Haiku | **Recommended** | +| `claude-3-opus-20240229` | Most capable | Complex tasks | +| `claude-3-haiku-20240307` | Fastest | Quick tasks | + +### 🔵 Google AI (Gemini) + +Direct access to Google's Gemini models. + +**Setup:** +1. Get an API key from [Google AI Studio](https://makersuite.google.com/app/apikey) +2. Run command: `DevBuddy: Set Google AI API Key` +3. Set provider in settings: `"devBuddy.ai.provider": "google"` + +**Models:** +| Model | Description | Best For | +|-------|-------------|----------| +| `gemini-2.0-flash-exp` | Latest experimental | Cutting edge | +| `gemini-1.5-pro` | Most capable | Complex tasks | +| `gemini-1.5-flash` | Fast & efficient | **Recommended** | +| `gemini-1.5-flash-8b` | Fastest | Quick tasks | + +## Configuration + +### Settings + +```json +{ + // Provider selection + "devBuddy.ai.provider": "copilot", // copilot, openai, anthropic, google + + // Copilot model (when provider = copilot) + "devBuddy.ai.model": "auto", // auto, copilot:gpt-4o, etc. + + // OpenAI model (when provider = openai) + "devBuddy.ai.openai.model": "gpt-4o-mini", + + // Anthropic model (when provider = anthropic) + "devBuddy.ai.anthropic.model": "claude-3-5-haiku-20241022", + + // Google model (when provider = google) + "devBuddy.ai.google.model": "gemini-1.5-flash", + + // Completely disable AI (use rule-based fallback) + "devBuddy.ai.disabled": false, + + // Writing tone for summaries + "devBuddy.writingTone": "professional" // casual, professional, technical, concise +} +``` + +### Commands + +| Command | Description | +|---------|-------------| +| `DevBuddy: Set OpenAI API Key` | Securely store your OpenAI API key | +| `DevBuddy: Set Anthropic API Key` | Securely store your Anthropic API key | +| `DevBuddy: Set Google AI API Key` | Securely store your Google AI API key | +| `DevBuddy: Remove AI API Key` | Remove a stored API key | +| `DevBuddy: Show AI Provider Status` | View status of all AI providers | + +## Features Using AI + +These features benefit from AI providers: + +1. **Standup Builder** (`DevBuddy: Open Standup Builder`) + - Summarizes git commits into standup updates + - Suggests next steps based on work done + - Detects potential blockers + +2. **PR Summary** (`DevBuddy: Generate PR Summary`) + - Analyzes code changes and commits + - Generates clear, structured PR descriptions + - Categorizes changes by type + +3. **Next Steps Suggestions** + - Analyzes recent work + - Suggests what to work on next + +4. **Blocker Detection** + - Scans commit messages for warning signs + - Identifies potential issues + +## Fallback Behavior + +If AI is unavailable (no Copilot, no API key, or disabled), DevBuddy automatically uses intelligent **rule-based summarization**: + +- Categorizes commits by conventional commit types +- Extracts package/directory information +- Generates structured summaries without AI + +This ensures you can always use features like Standup Builder, even in air-gapped environments. + +## Security + +- **API keys are stored in VS Code's Secret Storage** (OS keychain) +- Keys are never written to settings files +- Keys are never logged or transmitted except to the respective API +- Each provider has isolated storage + +## Troubleshooting + +### "No AI models available" +- **Copilot**: Ensure GitHub Copilot extension is installed and active +- **BYOT**: Check that your API key is configured + +### "API key not configured" +Run the appropriate "Set API Key" command for your provider. + +### "API error" +- Verify your API key is valid +- Check your API quota/credits +- Ensure network connectivity to the API endpoint + +### Checking Provider Status +Run `DevBuddy: Show AI Provider Status` to see: +- Which providers are configured +- Which provider is currently active +- Any error messages + +## Cost Estimates + +Rough estimates for typical DevBuddy usage (varies by model and usage): + +| Provider | Model | Est. Cost/Month | +|----------|-------|-----------------| +| OpenAI | gpt-4o-mini | $1-5 | +| OpenAI | gpt-4o | $5-20 | +| Anthropic | claude-3-5-haiku | $1-5 | +| Anthropic | claude-3-5-sonnet | $5-20 | +| Google | gemini-1.5-flash | $1-3 | + +*Estimates assume 10-20 standup/PR generations per day.* + +## Adding New Providers + +The BYOT architecture is extensible. To add a new provider: + +1. Create a new provider class extending `BaseAIProvider` +2. Implement `loadConfiguration()`, `initialize()`, `isAvailable()`, `performRequest()` +3. Add configuration options to `package.json` +4. Register in `AIProviderManager` +5. Add key management command + +See `src/shared/ai/providers/` for implementation examples. + diff --git a/docs/planning/ROADMAP_1.0.0.md b/docs/planning/ROADMAP_1.0.0.md index 6d2842f..3586748 100644 --- a/docs/planning/ROADMAP_1.0.0.md +++ b/docs/planning/ROADMAP_1.0.0.md @@ -316,6 +316,7 @@ Features from Linear/Jira web UIs that would add significant value. | **Keyboard navigation** | 🟢 P2 | 🟡 | ⬜ Not Started | | **Accessibility audit** | 🟢 P2 | 🟡 | ⬜ Not Started | | **Performance audit** (large ticket lists) | 🟢 P2 | 🟡 | ⬜ Not Started | +| **Migrate webview emojis to Lucide React icons** | 🟡 P1 | 🟢 | ✅ Done | --- @@ -330,6 +331,52 @@ These features will ship with 1.0 but remain marked as "Beta 💎": | **Advanced AI Prompts** | ⬜ Planned | Custom prompt templates | | **Standup Builder** | ✅ Done | Keep Beta label | | **PR Summary** | ✅ Done | Keep Beta label | +| **BYOT AI Providers** | 🧪 Beta | OpenAI, Anthropic, Google | + +--- + +## 8.2 BYOT (Bring Your Own Token) AI Feature 🧪 Beta + +### Overview + +BYOT allows users to use their own API keys for AI-powered features instead of relying on GitHub Copilot. This gives users full control over costs and model selection. + +### Supported Providers + +| Provider | Status | Models | +|----------|--------|--------| +| **Copilot** | ✅ Default | GPT-4o, GPT-4.1, GPT-4-Turbo, Gemini 2.0 | +| **OpenAI** | ✅ Done | GPT-4o, GPT-4o-mini, o1-preview, o1-mini | +| **Anthropic** | ✅ Done | Claude Sonnet 4, Claude 3.5 Sonnet/Haiku | +| **Google** | ✅ Done | Gemini 2.0 Flash, Gemini 1.5 Pro/Flash | + +### Configuration + +```json +{ + "devBuddy.ai.provider": "openai", // copilot, openai, anthropic, google + "devBuddy.ai.openai.model": "gpt-4o-mini", + "devBuddy.ai.anthropic.model": "claude-3-5-haiku-20241022", + "devBuddy.ai.google.model": "gemini-1.5-flash" +} +``` + +### Commands + +| Command | Description | +|---------|-------------| +| `DevBuddy: Set OpenAI API Key` | Configure OpenAI API key | +| `DevBuddy: Set Anthropic API Key` | Configure Anthropic API key | +| `DevBuddy: Set Google AI API Key` | Configure Google AI API key | +| `DevBuddy: Remove AI API Key` | Remove stored API keys | +| `DevBuddy: Show AI Provider Status` | View all provider statuses | + +### Architecture + +- API keys stored securely via VS Code Secret Storage +- Provider manager handles model selection and failover +- Automatic fallback to rule-based summarization if AI fails +- Each provider isolated in own module for easy extension --- diff --git a/package-lock.json b/package-lock.json index b640fb6..ba16adf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "hast-util-to-html": "^9.0.5", "jira2md": "^3.0.1", "lowlight": "^3.3.0", + "lucide-react": "^0.562.0", "react": "^18.2.0", "react-dom": "^18.2.0", "simple-git": "^3.30.0", @@ -58,11 +59,15 @@ }, "node_modules/@azu/format-text": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@azu/format-text/-/format-text-1.0.2.tgz", + "integrity": "sha512-Swi4N7Edy1Eqq82GxgEECXSSLyn6GOb5htRFPzBDdUkECGXtlf12ynO5oJSpWKPwCaUssOu7NfhDcCWpIC6Ywg==", "dev": true, "license": "BSD-3-Clause" }, "node_modules/@azu/style-format": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azu/style-format/-/style-format-1.0.1.tgz", + "integrity": "sha512-AHcTojlNBdD/3/KxIKlg8sxIWHfOtQszLvOpagLTO+bjC3u7SAszu1lf//u7JJC50aUSH+BVWDD/KvaA6Gfn5g==", "dev": true, "license": "WTFPL", "dependencies": { @@ -71,6 +76,8 @@ }, "node_modules/@azure/abort-controller": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", "dev": true, "license": "MIT", "dependencies": { @@ -82,6 +89,8 @@ }, "node_modules/@azure/core-auth": { "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz", + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", "dev": true, "license": "MIT", "dependencies": { @@ -95,6 +104,8 @@ }, "node_modules/@azure/core-client": { "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.1.tgz", + "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", "dev": true, "license": "MIT", "dependencies": { @@ -112,6 +123,8 @@ }, "node_modules/@azure/core-rest-pipeline": { "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.2.tgz", + "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", "dev": true, "license": "MIT", "dependencies": { @@ -129,6 +142,8 @@ }, "node_modules/@azure/core-tracing": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz", + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -140,6 +155,8 @@ }, "node_modules/@azure/core-util": { "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz", + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", "dev": true, "license": "MIT", "dependencies": { @@ -153,6 +170,8 @@ }, "node_modules/@azure/identity": { "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.13.0.tgz", + "integrity": "sha512-uWC0fssc+hs1TGGVkkghiaFkkS7NkTxfnCH+Hdg+yTehTpMcehpok4PgUKKdyCH+9ldu6FhiHRv84Ntqj1vVcw==", "dev": true, "license": "MIT", "dependencies": { @@ -174,6 +193,8 @@ }, "node_modules/@azure/logger": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz", + "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", "dev": true, "license": "MIT", "dependencies": { @@ -185,18 +206,22 @@ } }, "node_modules/@azure/msal-browser": { - "version": "4.26.1", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.27.0.tgz", + "integrity": "sha512-bZ8Pta6YAbdd0o0PEaL1/geBsPrLEnyY/RDWqvF1PP9RUH8EMLvUMGoZFYS6jSlUan6KZ9IMTLCnwpWWpQRK/w==", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.13.1" + "@azure/msal-common": "15.13.3" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "15.13.1", + "version": "15.13.3", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.13.3.tgz", + "integrity": "sha512-shSDU7Ioecya+Aob5xliW9IGq1Ui8y4EVSdWGyI1Gbm4Vg61WpP95LuzcY214/wEjSn6w4PZYD4/iVldErHayQ==", "dev": true, "license": "MIT", "engines": { @@ -204,11 +229,13 @@ } }, "node_modules/@azure/msal-node": { - "version": "3.8.1", + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.8.4.tgz", + "integrity": "sha512-lvuAwsDpPDE/jSuVQOBMpLbXuVuLsPNRwWCyK3/6bPlBk0fGWegqoZ0qjZclMWyQ2JNvIY3vHY7hoFmFmFQcOw==", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.13.1", + "@azure/msal-common": "15.13.3", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -218,6 +245,8 @@ }, "node_modules/@babel/code-frame": { "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { @@ -314,16 +343,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -334,13 +353,6 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, "node_modules/@babel/helper-globals": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", @@ -395,6 +407,8 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -489,282 +503,1171 @@ "node": ">=6.9.0" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@emnapi/runtime": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", + "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", "cpu": [ - "arm64" + "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "aix" ], "engines": { "node": ">=18" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=18" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 4" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "*" + "node": ">=18" } }, - "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=18" } }, - "node_modules/@floating-ui/core": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", - "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@floating-ui/utils": "^0.2.10" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@floating-ui/dom": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz", - "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@floating-ui/core": "^1.7.3", - "@floating-ui/utils": "^0.2.10" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@floating-ui/utils": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", - "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==", - "license": "MIT" - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.10.0" + "node": ">=18" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "*" + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", + "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz", + "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.7.3", + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", + "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==", + "license": "MIT" + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@hutson/parse-repository-url": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", + "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@img/colour": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", + "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", + "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.2.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", + "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.2.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", + "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", + "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", + "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", + "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz", + "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz", + "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", + "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", + "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", + "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", + "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", + "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", + "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz", + "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-ppc64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz", + "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", + "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", + "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.2.4" } }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", + "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12.22" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@hutson/parse-repository-url": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", - "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", + "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", + "cpu": [ + "x64" + ], "dev": true, "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.2.4" } }, - "node_modules/@img/colour": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", - "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==", + "node_modules/@img/sharp-wasm32": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", + "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", + "cpu": [ + "wasm32" + ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.7.0" + }, "engines": { - "node": ">=18" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" } }, - "node_modules/@img/sharp-darwin-arm64": { + "node_modules/@img/sharp-win32-arm64": { "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", - "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", + "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "Apache-2.0 AND LGPL-3.0-or-later", "optional": true, "os": [ - "darwin" + "win32" ], "engines": { "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", + "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.2.4" + "funding": { + "url": "https://opencollective.com/libvips" } }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", - "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", + "node_modules/@img/sharp-win32-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", + "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", "cpu": [ - "arm64" + "x64" ], "dev": true, - "license": "LGPL-3.0-or-later", + "license": "Apache-2.0 AND LGPL-3.0-or-later", "optional": true, "os": [ - "darwin" + "win32" ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, "funding": { "url": "https://opencollective.com/libvips" } }, "node_modules/@isaacs/balanced-match": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", "dev": true, "license": "MIT", "engines": { @@ -773,6 +1676,8 @@ }, "node_modules/@isaacs/brace-expansion": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", "dev": true, "license": "MIT", "dependencies": { @@ -784,6 +1689,8 @@ }, "node_modules/@isaacs/cliui": { "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "license": "ISC", "dependencies": { @@ -798,24 +1705,17 @@ "node": ">=12" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { @@ -830,20 +1730,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -896,6 +1782,8 @@ }, "node_modules/@kwsites/file-exists": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", "license": "MIT", "dependencies": { "debug": "^4.1.1" @@ -903,6 +1791,8 @@ }, "node_modules/@kwsites/promise-deferred": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", "license": "MIT" }, "node_modules/@microsoft/1ds-core-js": { @@ -1031,6 +1921,8 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { @@ -1043,6 +1935,8 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", "engines": { @@ -1051,6 +1945,8 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "dependencies": { @@ -1079,6 +1975,8 @@ }, "node_modules/@secretlint/config-creator": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/config-creator/-/config-creator-10.2.2.tgz", + "integrity": "sha512-BynOBe7Hn3LJjb3CqCHZjeNB09s/vgf0baBaHVw67w7gHF0d25c3ZsZ5+vv8TgwSchRdUCRrbbcq5i2B1fJ2QQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1088,131 +1986,20 @@ "node": ">=20.0.0" } }, - "node_modules/@secretlint/config-loader": { - "version": "10.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/profiler": "^10.2.2", - "@secretlint/resolver": "^10.2.2", - "@secretlint/types": "^10.2.2", - "ajv": "^8.17.1", - "debug": "^4.4.1", - "rc-config-loader": "^4.1.3" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/core": { - "version": "10.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/profiler": "^10.2.2", - "@secretlint/types": "^10.2.2", - "debug": "^4.4.1", - "structured-source": "^4.0.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/formatter": { - "version": "10.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/resolver": "^10.2.2", - "@secretlint/types": "^10.2.2", - "@textlint/linter-formatter": "^15.2.0", - "@textlint/module-interop": "^15.2.0", - "@textlint/types": "^15.2.0", - "chalk": "^5.4.1", - "debug": "^4.4.1", - "pluralize": "^8.0.0", - "strip-ansi": "^7.1.0", - "table": "^6.9.0", - "terminal-link": "^4.0.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/formatter/node_modules/ansi-regex": { - "version": "6.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@secretlint/formatter/node_modules/chalk": { - "version": "5.6.2", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@secretlint/formatter/node_modules/pluralize": { - "version": "8.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@secretlint/formatter/node_modules/strip-ansi": { - "version": "7.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@secretlint/node": { + "node_modules/@secretlint/config-creator/node_modules/@secretlint/types": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", + "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", "dev": true, "license": "MIT", - "dependencies": { - "@secretlint/config-loader": "^10.2.2", - "@secretlint/core": "^10.2.2", - "@secretlint/formatter": "^10.2.2", - "@secretlint/profiler": "^10.2.2", - "@secretlint/source-creator": "^10.2.2", - "@secretlint/types": "^10.2.2", - "debug": "^4.4.1", - "p-map": "^7.0.3" - }, "engines": { "node": ">=20.0.0" } }, - "node_modules/@secretlint/profiler": { - "version": "10.2.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@secretlint/resolver": { - "version": "10.2.2", - "dev": true, - "license": "MIT" - }, "node_modules/@secretlint/secretlint-formatter-sarif": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/secretlint-formatter-sarif/-/secretlint-formatter-sarif-10.2.2.tgz", + "integrity": "sha512-ojiF9TGRKJJw308DnYBucHxkpNovDNu1XvPh7IfUp0A12gzTtxuWDqdpuVezL7/IP8Ua7mp5/VkDMN9OLp1doQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1221,6 +2008,8 @@ }, "node_modules/@secretlint/secretlint-rule-no-dotenv": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-no-dotenv/-/secretlint-rule-no-dotenv-10.2.2.tgz", + "integrity": "sha512-KJRbIShA9DVc5Va3yArtJ6QDzGjg3PRa1uYp9As4RsyKtKSSZjI64jVca57FZ8gbuk4em0/0Jq+uy6485wxIdg==", "dev": true, "license": "MIT", "dependencies": { @@ -1230,28 +2019,20 @@ "node": ">=20.0.0" } }, - "node_modules/@secretlint/secretlint-rule-preset-recommend": { - "version": "10.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/source-creator": { + "node_modules/@secretlint/secretlint-rule-no-dotenv/node_modules/@secretlint/types": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", + "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", "dev": true, "license": "MIT", - "dependencies": { - "@secretlint/types": "^10.2.2", - "istextorbinary": "^9.5.0" - }, "engines": { "node": ">=20.0.0" } }, - "node_modules/@secretlint/types": { + "node_modules/@secretlint/secretlint-rule-preset-recommend": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-preset-recommend/-/secretlint-rule-preset-recommend-10.2.2.tgz", + "integrity": "sha512-K3jPqjva8bQndDKJqctnGfwuAxU2n9XNCPtbXVI5JvC7FnQiNg/yWlQPbMUlBXtBoBGFYp08A94m6fvtc9v+zA==", "dev": true, "license": "MIT", "engines": { @@ -1260,6 +2041,8 @@ }, "node_modules/@sindresorhus/merge-streams": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", "dev": true, "license": "MIT", "engines": { @@ -1270,23 +2053,27 @@ } }, "node_modules/@textlint/ast-node-types": { - "version": "15.2.3", + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-15.5.0.tgz", + "integrity": "sha512-K0LEuuTo4rza8yDrlYkRdXLao8Iz/QBMsQdIxRrOOrLYb4HAtZaypZ78c+J6rDA1UlGxadZVLmkkiv4KV5fMKQ==", "dev": true, "license": "MIT" }, "node_modules/@textlint/linter-formatter": { - "version": "15.2.3", + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@textlint/linter-formatter/-/linter-formatter-15.5.0.tgz", + "integrity": "sha512-DPTm2+VXKID41qKQWagg/4JynM6hEEpvbq0PlGsEoC4Xm7IqXIxFym3mSf5+ued0cuiIV1hR9kgXjqGdP035tw==", "dev": true, "license": "MIT", "dependencies": { "@azu/format-text": "^1.0.2", "@azu/style-format": "^1.0.1", - "@textlint/module-interop": "15.2.3", - "@textlint/resolver": "15.2.3", - "@textlint/types": "15.2.3", + "@textlint/module-interop": "15.5.0", + "@textlint/resolver": "15.5.0", + "@textlint/types": "15.5.0", "chalk": "^4.1.2", "debug": "^4.4.3", - "js-yaml": "^3.14.1", + "js-yaml": "^4.1.1", "lodash": "^4.17.21", "pluralize": "^2.0.0", "string-width": "^4.2.3", @@ -1295,87 +2082,120 @@ "text-table": "^0.2.0" } }, - "node_modules/@textlint/linter-formatter/node_modules/argparse": { - "version": "1.0.10", + "node_modules/@textlint/linter-formatter/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@textlint/linter-formatter/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "sprintf-js": "~1.0.2" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@textlint/linter-formatter/node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/@textlint/linter-formatter/node_modules/pluralize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-2.0.0.tgz", + "integrity": "sha512-TqNZzQCD4S42De9IfnnBvILN7HAW7riLqsCyp8lgjXeysyPlX5HhqKAcJHHHb9XskE4/a+7VGC9zzx8Ls0jOAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@textlint/linter-formatter/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "ansi-regex": "^5.0.1" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=8" } }, "node_modules/@textlint/module-interop": { - "version": "15.2.3", + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@textlint/module-interop/-/module-interop-15.5.0.tgz", + "integrity": "sha512-rqfouEhBEgZlR9umswWXXRBcmmSM28Trpr9b0duzgehKYVc7wSQCuQMagr6YBJa2NRMfRNinupusbJXMg0ij2A==", "dev": true, "license": "MIT" }, "node_modules/@textlint/resolver": { - "version": "15.2.3", + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@textlint/resolver/-/resolver-15.5.0.tgz", + "integrity": "sha512-kK5nFbg5N3kVoZExQI/dnYjCInmTltvXDnuCRrBxHI01i6kO/o8R7Lc2aFkAZ6/NUZuRPalkyDdwZJke4/R2wg==", "dev": true, "license": "MIT" }, "node_modules/@textlint/types": { - "version": "15.2.3", + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@textlint/types/-/types-15.5.0.tgz", + "integrity": "sha512-EjAPbuA+3NyQ9WyFP7iUlddi35F3mGrf4tb4cZM0nWywbtEJ3+XAYqL+5RsF0qFeSguxGir09NdZOWrG9wVOUQ==", "dev": true, "license": "MIT", "dependencies": { - "@textlint/ast-node-types": "15.2.3" + "@textlint/ast-node-types": "15.5.0" } }, "node_modules/@tiptap/core": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.13.0.tgz", - "integrity": "sha512-iUelgiTMgPVMpY5ZqASUpk8mC8HuR9FWKaDzK27w9oWip9tuB54Z8mePTxNcQaSPb6ErzEaC8x8egrRt7OsdGQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.14.0.tgz", + "integrity": "sha512-nm0VWVA1Vq/jaKY3wyRXViL/kf78yMdH7qETpv4qZXDQLU+pdWV3IGoRTQTKESc7d8L1wL/2uCeByLNUJfrSIw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/pm": "^3.13.0" + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-blockquote": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-3.13.0.tgz", - "integrity": "sha512-K1z/PAIIwEmiWbzrP//4cC7iG1TZknDlF1yb42G7qkx2S2X4P0NiqX7sKOej3yqrPjKjGwPujLMSuDnCF87QkQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-3.14.0.tgz", + "integrity": "sha512-I7aOqcVLHBgCeRtMaMHA+ILSS8Sli46fjFq8477stOpQ79TPiBd6e4SDuFCAu58M94mVLMvlPKF2Eh5IvbIMyQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-bold": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.13.0.tgz", - "integrity": "sha512-VYiDN9EEwR6ShaDLclG8mphkb/wlIzqfk7hxaKboq1G+NSDj8PcaSI9hldKKtTCLeaSNu6UR5nkdu/YHdzYWTw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.14.0.tgz", + "integrity": "sha512-T4ma6VLoHm9JupglidD3CfZXm89A3HMv99gLplXNizvy1mlr4R3uC3aBqKw6lAP+NoqCqbIgjwc4YYsqZClNwA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-bubble-menu": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-3.13.0.tgz", - "integrity": "sha512-qZ3j2DBsqP9DjG2UlExQ+tHMRhAnWlCKNreKddKocb/nAFrPdBCtvkqIEu+68zPlbLD4ukpoyjUklRJg+NipFg==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-3.14.0.tgz", + "integrity": "sha512-nraHy+5jumT67J7hWrCuVwVTS2vNj4FpV5kO8epVySBmgEBr/7Pyi4w7mQA1VRVOMdjeN9iypbgQ2rKhpfaoTw==", "license": "MIT", "dependencies": { "@floating-ui/dom": "^1.0.0" @@ -1385,97 +2205,97 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.13.0.tgz", - "integrity": "sha512-fFQmmEUoPzRGiQJ/KKutG35ZX21GE+1UCDo8Q6PoWH7Al9lex47nvyeU1BiDYOhcTKgIaJRtEH5lInsOsRJcSA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.14.0.tgz", + "integrity": "sha512-luqPX4u52hiOAHJ95mYsNE+x+9dZxsM461Xny9d/eTXLjAcnwS7MghjrnpljvyYsSXNiwQtxUyEr4uEZZJ5gIQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.13.0" + "@tiptap/extension-list": "^3.14.0" } }, "node_modules/@tiptap/extension-code": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-3.13.0.tgz", - "integrity": "sha512-sF5raBni6iSVpXWvwJCAcOXw5/kZ+djDHx1YSGWhopm4+fsj0xW7GvVO+VTwiFjZGKSw+K5NeAxzcQTJZd3Vhw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-3.14.0.tgz", + "integrity": "sha512-Sx9yLorzS+oqNmXID4jt0G5tDnsEgU0HtEXPLD3KNt/ltVxWJU0AXwCsp1/Dg0HIDL868vWpJ2jC1t/4oaf9kA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-code-block": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-3.13.0.tgz", - "integrity": "sha512-kIwfQ4iqootsWg9e74iYJK54/YMIj6ahUxEltjZRML5z/h4gTDcQt2eTpnEC8yjDjHeUVOR94zH9auCySyk9CQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-3.14.0.tgz", + "integrity": "sha512-hRSdIhhm3Q9JBMQdKaifRVFnAa4sG+M7l1QcTKR3VSYVy2/oR0U+aiOifi5OvMRBUwhaR71Ro+cMT9FH9s26Kg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-code-block-lowlight": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-3.13.0.tgz", - "integrity": "sha512-CesjEVUkDelSfRxauTkcrrVzzQAxEp5HYuGIXZtoFDmt2F2lYimlgJyvSxIbRqEw8sFQxvTEKlBg0EtF/BvCJg==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-3.14.0.tgz", + "integrity": "sha512-vkiDvPZUadrjAGNzvJYYXl5R+U1XmGALSbm+VlrGCR7iXHgYaMHdkqxHwGZMSqtsF2szPEqcAzLZShlAKl+AkA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/extension-code-block": "^3.13.0", - "@tiptap/pm": "^3.13.0", + "@tiptap/core": "^3.14.0", + "@tiptap/extension-code-block": "^3.14.0", + "@tiptap/pm": "^3.14.0", "highlight.js": "^11", "lowlight": "^2 || ^3" } }, "node_modules/@tiptap/extension-document": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.13.0.tgz", - "integrity": "sha512-RjU7hTJwjKXIdY57o/Pc+Yr8swLkrwT7PBQ/m+LCX5oO/V2wYoWCjoBYnK5KSHrWlNy/aLzC33BvLeqZZ9nzlQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.14.0.tgz", + "integrity": "sha512-O3D7/GPB3XrWGy0y/b4LMHiY0eTd+dyIbSdiFtmUnbC/E9lqQLw43GiqvD9Gm6AyKhBA+Z45dKMbaOe1c6eTwQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-dropcursor": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-3.13.0.tgz", - "integrity": "sha512-m7GPT3c/83ni+bbU8c+3dpNa8ug+aQ4phNB1Q52VQG3oTonDJnZS7WCtn3lB/Hi1LqoqMtEHwhepU2eD+JeXqQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-3.14.0.tgz", + "integrity": "sha512-IwHyiZKLjV9WSBlQFS+afMjucIML8wFAKkG8UKCu+CVOe/Qd1ImDGyv6rzPlCmefJkDHIUWS+c2STapJlUD1VQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extensions": "^3.13.0" + "@tiptap/extensions": "^3.14.0" } }, "node_modules/@tiptap/extension-floating-menu": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-3.13.0.tgz", - "integrity": "sha512-OsezV2cMofZM4c13gvgi93IEYBUzZgnu8BXTYZQiQYekz4bX4uulBmLa1KOA9EN71FzS+SoLkXHU0YzlbLjlxA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-3.14.0.tgz", + "integrity": "sha512-+ErwDF74NzX4JV0nXMSIUT9V8FDdo85r0SaBZ8lb2NLmElaA3LDklcNV7SsoKlRcwsAXtFkqQbDwXLNGQLYSPQ==", "license": "MIT", "optional": true, "funding": { @@ -1484,80 +2304,80 @@ }, "peerDependencies": { "@floating-ui/dom": "^1.0.0", - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-gapcursor": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-3.13.0.tgz", - "integrity": "sha512-KVxjQKkd964nin+1IdM2Dvej/Jy4JTMcMgq5seusUhJ9T9P8F9s2D5Iefwgkps3OCzub/aF+eAsZe+1P5KSIgA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-3.14.0.tgz", + "integrity": "sha512-hMg2U59+c9FreYtTvzxx5GWKejdZLRITMLEu4OTfrgQok6uF4qkzGEEqmYqPiHk08TBqAg18Y5bbpyqTsuit9A==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extensions": "^3.13.0" + "@tiptap/extensions": "^3.14.0" } }, "node_modules/@tiptap/extension-hard-break": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-3.13.0.tgz", - "integrity": "sha512-nH1OBaO+/pakhu+P1jF208mPgB70IKlrR/9d46RMYoYbqJTNf4KVLx5lHAOHytIhjcNg+MjyTfJWfkK+dyCCyg==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-3.14.0.tgz", + "integrity": "sha512-XKxr8usQp+kFevhDK6Ccmnq1CIkLmPClhKwbt7AClGLKLBtEVAS1qUgcmKudkw8cD8Q2/69twI37LXa23sfuLA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-heading": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.13.0.tgz", - "integrity": "sha512-8VKWX8waYPtUWN97J89em9fOtxNteh6pvUEd0htcOAtoxjt2uZjbW5N4lKyWhNKifZBrVhH2Cc2NUPuftCVgxw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.14.0.tgz", + "integrity": "sha512-4xpahSo3b1dN2nwA0XKXLQVz9nZ/vE443a/Y5QLWeXiu3v9wkcMs/5kQ5ysFeDZRBTfVUWBqhngI7zhvDUx2zQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-horizontal-rule": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-3.13.0.tgz", - "integrity": "sha512-ZUFyORtjj22ib8ykbxRhWFQOTZjNKqOsMQjaAGof30cuD2DN5J5pMz7Haj2fFRtLpugWYH+f0Mi+WumQXC3hCw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-3.14.0.tgz", + "integrity": "sha512-65O4T9vPKLUKO1fLowh5jqtfQlH5eaIL7qb/uj5sXMMg8O7TCvBIRkwNuYsFTkJmTk4vBy+fjZ0uwSY3DFkO1g==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-italic": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.13.0.tgz", - "integrity": "sha512-XbVTgmzk1kgUMTirA6AGdLTcKHUvEJoh3R4qMdPtwwygEOe7sBuvKuLtF6AwUtpnOM+Y3tfWUTNEDWv9AcEdww==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.14.0.tgz", + "integrity": "sha512-Arl5EaG4wdyipwvKjsI7Krlk3OkmqvLfF0YfGwsd5AVDxTiYuiDGgz7RF8J2kttbBeiUTqwME5xpkryQK3F+fg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-link": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-3.13.0.tgz", - "integrity": "sha512-LuFPJ5GoL12GHW4A+USsj60O90pLcwUPdvEUSWewl9USyG6gnLnY/j5ZOXPYH7LiwYW8+lhq7ABwrDF2PKyBbA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-3.14.0.tgz", + "integrity": "sha512-xaeJIktD42rJ4t9fbQpKe+yYNZ+YFIK96cp1Kdm0hZHv/8MPMNRiF85TRY+9U1aoyh5uRcspgCj7EKQb2Hs7qg==", "license": "MIT", "dependencies": { "linkifyjs": "^4.3.2" @@ -1567,225 +2387,225 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-list": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.13.0.tgz", - "integrity": "sha512-MMFH0jQ4LeCPkJJFyZ77kt6eM/vcKujvTbMzW1xSHCIEA6s4lEcx9QdZMPpfmnOvTzeoVKR4nsu2t2qT9ZXzAw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.14.0.tgz", + "integrity": "sha512-rsjFH0Vd/4UbDsjwMLay7oz72VVu1r35t8ofAzy5587jn5JAjflaZs05XbRRMD2imUTK41dyajVSh8CqSnDEJw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-list-item": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.13.0.tgz", - "integrity": "sha512-63NbcS/XeQP2jcdDEnEAE3rjJICDj8y1SN1h/MsJmSt1LusnEo8WQ2ub86QELO6XnD3M04V03cY6Knf6I5mTkw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.14.0.tgz", + "integrity": "sha512-19Dcp8HCFdhINmRy0KQLFfz9ZEuVwFWGAAjYG7BvMvkd9k4sJ5vCv5fej59G99rhsc+tCmik77w+SLksOcxwKQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.13.0" + "@tiptap/extension-list": "^3.14.0" } }, "node_modules/@tiptap/extension-list-keymap": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-keymap/-/extension-list-keymap-3.13.0.tgz", - "integrity": "sha512-P+HtIa1iwosb1feFc8B/9MN5EAwzS+/dZ0UH0CTF2E4wnp5Z9OMxKl1IYjfiCwHzZrU5Let+S/maOvJR/EmV0g==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-keymap/-/extension-list-keymap-3.14.0.tgz", + "integrity": "sha512-1oPbvNnQjeOxkHZcUbWPx/IY9o4fT3QGk/9A9cIjFrJRD2AHzbYfPDHNHINtg7Bj0jWz74cHvAHcaxP+M27jkA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.13.0" + "@tiptap/extension-list": "^3.14.0" } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.13.0.tgz", - "integrity": "sha512-QuDyLzuK/3vCvx9GeKhgvHWrGECBzmJyAx6gli2HY+Iil7XicbfltV4nvhIxgxzpx3LDHLKzJN9pBi+2MzX60g==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.14.0.tgz", + "integrity": "sha512-/fXjVL4JajkJQoc213iiput0bCXC4ztUPUpvNuI62VcgFKHcTvX4eYxED1VflotCx0OdkyY9yYD8PtvyO5lkmA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.13.0" + "@tiptap/extension-list": "^3.14.0" } }, "node_modules/@tiptap/extension-paragraph": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.13.0.tgz", - "integrity": "sha512-9csQde1i0yeZI5oQQ9e1GYNtGL2JcC2d8Fwtw9FsGC8yz2W0h+Fmk+3bc2kobbtO5LGqupSc1fKM8fAg5rSRDg==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.14.0.tgz", + "integrity": "sha512-NFxk2yNo3Cvh9g8evea+yTLNV48se7MbMcVizTnVhobqtBKv793qsb5FM5Hu30Y72FQPNfH+LRoap4XZyBPfVw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-placeholder": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-3.13.0.tgz", - "integrity": "sha512-Au4ktRBraQktX9gjSzGWyJV6kPof7+kOhzE8ej+rOMjIrHbx3DCHy1CJWftSO9BbqIyonjsFmm4nE+vjzZ3Z5Q==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-3.14.0.tgz", + "integrity": "sha512-sBiAs1gumdSZXO0ezMSmOkHnlzZNZ1fttm6GriAMIp5xfCvo/0LD6bHPXtvOAbT9ovLQX8mH5+iPZh2jKta7oQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extensions": "^3.13.0" + "@tiptap/extensions": "^3.14.0" } }, "node_modules/@tiptap/extension-strike": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-3.13.0.tgz", - "integrity": "sha512-VHhWNqTAMOfrC48m2FcPIZB0nhl6XHQviAV16SBc+EFznKNv9tQUsqQrnuQ2y6ZVfqq5UxvZ3hKF/JlN/Ff7xw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-3.14.0.tgz", + "integrity": "sha512-R8BbAhnWpisBml6okMKl98hY4tJjedTTgyTkx8tPabIJ92nS9IURKEk3foWB9uHxdTOBUqTvVT+2ScDf9r6QHg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-table": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-3.13.0.tgz", - "integrity": "sha512-LcH9KE4QBUJ6IPwt1Uo5iU7zatFjUUvXbctIu2fKQ9nqJ7nNSFxRhkNyporVFkTWYH7/rb0qMoF1VxSUGefG5w==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-3.14.0.tgz", + "integrity": "sha512-tt1OlzqlsRsTazARGpvwPJmKEu+jiMFuaueNM28V+AADtaIPyE160V6w2bkdeWQeaBWqZjOUGZaMjpsKqWXR+g==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/extension-table-cell": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-3.13.0.tgz", - "integrity": "sha512-dBOPeLe2NqymZI8reS2yZRIcgfIYHudCq4lDWZBJ5NiMvoy0b/fVe1qYSP4EcfBQMpfgAP0E05bMB3C7p1kmkw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-3.14.0.tgz", + "integrity": "sha512-g8u0RfAill2F4DevffYHHeNHAfh3E3Kx/8fhRR6EdhQh5pj+mCuuJoTWB7kJjo6NuXCX7cBRRRB5XUmYu8KuTQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-table": "^3.13.0" + "@tiptap/extension-table": "^3.14.0" } }, "node_modules/@tiptap/extension-table-header": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-3.13.0.tgz", - "integrity": "sha512-ZA5lhcek0VlKupqj3WFgE6bj5vNRmxcpDqjYc6RWaxuva4dYfEQSqdlG+3a53Sr53le0grfBpolM8zJFCVYrcw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-3.14.0.tgz", + "integrity": "sha512-dUGtXpfrXGhOvamuukcwhl2W5pEpeYlgNQIUEdR2aFmZeH86KDlHYQYCJ/hq74YLq2cPRla/WljNGut20tjWdw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-table": "^3.13.0" + "@tiptap/extension-table": "^3.14.0" } }, "node_modules/@tiptap/extension-table-row": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-3.13.0.tgz", - "integrity": "sha512-FdsMTIBNleZtWJEhXE/PBxkB8L9YJtnKs7YZNesLKqLn6/sWZl+X5e5SAAN/N3DLOEAwNCa/m0C3A1DWGNz/tw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-3.14.0.tgz", + "integrity": "sha512-NBkN2Xqc7o+T/RrthD5q+EOmvXryQrR4+whagLe4HFYHwrI/DknkxhNvkdNJLdWxZKG0YKvU2D9Cgp/StOokjg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-table": "^3.13.0" + "@tiptap/extension-table": "^3.14.0" } }, "node_modules/@tiptap/extension-task-item": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-3.13.0.tgz", - "integrity": "sha512-4+IkwoKchHQSxzEtVgpjSTJ/ey++Vf9WFiaY0o1ijmvQ7XvvXv4ZvO7uJrawShCIf0tmA56fjuMcZc5qJITQKQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-3.14.0.tgz", + "integrity": "sha512-hUUNrqqYffEJpPRRvPHidbvzAQgaHZ12c918MUqquWf/AfpmnTDYJplHpbh2gUbtg0nivNFgags7VJdnJeKlVQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.13.0" + "@tiptap/extension-list": "^3.14.0" } }, "node_modules/@tiptap/extension-task-list": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-3.13.0.tgz", - "integrity": "sha512-oqJrLR3yKlSwDDr6CCF27g2bDybFcvkTyn/HReFpteziGeQs2DWJ5sY+tSWX1eKhnTnZbEjG5G/oie/vJqIIow==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-3.14.0.tgz", + "integrity": "sha512-uFJkjxF8+yVewU/JR2PWgY2TGKqa0GntMPe/prozyIrKW6felcQ+Pypa6Mr3luk5e8C6GQB8Uh5+cVhLVTjZ/w==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.13.0" + "@tiptap/extension-list": "^3.14.0" } }, "node_modules/@tiptap/extension-text": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.13.0.tgz", - "integrity": "sha512-VcZIna93rixw7hRkHGCxDbL3kvJWi80vIT25a2pXg0WP1e7Pi3nBYvZIL4SQtkbBCji9EHrbZx3p8nNPzfazYw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.14.0.tgz", + "integrity": "sha512-XlpnD87LQ7lLcDcBenHgzxv3uivQzPdVHM16CY4lXR4aKDIp2mxjPZr4twHT+cOnRQHc8VYpRgkEo6LLX6VylA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extension-underline": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.13.0.tgz", - "integrity": "sha512-VDQi+UYw0tFnfghpthJTFmtJ3yx90kXeDwFvhmT8G+O+si5VmP05xYDBYBmYCix5jqKigJxEASiBL0gYOgMDEg==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.14.0.tgz", + "integrity": "sha512-zmnWlsi2g/tMlThHby0Je9O+v24j4d+qcXF3nuzLUUaDsGCEtOyC9RzwITft59ViK+Nc2PD2W/J14rsB0j+qoQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0" + "@tiptap/core": "^3.14.0" } }, "node_modules/@tiptap/extensions": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/extensions/-/extensions-3.13.0.tgz", - "integrity": "sha512-i7O0ptSibEtTy+2PIPsNKEvhTvMaFJg1W4Oxfnbuxvaigs7cJV9Q0lwDUcc7CPsNw2T1+44wcxg431CzTvdYoA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/extensions/-/extensions-3.14.0.tgz", + "integrity": "sha512-qQBVKqzU4ZVjRn8W0UbdfE4LaaIgcIWHOMrNnJ+PutrRzQ6ZzhmD/kRONvRWBfG9z3DU7pSKGwVYSR2hztsGuQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@tiptap/pm": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.13.0.tgz", - "integrity": "sha512-WKR4ucALq+lwx0WJZW17CspeTpXorbIOpvKv5mulZica6QxqfMhn8n1IXCkDws/mCoLRx4Drk5d377tIjFNsvQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.14.0.tgz", + "integrity": "sha512-xrZmqI5jl4yMeAsu8p8gVP9S3An5h2MBi8BQHNnZmpyzkUrlpd40vlT6u13SWIqVi5ZWhBZ6U3rL7mkVLZuRKg==", "license": "MIT", "dependencies": { "prosemirror-changeset": "^2.3.0", @@ -1813,9 +2633,9 @@ } }, "node_modules/@tiptap/react": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/react/-/react-3.13.0.tgz", - "integrity": "sha512-VqpqNZ9qtPr3pWK4NsZYxXgLSEiAnzl6oS7tEGmkkvJbcGSC+F7R13Xc9twv/zT5QCLxaHdEbmxHbuAIkrMgJQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/react/-/react-3.14.0.tgz", + "integrity": "sha512-Eo/nLyKxHvnLIF4gI2WFhGJiVrqfA6XL9kismVG9NwBNF/NblMDmZZu6Z2SH/ONJQz2Egn7UBPNp3BMq/qZDcg==", "license": "MIT", "dependencies": { "@types/use-sync-external-store": "^0.0.6", @@ -1827,12 +2647,12 @@ "url": "https://github.com/sponsors/ueberdosis" }, "optionalDependencies": { - "@tiptap/extension-bubble-menu": "^3.13.0", - "@tiptap/extension-floating-menu": "^3.13.0" + "@tiptap/extension-bubble-menu": "^3.14.0", + "@tiptap/extension-floating-menu": "^3.14.0" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0", + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "@types/react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", @@ -1840,35 +2660,35 @@ } }, "node_modules/@tiptap/starter-kit": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-3.13.0.tgz", - "integrity": "sha512-Ojn6sRub04CRuyQ+9wqN62JUOMv+rG1vXhc2s6DCBCpu28lkCMMW+vTe7kXJcEdbot82+5swPbERw9vohswFzg==", - "license": "MIT", - "dependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/extension-blockquote": "^3.13.0", - "@tiptap/extension-bold": "^3.13.0", - "@tiptap/extension-bullet-list": "^3.13.0", - "@tiptap/extension-code": "^3.13.0", - "@tiptap/extension-code-block": "^3.13.0", - "@tiptap/extension-document": "^3.13.0", - "@tiptap/extension-dropcursor": "^3.13.0", - "@tiptap/extension-gapcursor": "^3.13.0", - "@tiptap/extension-hard-break": "^3.13.0", - "@tiptap/extension-heading": "^3.13.0", - "@tiptap/extension-horizontal-rule": "^3.13.0", - "@tiptap/extension-italic": "^3.13.0", - "@tiptap/extension-link": "^3.13.0", - "@tiptap/extension-list": "^3.13.0", - "@tiptap/extension-list-item": "^3.13.0", - "@tiptap/extension-list-keymap": "^3.13.0", - "@tiptap/extension-ordered-list": "^3.13.0", - "@tiptap/extension-paragraph": "^3.13.0", - "@tiptap/extension-strike": "^3.13.0", - "@tiptap/extension-text": "^3.13.0", - "@tiptap/extension-underline": "^3.13.0", - "@tiptap/extensions": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-3.14.0.tgz", + "integrity": "sha512-fHsC4oDVzvMU9btg+IUmu/eqPquapjJ341qaNI7cCeSCKjjE6XJEN6WcONLAVId2OZUwML0IX1Jgl+6gJxU9Jw==", + "license": "MIT", + "dependencies": { + "@tiptap/core": "^3.14.0", + "@tiptap/extension-blockquote": "^3.14.0", + "@tiptap/extension-bold": "^3.14.0", + "@tiptap/extension-bullet-list": "^3.14.0", + "@tiptap/extension-code": "^3.14.0", + "@tiptap/extension-code-block": "^3.14.0", + "@tiptap/extension-document": "^3.14.0", + "@tiptap/extension-dropcursor": "^3.14.0", + "@tiptap/extension-gapcursor": "^3.14.0", + "@tiptap/extension-hard-break": "^3.14.0", + "@tiptap/extension-heading": "^3.14.0", + "@tiptap/extension-horizontal-rule": "^3.14.0", + "@tiptap/extension-italic": "^3.14.0", + "@tiptap/extension-link": "^3.14.0", + "@tiptap/extension-list": "^3.14.0", + "@tiptap/extension-list-item": "^3.14.0", + "@tiptap/extension-list-keymap": "^3.14.0", + "@tiptap/extension-ordered-list": "^3.14.0", + "@tiptap/extension-paragraph": "^3.14.0", + "@tiptap/extension-strike": "^3.14.0", + "@tiptap/extension-text": "^3.14.0", + "@tiptap/extension-underline": "^3.14.0", + "@tiptap/extensions": "^3.14.0", + "@tiptap/pm": "^3.14.0" }, "funding": { "type": "github", @@ -1876,17 +2696,17 @@ } }, "node_modules/@tiptap/suggestion": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@tiptap/suggestion/-/suggestion-3.13.0.tgz", - "integrity": "sha512-IXNvyLITpPiuXHn/q1ntztPYJZMFjPAokKj+OQz3MFNYlzAX3I409KD/EwwCubisRIAFiNX0ZjIIXxxZ3AhFTw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@tiptap/suggestion/-/suggestion-3.14.0.tgz", + "integrity": "sha512-B9BQ9Tck8HsISDc6jZmtaSpl8KK69JbKHfU0ntILxgj8aBASElewO+W8WE49JSTxuyJGRgnhGSgaGpM4LhbLAg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.13.0", - "@tiptap/pm": "^3.13.0" + "@tiptap/core": "^3.14.0", + "@tiptap/pm": "^3.14.0" } }, "node_modules/@types/hast": { @@ -1937,9 +2757,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.19.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", - "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", + "version": "20.19.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", + "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", "dev": true, "license": "MIT", "dependencies": { @@ -1948,23 +2768,31 @@ }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true, "license": "MIT" }, "node_modules/@types/prop-types": { "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.26", + "version": "18.3.27", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.27.tgz", + "integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==", "license": "MIT", "dependencies": { "@types/prop-types": "*", - "csstype": "^3.0.2" + "csstype": "^3.2.2" } }, "node_modules/@types/react-dom": { "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "license": "MIT", "peerDependencies": { "@types/react": "^18.0.0" @@ -1972,6 +2800,8 @@ }, "node_modules/@types/sarif": { "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz", + "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==", "dev": true, "license": "MIT" }, @@ -1988,23 +2818,24 @@ "license": "MIT" }, "node_modules/@types/vscode": { - "version": "1.105.0", + "version": "1.107.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.107.0.tgz", + "integrity": "sha512-XS8YE1jlyTIowP64+HoN30OlC1H9xqSlq1eoLZUgFEC8oUTO6euYZxti1xRiLSfZocs4qytTzR6xCBYtioQTCg==", "dev": true, "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz", - "integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.50.0.tgz", + "integrity": "sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/type-utils": "8.46.4", - "@typescript-eslint/utils": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", - "graphemer": "^1.4.0", + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/type-utils": "8.50.0", + "@typescript-eslint/utils": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" @@ -2017,22 +2848,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.46.4", + "@typescript-eslint/parser": "^8.50.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz", - "integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.50.0.tgz", + "integrity": "sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "debug": "^4.3.4" }, "engines": { @@ -2048,14 +2879,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", - "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.50.0.tgz", + "integrity": "sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.46.4", - "@typescript-eslint/types": "^8.46.4", + "@typescript-eslint/tsconfig-utils": "^8.50.0", + "@typescript-eslint/types": "^8.50.0", "debug": "^4.3.4" }, "engines": { @@ -2070,14 +2901,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", - "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.50.0.tgz", + "integrity": "sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4" + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2088,9 +2919,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", - "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.50.0.tgz", + "integrity": "sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w==", "dev": true, "license": "MIT", "engines": { @@ -2105,15 +2936,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz", - "integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.50.0.tgz", + "integrity": "sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4", - "@typescript-eslint/utils": "8.46.4", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0", + "@typescript-eslint/utils": "8.50.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -2130,9 +2961,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", - "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.50.0.tgz", + "integrity": "sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==", "dev": true, "license": "MIT", "engines": { @@ -2144,21 +2975,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", - "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.50.0.tgz", + "integrity": "sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.46.4", - "@typescript-eslint/tsconfig-utils": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", + "@typescript-eslint/project-service": "8.50.0", + "@typescript-eslint/tsconfig-utils": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", + "tinyglobby": "^0.2.15", "ts-api-utils": "^2.1.0" }, "engines": { @@ -2172,43 +3002,17 @@ "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", - "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.50.0.tgz", + "integrity": "sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4" + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2223,13 +3027,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", - "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.50.0.tgz", + "integrity": "sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/types": "8.50.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -2255,6 +3059,8 @@ }, "node_modules/@typespec/ts-http-runtime": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.2.tgz", + "integrity": "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg==", "dev": true, "license": "MIT", "dependencies": { @@ -2273,9 +3079,9 @@ "license": "ISC" }, "node_modules/@vscode/extension-telemetry": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-1.1.0.tgz", - "integrity": "sha512-y3cFCDell/xVn3b2/FdpJSwpspfUzBvVtjAQnD94Z38RXHCsYRZXJOJLZNuFxFgcSihjYZNnL8VPgOzWNiE9/g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-1.2.0.tgz", + "integrity": "sha512-En6dTwfy5NFzSMibvOpx/lKq2jtgWuR4++KJbi3SpQ2iT8gm+PHo9868/scocW122KDwTxl4ruxZ7i4rHmJJnQ==", "license": "MIT", "dependencies": { "@microsoft/1ds-core-js": "^4.3.10", @@ -2287,7 +3093,9 @@ } }, "node_modules/@vscode/vsce": { - "version": "3.6.2", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-3.7.1.tgz", + "integrity": "sha512-OTm2XdMt2YkpSn2Nx7z2EJtSuhRHsTPYsSK59hr3v8jRArK+2UEoju4Jumn1CmpgoBLGI6ReHLJ/czYltNUW3g==", "dev": true, "license": "MIT", "dependencies": { @@ -2332,15 +3140,17 @@ } }, "node_modules/@vscode/vsce-sign": { - "version": "2.0.8", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign/-/vsce-sign-2.0.9.tgz", + "integrity": "sha512-8IvaRvtFyzUnGGl3f5+1Cnor3LqaUWvhaUjAYO8Y39OUYlOf3cRd+dowuQYLpZcP3uwSG+mURwjEBOSq4SOJ0g==", "dev": true, "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE.txt", "optionalDependencies": { "@vscode/vsce-sign-alpine-arm64": "2.0.6", "@vscode/vsce-sign-alpine-x64": "2.0.6", - "@vscode/vsce-sign-darwin-arm64": "2.0.2", - "@vscode/vsce-sign-darwin-x64": "2.0.2", + "@vscode/vsce-sign-darwin-arm64": "2.0.6", + "@vscode/vsce-sign-darwin-x64": "2.0.6", "@vscode/vsce-sign-linux-arm": "2.0.6", "@vscode/vsce-sign-linux-arm64": "2.0.6", "@vscode/vsce-sign-linux-x64": "2.0.6", @@ -2348,8 +3158,38 @@ "@vscode/vsce-sign-win32-x64": "2.0.6" } }, + "node_modules/@vscode/vsce-sign-alpine-arm64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.6.tgz", + "integrity": "sha512-wKkJBsvKF+f0GfsUuGT0tSW0kZL87QggEiqNqK6/8hvqsXvpx8OsTEc3mnE1kejkh5r+qUyQ7PtF8jZYN0mo8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "alpine" + ] + }, + "node_modules/@vscode/vsce-sign-alpine-x64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.6.tgz", + "integrity": "sha512-YoAGlmdK39vKi9jA18i4ufBbd95OqGJxRvF3n6ZbCyziwy3O+JgOpIUPxv5tjeO6gQfx29qBivQ8ZZTUF2Ba0w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "alpine" + ] + }, "node_modules/@vscode/vsce-sign-darwin-arm64": { - "version": "2.0.2", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.6.tgz", + "integrity": "sha512-5HMHaJRIQuozm/XQIiJiA0W9uhdblwwl2ZNDSSAeXGO9YhB9MH5C4KIHOmvyjUnKy4UCuiP43VKpIxW1VWP4tQ==", "cpu": [ "arm64" ], @@ -2360,8 +3200,250 @@ "darwin" ] }, + "node_modules/@vscode/vsce-sign-darwin-x64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.6.tgz", + "integrity": "sha512-25GsUbTAiNfHSuRItoQafXOIpxlYj+IXb4/qarrXu7kmbH94jlm5sdWSCKrrREs8+GsXF1b+l3OB7VJy5jsykw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@vscode/vsce-sign-linux-arm": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.6.tgz", + "integrity": "sha512-UndEc2Xlq4HsuMPnwu7420uqceXjs4yb5W8E2/UkaHBB9OWCwMd3/bRe/1eLe3D8kPpxzcaeTyXiK3RdzS/1CA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@vscode/vsce-sign-linux-arm64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.6.tgz", + "integrity": "sha512-cfb1qK7lygtMa4NUl2582nP7aliLYuDEVpAbXJMkDq1qE+olIw/es+C8j1LJwvcRq1I2yWGtSn3EkDp9Dq5FdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@vscode/vsce-sign-linux-x64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.6.tgz", + "integrity": "sha512-/olerl1A4sOqdP+hjvJ1sbQjKN07Y3DVnxO4gnbn/ahtQvFrdhUi0G1VsZXDNjfqmXw57DmPi5ASnj/8PGZhAA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@vscode/vsce-sign-win32-arm64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.6.tgz", + "integrity": "sha512-ivM/MiGIY0PJNZBoGtlRBM/xDpwbdlCWomUWuLmIxbi1Cxe/1nooYrEQoaHD8ojVRgzdQEUzMsRbyF5cJJgYOg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@vscode/vsce-sign-win32-x64": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.6.tgz", + "integrity": "sha512-mgth9Kvze+u8CruYMmhHw6Zgy3GRX2S+Ed5oSokDEK5vPEwGGKnmuXua9tmFhomeAnhgJnL4DCna3TiNuGrBTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE.txt", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/config-loader": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/config-loader/-/config-loader-10.2.2.tgz", + "integrity": "sha512-ndjjQNgLg4DIcMJp4iaRD6xb9ijWQZVbd9694Ol2IszBIbGPPkwZHzJYKICbTBmh6AH/pLr0CiCaWdGJU7RbpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/profiler": "^10.2.2", + "@secretlint/resolver": "^10.2.2", + "@secretlint/types": "^10.2.2", + "ajv": "^8.17.1", + "debug": "^4.4.1", + "rc-config-loader": "^4.1.3" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/core": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/core/-/core-10.2.2.tgz", + "integrity": "sha512-6rdwBwLP9+TO3rRjMVW1tX+lQeo5gBbxl1I5F8nh8bgGtKwdlCMhMKsBWzWg1ostxx/tIG7OjZI0/BxsP8bUgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/profiler": "^10.2.2", + "@secretlint/types": "^10.2.2", + "debug": "^4.4.1", + "structured-source": "^4.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/formatter": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/formatter/-/formatter-10.2.2.tgz", + "integrity": "sha512-10f/eKV+8YdGKNQmoDUD1QnYL7TzhI2kzyx95vsJKbEa8akzLAR5ZrWIZ3LbcMmBLzxlSQMMccRmi05yDQ5YDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/resolver": "^10.2.2", + "@secretlint/types": "^10.2.2", + "@textlint/linter-formatter": "^15.2.0", + "@textlint/module-interop": "^15.2.0", + "@textlint/types": "^15.2.0", + "chalk": "^5.4.1", + "debug": "^4.4.1", + "pluralize": "^8.0.0", + "strip-ansi": "^7.1.0", + "table": "^6.9.0", + "terminal-link": "^4.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/formatter/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/node": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/node/-/node-10.2.2.tgz", + "integrity": "sha512-eZGJQgcg/3WRBwX1bRnss7RmHHK/YlP/l7zOQsrjexYt6l+JJa5YhUmHbuGXS94yW0++3YkEJp0kQGYhiw1DMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/config-loader": "^10.2.2", + "@secretlint/core": "^10.2.2", + "@secretlint/formatter": "^10.2.2", + "@secretlint/profiler": "^10.2.2", + "@secretlint/source-creator": "^10.2.2", + "@secretlint/types": "^10.2.2", + "debug": "^4.4.1", + "p-map": "^7.0.3" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/profiler": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/profiler/-/profiler-10.2.2.tgz", + "integrity": "sha512-qm9rWfkh/o8OvzMIfY8a5bCmgIniSpltbVlUVl983zDG1bUuQNd1/5lUEeWx5o/WJ99bXxS7yNI4/KIXfHexig==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/resolver": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/resolver/-/resolver-10.2.2.tgz", + "integrity": "sha512-3md0cp12e+Ae5V+crPQYGd6aaO7ahw95s28OlULGyclyyUtf861UoRGS2prnUrKh7MZb23kdDOyGCYb9br5e4w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/source-creator": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/source-creator/-/source-creator-10.2.2.tgz", + "integrity": "sha512-h6I87xJfwfUTgQ7irWq7UTdq/Bm1RuQ/fYhA3dtTIAop5BwSFmZyrchph4WcoEvbN460BWKmk4RYSvPElIIvxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/types": "^10.2.2", + "istextorbinary": "^9.5.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@vscode/vsce/node_modules/@secretlint/types": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", + "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@vscode/vsce/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@vscode/vsce/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@vscode/vsce/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { @@ -2403,6 +3485,8 @@ }, "node_modules/agent-base": { "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", "engines": { @@ -2411,6 +3495,8 @@ }, "node_modules/ajv": { "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", "dependencies": { @@ -2426,6 +3512,8 @@ }, "node_modules/ansi-escapes": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.2.0.tgz", + "integrity": "sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==", "dev": true, "license": "MIT", "dependencies": { @@ -2439,15 +3527,22 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.1", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { @@ -2476,6 +3571,8 @@ }, "node_modules/argparse": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { @@ -2645,21 +3742,19 @@ }, "node_modules/astral-regex": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" - } - }, - "node_modules/async-function": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" + "node": ">=8" } }, - "node_modules/async-generator-function": { + "node_modules/async-function": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2667,6 +3762,8 @@ }, "node_modules/asynckit": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, "node_modules/available-typed-arrays": { @@ -2698,6 +3795,8 @@ }, "node_modules/azure-devops-node-api": { "version": "12.5.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", + "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", "dev": true, "license": "MIT", "dependencies": { @@ -2707,11 +3806,15 @@ }, "node_modules/balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { @@ -2731,9 +3834,9 @@ "optional": true }, "node_modules/baseline-browser-mapping": { - "version": "2.8.28", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", - "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", + "version": "2.9.11", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz", + "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2755,6 +3858,8 @@ }, "node_modules/binaryextensions": { "version": "6.11.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-6.11.0.tgz", + "integrity": "sha512-sXnYK/Ij80TO3lcqZVV2YgfKN5QjUWIRk/XSm2J/4bd/lPko3lvk0O4ZppH6m+6hB2/GTu+ptNwVFe1xh+QLQw==", "dev": true, "license": "Artistic-2.0", "dependencies": { @@ -2769,6 +3874,8 @@ }, "node_modules/bl": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "license": "MIT", "optional": true, @@ -2780,27 +3887,32 @@ }, "node_modules/boolbase": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true, "license": "ISC" }, "node_modules/boundary": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", + "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", "dev": true, "license": "BSD-2-Clause" }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { @@ -2811,9 +3923,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", - "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", "dev": true, "funding": [ { @@ -2831,11 +3943,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.25", - "caniuse-lite": "^1.0.30001754", - "electron-to-chromium": "^1.5.249", + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", - "update-browserslist-db": "^1.1.4" + "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" @@ -2846,6 +3958,8 @@ }, "node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -2870,6 +3984,8 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, "license": "MIT", "engines": { @@ -2878,6 +3994,8 @@ }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", "dev": true, "license": "BSD-3-Clause" }, @@ -2890,6 +4008,8 @@ }, "node_modules/bundle-name": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2923,6 +4043,8 @@ }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -2934,6 +4056,8 @@ }, "node_modules/call-bound": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "dev": true, "license": "MIT", "dependencies": { @@ -2986,9 +4110,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001754", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", - "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", + "version": "1.0.30001761", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz", + "integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==", "dev": true, "funding": [ { @@ -3017,15 +4141,13 @@ } }, "node_modules/chalk": { - "version": "4.1.2", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -3053,6 +4175,8 @@ }, "node_modules/cheerio": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.1.2.tgz", + "integrity": "sha512-IkxPpb5rS/d1IiLbHMgfPuS0FgiWTtFIm/Nj+2woXDLTZ7fOT2eqzgYbdMlLweqlHbsZjxEChoVK+7iph7jyQg==", "dev": true, "license": "MIT", "dependencies": { @@ -3077,6 +4201,8 @@ }, "node_modules/cheerio-select": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -3116,6 +4242,27 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "license": "ISC", + "optional": true + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -3128,6 +4275,29 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3148,6 +4318,8 @@ }, "node_modules/cockatiel": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.2.1.tgz", + "integrity": "sha512-gfrHV6ZPkquExvMh9IOkKsBzNDk6sDuZ6DdBGUBkvFnTCqCxzpuq48RySgP0AnaqQkw2zynOFj9yly6T1Q2G5Q==", "dev": true, "license": "MIT", "engines": { @@ -3156,6 +4328,8 @@ }, "node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3167,11 +4341,15 @@ }, "node_modules/color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" @@ -3192,6 +4370,8 @@ }, "node_modules/commander": { "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "license": "MIT", "engines": { @@ -3211,6 +4391,8 @@ }, "node_modules/concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "license": "MIT" }, @@ -3425,6 +4607,27 @@ "semver": "bin/semver" } }, + "node_modules/conventional-changelog-core/node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/conventional-changelog-ember": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz", @@ -3615,6 +4818,8 @@ }, "node_modules/cross-spawn": { "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { @@ -3628,6 +4833,8 @@ }, "node_modules/css-select": { "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -3643,6 +4850,8 @@ }, "node_modules/css-what": { "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -3653,7 +4862,9 @@ } }, "node_modules/csstype": { - "version": "3.1.3", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, "node_modules/dargs": { @@ -3732,6 +4943,8 @@ }, "node_modules/debug": { "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3784,6 +4997,8 @@ }, "node_modules/decompress-response": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "license": "MIT", "optional": true, @@ -3799,6 +5014,8 @@ }, "node_modules/deep-extend": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "license": "MIT", "optional": true, @@ -3814,7 +5031,9 @@ "license": "MIT" }, "node_modules/default-browser": { - "version": "5.2.1", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.4.0.tgz", + "integrity": "sha512-XDuvSq38Hr1MdN47EDvYtx3U0MTqpCEn+F6ft8z2vYDzMrvQhVp0ui9oQdqW3MvK3vqUETglt1tVGgjLuJ5izg==", "dev": true, "license": "MIT", "dependencies": { @@ -3829,7 +5048,9 @@ } }, "node_modules/default-browser-id": { - "version": "5.0.0", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", "dev": true, "license": "MIT", "engines": { @@ -3859,6 +5080,8 @@ }, "node_modules/define-lazy-prop": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "dev": true, "license": "MIT", "engines": { @@ -3888,6 +5111,8 @@ }, "node_modules/delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "license": "MIT", "engines": { "node": ">=0.4.0" @@ -3914,6 +5139,8 @@ }, "node_modules/detect-libc": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -3981,6 +5208,8 @@ }, "node_modules/dom-serializer": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, "license": "MIT", "dependencies": { @@ -3994,6 +5223,8 @@ }, "node_modules/domelementtype": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, "funding": [ { @@ -4005,6 +5236,8 @@ }, "node_modules/domhandler": { "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4019,6 +5252,8 @@ }, "node_modules/domutils": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4057,6 +5292,17 @@ "node": ">=6" } }, + "node_modules/dotgitignore/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/dotgitignore/node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -4138,6 +5384,8 @@ }, "node_modules/dunder-proto": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -4150,11 +5398,15 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, "license": "MIT" }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4163,6 +5415,8 @@ }, "node_modules/editions": { "version": "6.22.0", + "resolved": "https://registry.npmjs.org/editions/-/editions-6.22.0.tgz", + "integrity": "sha512-UgGlf8IW75je7HZjNDpJdCv4cGJWIi6yumFdZ0R7A8/CIhQiWUjyGLCxdHpd8bmyD1gnkfUNK0oeOXqUS2cpfQ==", "dev": true, "license": "Artistic-2.0", "dependencies": { @@ -4177,19 +5431,23 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.251", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.251.tgz", - "integrity": "sha512-lmyEOp4G0XT3qrYswNB4np1kx90k6QCXpnSHYv2xEsUuEu8JCobpDVYO6vMseirQyyCC6GCIGGxd5szMBa0tRA==", + "version": "1.5.267", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz", + "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==", "dev": true, "license": "ISC" }, "node_modules/emoji-regex": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/encoding-sniffer": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", "dev": true, "license": "MIT", "dependencies": { @@ -4202,6 +5460,8 @@ }, "node_modules/end-of-stream": { "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", "dev": true, "license": "MIT", "optional": true, @@ -4211,6 +5471,8 @@ }, "node_modules/entities": { "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "license": "BSD-2-Clause", "engines": { "node": ">=0.12" @@ -4221,6 +5483,8 @@ }, "node_modules/environment": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", "dev": true, "license": "MIT", "engines": { @@ -4241,9 +5505,9 @@ } }, "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz", + "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==", "dev": true, "license": "MIT", "dependencies": { @@ -4311,6 +5575,8 @@ }, "node_modules/es-define-property": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -4318,33 +5584,35 @@ }, "node_modules/es-errors": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz", + "integrity": "sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w==", "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.8", - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", + "es-abstract": "^1.24.1", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", + "es-set-tostringtag": "^2.1.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", + "get-intrinsic": "^1.3.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", "has-proto": "^1.2.0", "has-symbols": "^1.1.0", "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", + "iterator.prototype": "^1.1.5", "safe-array-concat": "^1.1.3" }, "engines": { @@ -4353,6 +5621,8 @@ }, "node_modules/es-object-atoms": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -4363,6 +5633,8 @@ }, "node_modules/es-set-tostringtag": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -4407,6 +5679,8 @@ }, "node_modules/esbuild": { "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4456,13 +5730,15 @@ } }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "license": "MIT", "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { @@ -4575,6 +5851,17 @@ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" } }, + "node_modules/eslint-plugin-react/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint-plugin-react/node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -4601,24 +5888,6 @@ "node": "*" } }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/eslint-plugin-react/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -4676,30 +5945,42 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "is-glob": "^4.0.3" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/eslint/node_modules/ignore": { @@ -4732,6 +6013,19 @@ "node": "*" } }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4750,18 +6044,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -4810,6 +6092,8 @@ }, "node_modules/expand-template": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true, "license": "(MIT OR WTFPL)", "optional": true, @@ -4819,13 +6103,15 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true, "license": "MIT" }, "node_modules/fast-equals": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.3.3.tgz", - "integrity": "sha512-/boTcHZeIAQ2r/tL11voclBHDeP9WPxLt+tyAbVSyyXuUFyh0Tne7gJZTqGbxnvj79TjLdCXLOY7UIPhyG5MTw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.4.0.tgz", + "integrity": "sha512-jt2DW/aNFNwke7AUd+Z+e6pz39KO5rzdbbFCg2sGafS4mk13MI7Z8O5z9cADNn5lhGODIgLwug6TZO2ctf7kcw==", "license": "MIT", "engines": { "node": ">=6.0.0" @@ -4833,6 +6119,8 @@ }, "node_modules/fast-glob": { "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -4846,6 +6134,19 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -4862,6 +6163,8 @@ }, "node_modules/fast-uri": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", "dev": true, "funding": [ { @@ -4877,6 +6180,8 @@ }, "node_modules/fastq": { "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", "dependencies": { @@ -4885,6 +6190,8 @@ }, "node_modules/fd-slicer": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "license": "MIT", "dependencies": { @@ -4907,6 +6214,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4922,6 +6239,8 @@ }, "node_modules/fill-range": { "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { @@ -5008,6 +6327,8 @@ }, "node_modules/foreground-child": { "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", "dependencies": { @@ -5022,7 +6343,9 @@ } }, "node_modules/form-data": { - "version": "4.0.4", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -5037,12 +6360,16 @@ }, "node_modules/fs-constants": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true, "license": "MIT", "optional": true }, "node_modules/fs-extra": { - "version": "11.3.2", + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz", + "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==", "dev": true, "license": "MIT", "dependencies": { @@ -5078,6 +6405,8 @@ }, "node_modules/function-bind": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5116,6 +6445,9 @@ }, "node_modules/generator-function": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -5142,17 +6474,16 @@ } }, "node_modules/get-intrinsic": { - "version": "1.3.1", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { - "async-function": "^1.0.0", - "async-generator-function": "^1.0.0", "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "generator-function": "^2.0.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", @@ -5185,6 +6516,13 @@ "node": ">=6.9.0" } }, + "node_modules/get-pkg-repo/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, "node_modules/get-pkg-repo/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -5231,6 +6569,8 @@ }, "node_modules/get-proto": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -5344,18 +6684,22 @@ }, "node_modules/github-from-package": { "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", "dev": true, "license": "MIT", "optional": true }, "node_modules/glob": { - "version": "11.0.3", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { "foreground-child": "^3.3.1", "jackspeak": "^4.1.1", - "minimatch": "^10.0.3", + "minimatch": "^10.1.1", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -5371,14 +6715,32 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/globals": { @@ -5397,19 +6759,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -5429,6 +6778,8 @@ }, "node_modules/globby": { "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", "dev": true, "license": "MIT", "dependencies": { @@ -5448,6 +6799,8 @@ }, "node_modules/gopd": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -5458,6 +6811,8 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "license": "ISC" }, @@ -5515,6 +6870,8 @@ }, "node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", "engines": { @@ -5552,6 +6909,8 @@ }, "node_modules/has-symbols": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -5562,6 +6921,8 @@ }, "node_modules/has-tostringtag": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -5575,6 +6936,8 @@ }, "node_modules/hasown": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -5647,6 +7010,8 @@ }, "node_modules/hosted-git-info": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "license": "ISC", "dependencies": { @@ -5658,6 +7023,8 @@ }, "node_modules/hosted-git-info/node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "license": "ISC", "dependencies": { @@ -5667,6 +7034,13 @@ "node": ">=10" } }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/html-void-elements": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", @@ -5679,6 +7053,8 @@ }, "node_modules/htmlparser2": { "version": "10.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.0.0.tgz", + "integrity": "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -5697,6 +7073,8 @@ }, "node_modules/htmlparser2/node_modules/entities": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -5708,6 +7086,8 @@ }, "node_modules/http-proxy-agent": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "license": "MIT", "dependencies": { @@ -5720,6 +7100,8 @@ }, "node_modules/https-proxy-agent": { "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", "dependencies": { @@ -5732,6 +7114,8 @@ }, "node_modules/iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", "dependencies": { @@ -5743,6 +7127,8 @@ }, "node_modules/ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { @@ -5763,6 +7149,8 @@ }, "node_modules/ignore": { "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -5808,6 +7196,8 @@ }, "node_modules/index-to-position": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", + "integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==", "dev": true, "license": "MIT", "engines": { @@ -5831,11 +7221,15 @@ }, "node_modules/inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "license": "ISC" }, "node_modules/ini": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true, "license": "ISC" }, @@ -6011,6 +7405,8 @@ }, "node_modules/is-docker": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", "dev": true, "license": "MIT", "bin": { @@ -6025,6 +7421,8 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", "engines": { @@ -6049,6 +7447,8 @@ }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -6077,6 +7477,8 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", "dependencies": { @@ -6088,6 +7490,8 @@ }, "node_modules/is-inside-container": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", "dev": true, "license": "MIT", "dependencies": { @@ -6131,6 +7535,8 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", "engines": { @@ -6344,6 +7750,8 @@ }, "node_modules/is-wsl": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", "dev": true, "license": "MIT", "dependencies": { @@ -6357,19 +7765,23 @@ } }, "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "license": "ISC" }, "node_modules/istextorbinary": { "version": "9.5.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-9.5.0.tgz", + "integrity": "sha512-5mbUj3SiZXCuRf9fT3ibzbSSEWiy63gFfksmGfdOzujPjW3k+z8WvIBxcJHBoQNlaZaiyB25deviif2+osLmLw==", "dev": true, "license": "Artistic-2.0", "dependencies": { @@ -6404,6 +7816,8 @@ }, "node_modules/jackspeak": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -6427,10 +7841,14 @@ }, "node_modules/js-tokens": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -6476,6 +7894,8 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, "license": "MIT" }, @@ -6495,6 +7915,8 @@ }, "node_modules/json5": { "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "license": "MIT", "bin": { @@ -6506,11 +7928,15 @@ }, "node_modules/jsonc-parser": { "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", "dev": true, "license": "MIT" }, "node_modules/jsonfile": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "dev": true, "license": "MIT", "dependencies": { @@ -6548,11 +7974,13 @@ } }, "node_modules/jsonwebtoken": { - "version": "9.0.2", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", + "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", "dev": true, "license": "MIT", "dependencies": { - "jws": "^3.2.2", + "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", @@ -6585,7 +8013,9 @@ } }, "node_modules/jwa": { - "version": "1.4.2", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", "dev": true, "license": "MIT", "dependencies": { @@ -6595,16 +8025,20 @@ } }, "node_modules/jws": { - "version": "3.2.2", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", "dev": true, "license": "MIT", "dependencies": { - "jwa": "^1.4.1", + "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, "node_modules/keytar": { "version": "7.9.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", + "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -6636,6 +8070,8 @@ }, "node_modules/leven": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, "license": "MIT", "engines": { @@ -6665,6 +8101,8 @@ }, "node_modules/linkify-it": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" @@ -6734,21 +8172,29 @@ }, "node_modules/lodash": { "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true, "license": "MIT" }, "node_modules/lodash.includes": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", "dev": true, "license": "MIT" }, "node_modules/lodash.isboolean": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", "dev": true, "license": "MIT" }, "node_modules/lodash.isinteger": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", "dev": true, "license": "MIT" }, @@ -6761,16 +8207,22 @@ }, "node_modules/lodash.isnumber": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", "dev": true, "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "dev": true, "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", "dev": true, "license": "MIT" }, @@ -6783,16 +8235,22 @@ }, "node_modules/lodash.once": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true, "license": "MIT" }, "node_modules/lodash.truncate": { "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true, "license": "MIT" }, "node_modules/loose-envify": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -6817,9 +8275,23 @@ } }, "node_modules/lru-cache": { - "version": "10.4.3", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "license": "ISC" + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.562.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.562.0.tgz", + "integrity": "sha512-82hOAu7y0dbVuFfmO4bYF1XEwYk/mEbM5E+b1jgci/udUBEE/R7LF5Ip0CCEmXe8AybRM8L+04eP+LGZeDvkiw==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } }, "node_modules/map-obj": { "version": "4.3.0", @@ -6836,6 +8308,8 @@ }, "node_modules/markdown-it": { "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "license": "MIT", "dependencies": { "argparse": "^2.0.1", @@ -6869,6 +8343,8 @@ }, "node_modules/math-intrinsics": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -6897,6 +8373,8 @@ }, "node_modules/mdurl": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "license": "MIT" }, "node_modules/meow": { @@ -7100,6 +8578,27 @@ "node": ">=8" } }, + "node_modules/meow/node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/meow/node_modules/type-fest": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", @@ -7115,6 +8614,8 @@ }, "node_modules/merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", "engines": { @@ -7212,6 +8713,8 @@ }, "node_modules/micromatch": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", "dependencies": { @@ -7224,6 +8727,8 @@ }, "node_modules/mime": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, "license": "MIT", "bin": { @@ -7235,6 +8740,8 @@ }, "node_modules/mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -7242,6 +8749,8 @@ }, "node_modules/mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "license": "MIT", "dependencies": { "mime-db": "1.52.0" @@ -7252,6 +8761,8 @@ }, "node_modules/mimic-response": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, "license": "MIT", "optional": true, @@ -7273,14 +8784,16 @@ } }, "node_modules/minimatch": { - "version": "10.1.1", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "ISC", "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "20 || >=22" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -7288,6 +8801,8 @@ }, "node_modules/minimist": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "license": "MIT", "funding": { @@ -7311,6 +8826,8 @@ }, "node_modules/minipass": { "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "license": "ISC", "engines": { @@ -7319,6 +8836,8 @@ }, "node_modules/mkdirp-classic": { "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true, "license": "MIT", "optional": true @@ -7335,10 +8854,14 @@ }, "node_modules/ms": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, "node_modules/mute-stream": { "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true, "license": "ISC" }, @@ -7358,6 +8881,8 @@ }, "node_modules/napi-build-utils": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", "dev": true, "license": "MIT", "optional": true @@ -7377,7 +8902,9 @@ "license": "MIT" }, "node_modules/node-abi": { - "version": "3.80.0", + "version": "3.85.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.85.0.tgz", + "integrity": "sha512-zsFhmbkAzwhTft6nd3VxcG0cvJsT70rL+BIGHWVq5fi6MwGrHwzqKaxXE+Hl2GmnGItnDKPPkO5/LQqjVkIdFg==", "dev": true, "license": "MIT", "optional": true, @@ -7390,6 +8917,8 @@ }, "node_modules/node-addon-api": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", + "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", "dev": true, "license": "MIT", "optional": true @@ -7402,7 +8931,9 @@ "license": "MIT" }, "node_modules/node-sarif-builder": { - "version": "3.2.0", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-sarif-builder/-/node-sarif-builder-3.3.1.tgz", + "integrity": "sha512-8z5dAbhpxmk/WRQHXlv4V0h+9Y4Ugk+w08lyhV/7E/CQX9yDdBc3025/EG+RSMJU2aPFh/IQ7XDV7Ti5TLt/TA==", "dev": true, "license": "MIT", "dependencies": { @@ -7410,11 +8941,13 @@ "fs-extra": "^11.1.1" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/normalize-package-data": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -7428,6 +8961,8 @@ }, "node_modules/normalize-package-data/node_modules/hosted-git-info": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "dev": true, "license": "ISC", "dependencies": { @@ -7437,6 +8972,13 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/normalize-package-data/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -7449,6 +8991,8 @@ }, "node_modules/nth-check": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -7470,6 +9014,8 @@ }, "node_modules/object-inspect": { "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true, "license": "MIT", "engines": { @@ -7566,6 +9112,8 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "license": "ISC", "dependencies": { @@ -7574,6 +9122,8 @@ }, "node_modules/open": { "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", "dev": true, "license": "MIT", "dependencies": { @@ -7664,7 +9214,9 @@ } }, "node_modules/p-map": { - "version": "7.0.3", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz", + "integrity": "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==", "dev": true, "license": "MIT", "engines": { @@ -7686,6 +9238,8 @@ }, "node_modules/package-json-from-dist": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, @@ -7704,6 +9258,8 @@ }, "node_modules/parse-json": { "version": "8.3.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", + "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7718,8 +9274,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-json/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse-semver": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", + "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7728,6 +9299,8 @@ }, "node_modules/parse-semver/node_modules/semver": { "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "license": "ISC", "bin": { @@ -7736,6 +9309,8 @@ }, "node_modules/parse5": { "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", "dev": true, "license": "MIT", "dependencies": { @@ -7747,6 +9322,8 @@ }, "node_modules/parse5-htmlparser2-tree-adapter": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", "dev": true, "license": "MIT", "dependencies": { @@ -7759,6 +9336,8 @@ }, "node_modules/parse5-parser-stream": { "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", "dev": true, "license": "MIT", "dependencies": { @@ -7770,6 +9349,8 @@ }, "node_modules/parse5/node_modules/entities": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -7801,6 +9382,8 @@ }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", "engines": { @@ -7815,7 +9398,9 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "2.0.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -7830,15 +9415,19 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.2.2", + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", + "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": "20 || >=22" } }, "node_modules/path-type": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", "dev": true, "license": "MIT", "engines": { @@ -7850,11 +9439,15 @@ }, "node_modules/pend": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -7895,9 +9488,14 @@ } }, "node_modules/pluralize": { - "version": "2.0.0", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=4" + } }, "node_modules/possible-typed-array-names": { "version": "1.1.0", @@ -7911,6 +9509,8 @@ }, "node_modules/prebuild-install": { "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", "dev": true, "license": "MIT", "optional": true, @@ -7946,9 +9546,9 @@ } }, "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", + "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "dev": true, "license": "MIT", "bin": { @@ -8165,18 +9765,6 @@ "prosemirror-view": "^1.33.8" } }, - "node_modules/prosemirror-trailing-node/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/prosemirror-transform": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.5.tgz", @@ -8205,6 +9793,8 @@ }, "node_modules/pump": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", "dev": true, "license": "MIT", "optional": true, @@ -8225,6 +9815,8 @@ }, "node_modules/punycode.js": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "license": "MIT", "engines": { "node": ">=6" @@ -8244,6 +9836,8 @@ }, "node_modules/qs": { "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8268,6 +9862,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -8297,6 +9893,8 @@ }, "node_modules/rc": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "optional": true, @@ -8312,6 +9910,8 @@ }, "node_modules/rc-config-loader": { "version": "4.1.3", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.3.tgz", + "integrity": "sha512-kD7FqML7l800i6pS6pvLyIE2ncbk9Du8Q0gp/4hMPhJU6ZxApkoLcGD8ZeqgiAlfwZ6BlETq6qqe+12DUL207w==", "dev": true, "license": "MIT", "dependencies": { @@ -8321,8 +9921,21 @@ "require-from-string": "^2.0.2" } }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react": { "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" @@ -8333,6 +9946,8 @@ }, "node_modules/react-dom": { "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", @@ -8351,6 +9966,8 @@ }, "node_modules/read": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", "dev": true, "license": "ISC", "dependencies": { @@ -8362,6 +9979,8 @@ }, "node_modules/read-pkg": { "version": "9.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", + "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", "dev": true, "license": "MIT", "dependencies": { @@ -8523,6 +10142,27 @@ "node": ">=4" } }, + "node_modules/read-pkg-up/node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/read-pkg-up/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -8533,8 +10173,23 @@ "semver": "bin/semver" } }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/read-pkg/node_modules/unicorn-magic": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", "dev": true, "license": "MIT", "engines": { @@ -8546,6 +10201,8 @@ }, "node_modules/readable-stream": { "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "license": "MIT", "dependencies": { @@ -8640,6 +10297,8 @@ }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "license": "MIT", "engines": { @@ -8647,22 +10306,19 @@ } }, "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.16.1", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, - "engines": { - "node": ">= 0.4" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8689,6 +10345,8 @@ }, "node_modules/reusify": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -8713,6 +10371,17 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/rimraf/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -8756,6 +10425,8 @@ }, "node_modules/run-applescript": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", "dev": true, "license": "MIT", "engines": { @@ -8767,6 +10438,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -8807,15 +10480,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -8840,80 +10508,198 @@ "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", + "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/secretlint": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/secretlint/-/secretlint-10.2.2.tgz", + "integrity": "sha512-xVpkeHV/aoWe4vP4TansF622nBEImzCY73y/0042DuJ29iKIaqgoJ8fGxre3rVSHHbxar4FdJobmTnLp9AU0eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/config-creator": "^10.2.2", + "@secretlint/formatter": "^10.2.2", + "@secretlint/node": "^10.2.2", + "@secretlint/profiler": "^10.2.2", + "debug": "^4.4.1", + "globby": "^14.1.0", + "read-pkg": "^9.0.1" + }, + "bin": { + "secretlint": "bin/secretlint.js" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/secretlint/node_modules/@secretlint/config-loader": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/config-loader/-/config-loader-10.2.2.tgz", + "integrity": "sha512-ndjjQNgLg4DIcMJp4iaRD6xb9ijWQZVbd9694Ol2IszBIbGPPkwZHzJYKICbTBmh6AH/pLr0CiCaWdGJU7RbpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/profiler": "^10.2.2", + "@secretlint/resolver": "^10.2.2", + "@secretlint/types": "^10.2.2", + "ajv": "^8.17.1", + "debug": "^4.4.1", + "rc-config-loader": "^4.1.3" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/secretlint/node_modules/@secretlint/core": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/core/-/core-10.2.2.tgz", + "integrity": "sha512-6rdwBwLP9+TO3rRjMVW1tX+lQeo5gBbxl1I5F8nh8bgGtKwdlCMhMKsBWzWg1ostxx/tIG7OjZI0/BxsP8bUgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/profiler": "^10.2.2", + "@secretlint/types": "^10.2.2", + "debug": "^4.4.1", + "structured-source": "^4.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/secretlint/node_modules/@secretlint/formatter": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/formatter/-/formatter-10.2.2.tgz", + "integrity": "sha512-10f/eKV+8YdGKNQmoDUD1QnYL7TzhI2kzyx95vsJKbEa8akzLAR5ZrWIZ3LbcMmBLzxlSQMMccRmi05yDQ5YDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/resolver": "^10.2.2", + "@secretlint/types": "^10.2.2", + "@textlint/linter-formatter": "^15.2.0", + "@textlint/module-interop": "^15.2.0", + "@textlint/types": "^15.2.0", + "chalk": "^5.4.1", + "debug": "^4.4.1", + "pluralize": "^8.0.0", + "strip-ansi": "^7.1.0", + "table": "^6.9.0", + "terminal-link": "^4.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=20.0.0" } }, - "node_modules/safe-push-apply/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "node_modules/secretlint/node_modules/@secretlint/node": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/node/-/node-10.2.2.tgz", + "integrity": "sha512-eZGJQgcg/3WRBwX1bRnss7RmHHK/YlP/l7zOQsrjexYt6l+JJa5YhUmHbuGXS94yW0++3YkEJp0kQGYhiw1DMQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" + "@secretlint/config-loader": "^10.2.2", + "@secretlint/core": "^10.2.2", + "@secretlint/formatter": "^10.2.2", + "@secretlint/profiler": "^10.2.2", + "@secretlint/source-creator": "^10.2.2", + "@secretlint/types": "^10.2.2", + "debug": "^4.4.1", + "p-map": "^7.0.3" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=20.0.0" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", + "node_modules/secretlint/node_modules/@secretlint/profiler": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/profiler/-/profiler-10.2.2.tgz", + "integrity": "sha512-qm9rWfkh/o8OvzMIfY8a5bCmgIniSpltbVlUVl983zDG1bUuQNd1/5lUEeWx5o/WJ99bXxS7yNI4/KIXfHexig==", "dev": true, "license": "MIT" }, - "node_modules/sax": { - "version": "1.4.3", + "node_modules/secretlint/node_modules/@secretlint/resolver": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/resolver/-/resolver-10.2.2.tgz", + "integrity": "sha512-3md0cp12e+Ae5V+crPQYGd6aaO7ahw95s28OlULGyclyyUtf861UoRGS2prnUrKh7MZb23kdDOyGCYb9br5e4w==", "dev": true, - "license": "BlueOak-1.0.0" + "license": "MIT" }, - "node_modules/scheduler": { - "version": "0.23.2", + "node_modules/secretlint/node_modules/@secretlint/source-creator": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/source-creator/-/source-creator-10.2.2.tgz", + "integrity": "sha512-h6I87xJfwfUTgQ7irWq7UTdq/Bm1RuQ/fYhA3dtTIAop5BwSFmZyrchph4WcoEvbN460BWKmk4RYSvPElIIvxw==", + "dev": true, "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0" + "@secretlint/types": "^10.2.2", + "istextorbinary": "^9.5.0" + }, + "engines": { + "node": ">=20.0.0" } }, - "node_modules/secretlint": { + "node_modules/secretlint/node_modules/@secretlint/types": { "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", + "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", "dev": true, "license": "MIT", - "dependencies": { - "@secretlint/config-creator": "^10.2.2", - "@secretlint/formatter": "^10.2.2", - "@secretlint/node": "^10.2.2", - "@secretlint/profiler": "^10.2.2", - "debug": "^4.4.1", - "globby": "^14.1.0", - "read-pkg": "^9.0.1" - }, - "bin": { - "secretlint": "bin/secretlint.js" - }, "engines": { "node": ">=20.0.0" } }, "node_modules/semver": { "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -9019,6 +10805,8 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", "dependencies": { @@ -9030,6 +10818,8 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", "engines": { @@ -9038,6 +10828,8 @@ }, "node_modules/side-channel": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { @@ -9056,6 +10848,8 @@ }, "node_modules/side-channel-list": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "dev": true, "license": "MIT", "dependencies": { @@ -9071,6 +10865,8 @@ }, "node_modules/side-channel-map": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dev": true, "license": "MIT", "dependencies": { @@ -9088,6 +10884,8 @@ }, "node_modules/side-channel-weakmap": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "dev": true, "license": "MIT", "dependencies": { @@ -9106,6 +10904,8 @@ }, "node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", "engines": { @@ -9117,6 +10917,8 @@ }, "node_modules/simple-concat": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true, "funding": [ { @@ -9137,6 +10939,8 @@ }, "node_modules/simple-get": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", "dev": true, "funding": [ { @@ -9162,6 +10966,8 @@ }, "node_modules/simple-git": { "version": "3.30.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.30.0.tgz", + "integrity": "sha512-q6lxyDsCmEal/MEGhP1aVyQ3oxnagGlBDOVSIB4XUVLl1iZh0Pah6ebC9V4xBap/RfgP2WlI8EKs0WS0rMEJHg==", "license": "MIT", "dependencies": { "@kwsites/file-exists": "^1.1.1", @@ -9175,6 +10981,8 @@ }, "node_modules/slash": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, "license": "MIT", "engines": { @@ -9186,6 +10994,8 @@ }, "node_modules/slice-ansi": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9222,6 +11032,8 @@ }, "node_modules/spdx-correct": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -9231,11 +11043,15 @@ }, "node_modules/spdx-exceptions": { "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true, "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9245,6 +11061,8 @@ }, "node_modules/spdx-license-ids": { "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", "dev": true, "license": "CC0-1.0" }, @@ -9271,11 +11089,6 @@ "readable-stream": "^3.0.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/standard-version": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.5.0.tgz", @@ -9350,6 +11163,16 @@ "dev": true, "license": "MIT" }, + "node_modules/standard-version/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/standard-version/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -9389,6 +11212,8 @@ }, "node_modules/string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", "dependencies": { @@ -9397,6 +11222,8 @@ }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -9411,6 +11238,8 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -9422,6 +11251,52 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", @@ -9543,19 +11418,26 @@ "license": "ISC" }, "node_modules/strip-ansi": { - "version": "6.0.1", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { @@ -9565,6 +11447,16 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -9589,16 +11481,22 @@ } }, "node_modules/strip-json-comments": { - "version": "2.0.1", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", - "optional": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/structured-source": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", + "integrity": "sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -9607,6 +11505,8 @@ }, "node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", "dependencies": { @@ -9618,6 +11518,8 @@ }, "node_modules/supports-hyperlinks": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz", + "integrity": "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==", "dev": true, "license": "MIT", "dependencies": { @@ -9646,6 +11548,8 @@ }, "node_modules/table": { "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -9659,8 +11563,33 @@ "node": ">=10.0.0" } }, + "node_modules/table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tar-fs": { "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", "dev": true, "license": "MIT", "optional": true, @@ -9671,14 +11600,10 @@ "tar-stream": "^2.1.4" } }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "dev": true, - "license": "ISC", - "optional": true - }, "node_modules/tar-stream": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "license": "MIT", "optional": true, @@ -9695,6 +11620,8 @@ }, "node_modules/terminal-link": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-4.0.0.tgz", + "integrity": "sha512-lk+vH+MccxNqgVqSnkMVKx4VLJfnLjDBGzH16JVZjKE2DoxP57s6/vt6JmXV5I3jBcfGrxNrYtC+mPtU7WJztA==", "dev": true, "license": "MIT", "dependencies": { @@ -9720,11 +11647,15 @@ }, "node_modules/text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true, "license": "MIT" }, "node_modules/textextensions": { "version": "6.11.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-6.11.0.tgz", + "integrity": "sha512-tXJwSr9355kFJI3lbCkPpUH5cP8/M0GGy2xLO34aZCjMXBaK3SoPnZwr/oWmo1FdCnELcs4npdCIOFtq9W3ruQ==", "dev": true, "license": "Artistic-2.0", "dependencies": { @@ -9754,6 +11685,54 @@ "readable-stream": "3" } }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tippy.js": { "version": "6.3.7", "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz", @@ -9805,6 +11784,8 @@ }, "node_modules/tmp": { "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", "dev": true, "license": "MIT", "engines": { @@ -9813,6 +11794,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9930,10 +11913,14 @@ }, "node_modules/tslib": { "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/tunnel": { "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "dev": true, "license": "MIT", "engines": { @@ -9942,6 +11929,8 @@ }, "node_modules/tunnel-agent": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "license": "Apache-2.0", "optional": true, @@ -9966,11 +11955,13 @@ } }, "node_modules/type-fest": { - "version": "4.41.0", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=16" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10056,6 +12047,8 @@ }, "node_modules/typed-rest-client": { "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", "dev": true, "license": "MIT", "dependencies": { @@ -10073,6 +12066,8 @@ }, "node_modules/typescript": { "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10085,6 +12080,8 @@ }, "node_modules/uc.micro": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "license": "MIT" }, "node_modules/uglify-js": { @@ -10122,11 +12119,15 @@ }, "node_modules/underscore": { "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", "dev": true, "license": "MIT" }, "node_modules/undici": { "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz", + "integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==", "dev": true, "license": "MIT", "engines": { @@ -10135,11 +12136,15 @@ }, "node_modules/undici-types": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, "node_modules/unicorn-magic": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", "dev": true, "license": "MIT", "engines": { @@ -10219,6 +12224,8 @@ }, "node_modules/universalify": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "license": "MIT", "engines": { @@ -10226,9 +12233,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "dev": true, "funding": [ { @@ -10268,6 +12275,8 @@ }, "node_modules/url-join": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", "dev": true, "license": "MIT" }, @@ -10282,11 +12291,15 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true, "license": "MIT" }, "node_modules/uuid": { "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, "license": "MIT", "bin": { @@ -10295,6 +12308,8 @@ }, "node_modules/validate-npm-package-license": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -10304,6 +12319,8 @@ }, "node_modules/version-range": { "version": "4.15.0", + "resolved": "https://registry.npmjs.org/version-range/-/version-range-4.15.0.tgz", + "integrity": "sha512-Ck0EJbAGxHwprkzFO966t4/5QkRuzh+/I1RxhLgUKKwEn+Cd8NwM60mE3AqBZg5gYODoXW0EFsQvbZjRlvdqbg==", "dev": true, "license": "Artistic-2.0", "engines": { @@ -10349,6 +12366,8 @@ }, "node_modules/whatwg-encoding": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10360,6 +12379,8 @@ }, "node_modules/whatwg-mimetype": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, "license": "MIT", "engines": { @@ -10368,6 +12389,8 @@ }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", "dependencies": { @@ -10428,13 +12451,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/which-collection": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", @@ -10495,6 +12511,8 @@ }, "node_modules/wrap-ansi": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10512,6 +12530,8 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { @@ -10526,19 +12546,33 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.2.2", + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=8" } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -10550,11 +12584,15 @@ }, "node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, "node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { @@ -10569,27 +12607,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "license": "ISC" }, "node_modules/wsl-utils": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", "dev": true, "license": "MIT", "dependencies": { @@ -10604,6 +12632,8 @@ }, "node_modules/xml2js": { "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", "dev": true, "license": "MIT", "dependencies": { @@ -10616,6 +12646,8 @@ }, "node_modules/xmlbuilder": { "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true, "license": "MIT", "engines": { @@ -10643,7 +12675,9 @@ } }, "node_modules/yallist": { - "version": "4.0.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, "license": "ISC" }, @@ -10678,6 +12712,8 @@ }, "node_modules/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "license": "MIT", "dependencies": { @@ -10687,6 +12723,8 @@ }, "node_modules/yazl": { "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", "dev": true, "license": "MIT", "dependencies": { @@ -10707,9 +12745,10 @@ } }, "node_modules/zod": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", - "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.2.1.tgz", + "integrity": "sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index bf4ae13..01c1ffb 100644 --- a/package.json +++ b/package.json @@ -387,6 +387,36 @@ "title": "DevBuddy Pro: Open Advanced Analytics (Beta) 💎", "icon": "$(graph)", "category": "DevBuddy Pro" + }, + { + "command": "devBuddy.ai.setOpenAIKey", + "title": "DevBuddy: Set OpenAI API Key (Beta)", + "icon": "$(key)", + "category": "DevBuddy AI" + }, + { + "command": "devBuddy.ai.setAnthropicKey", + "title": "DevBuddy: Set Anthropic API Key (Beta)", + "icon": "$(key)", + "category": "DevBuddy AI" + }, + { + "command": "devBuddy.ai.setGoogleKey", + "title": "DevBuddy: Set Google AI API Key (Beta)", + "icon": "$(key)", + "category": "DevBuddy AI" + }, + { + "command": "devBuddy.ai.removeApiKey", + "title": "DevBuddy: Remove AI API Key (Beta)", + "icon": "$(trash)", + "category": "DevBuddy AI" + }, + { + "command": "devBuddy.ai.showProviderStatus", + "title": "DevBuddy: Show AI Provider Status (Beta)", + "icon": "$(info)", + "category": "DevBuddy AI" } ], "viewsContainers": { @@ -886,6 +916,23 @@ "default": false, "markdownDescription": "**Completely disable AI features** and use rule-based summarization instead.\n\n⚠️ **For sensitive organizations:** Enable this setting if you cannot use external AI services. The extension will use intelligent rule-based analysis instead.\n\n**When to enable:**\n- Working in a highly regulated environment\n- Security policies prohibit external AI\n- GitHub Copilot is not available" }, + "devBuddy.ai.provider": { + "type": "string", + "enum": [ + "copilot", + "openai", + "anthropic", + "google" + ], + "default": "copilot", + "enumDescriptions": [ + "GitHub Copilot (VS Code Language Model API) - Default, no additional setup", + "OpenAI API (Beta) - Bring your own API key", + "Anthropic API (Beta) - Bring your own API key", + "Google AI/Gemini (Beta) - Bring your own API key" + ], + "markdownDescription": "**AI Provider for Standup & PR Summaries**\n\n🔹 **Copilot** (Default): Uses VS Code's Language Model API. Requires GitHub Copilot subscription.\n\n🔹 **OpenAI** (Beta): Use your own OpenAI API key. Run `DevBuddy: Set OpenAI API Key` to configure.\n\n🔹 **Anthropic** (Beta): Use your own Anthropic API key. Run `DevBuddy: Set Anthropic API Key` to configure.\n\n🔹 **Google** (Beta): Use your own Google AI API key. Run `DevBuddy: Set Google AI API Key` to configure.\n\n💡 **Tip:** BYOT (Bring Your Own Token) providers give you full control over costs and model selection.\n\n⚠️ **Beta:** BYOT providers are in beta. Please report any issues." + }, "devBuddy.ai.model": { "type": "string", "enum": [ @@ -909,7 +956,66 @@ "GitHub Copilot: GPT-3.5 Turbo (Most available)", "GitHub Copilot: Gemini 2.0 Flash (Google)" ], - "description": "AI model to use for summarization. Uses VS Code's Language Model API (GitHub Copilot)." + "markdownDescription": "AI model to use when **provider is set to Copilot**.\n\n💡 Uses VS Code's Language Model API (GitHub Copilot).\n\n⚠️ This setting only applies when `devBuddy.ai.provider` is `copilot`." + }, + "devBuddy.ai.openai.model": { + "type": "string", + "enum": [ + "gpt-4o", + "gpt-4o-mini", + "gpt-4-turbo", + "gpt-4", + "gpt-3.5-turbo", + "o1-preview", + "o1-mini" + ], + "default": "gpt-4o-mini", + "enumDescriptions": [ + "GPT-4o - Best quality, higher cost", + "GPT-4o Mini - Great balance of quality and cost (recommended)", + "GPT-4 Turbo - Fast and powerful", + "GPT-4 - Classic GPT-4", + "GPT-3.5 Turbo - Fastest and cheapest", + "o1-preview - Advanced reasoning (slower)", + "o1-mini - Reasoning model, faster" + ], + "markdownDescription": "**🧪 Beta Feature**\n\nOpenAI model to use when **provider is set to OpenAI**.\n\n💡 **Recommended:** `gpt-4o-mini` for best balance of quality and cost.\n\n⚠️ Requires OpenAI API key. Run `DevBuddy: Set OpenAI API Key` to configure." + }, + "devBuddy.ai.anthropic.model": { + "type": "string", + "enum": [ + "claude-sonnet-4-20250514", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-opus-20240229", + "claude-3-haiku-20240307" + ], + "default": "claude-3-5-haiku-20241022", + "enumDescriptions": [ + "Claude Sonnet 4 - Latest, best quality", + "Claude 3.5 Sonnet - Excellent quality (recommended)", + "Claude 3.5 Haiku - Fast and efficient", + "Claude 3 Opus - Most capable, higher cost", + "Claude 3 Haiku - Fastest, lowest cost" + ], + "markdownDescription": "**🧪 Beta Feature**\n\nAnthropic model to use when **provider is set to Anthropic**.\n\n💡 **Recommended:** `claude-3-5-haiku-20241022` for fast, efficient summaries.\n\n⚠️ Requires Anthropic API key. Run `DevBuddy: Set Anthropic API Key` to configure." + }, + "devBuddy.ai.google.model": { + "type": "string", + "enum": [ + "gemini-2.0-flash-exp", + "gemini-1.5-pro", + "gemini-1.5-flash", + "gemini-1.5-flash-8b" + ], + "default": "gemini-1.5-flash", + "enumDescriptions": [ + "Gemini 2.0 Flash - Latest experimental model", + "Gemini 1.5 Pro - Most capable", + "Gemini 1.5 Flash - Fast and efficient (recommended)", + "Gemini 1.5 Flash 8B - Fastest, lowest cost" + ], + "markdownDescription": "**🧪 Beta Feature**\n\nGoogle AI model to use when **provider is set to Google**.\n\n💡 **Recommended:** `gemini-1.5-flash` for fast, efficient summaries.\n\n⚠️ Requires Google AI API key. Run `DevBuddy: Set Google AI API Key` to configure." }, "devBuddy.aiModel": { "type": "string", @@ -1182,6 +1288,7 @@ "hast-util-to-html": "^9.0.5", "jira2md": "^3.0.1", "lowlight": "^3.3.0", + "lucide-react": "^0.562.0", "react": "^18.2.0", "react-dom": "^18.2.0", "simple-git": "^3.30.0", diff --git a/src/activation/initialization.ts b/src/activation/initialization.ts index 3dd7157..d6cb0e9 100644 --- a/src/activation/initialization.ts +++ b/src/activation/initialization.ts @@ -4,6 +4,7 @@ import { BranchAssociationManager } from "@shared/git/branchAssociationManager"; import { getLogger } from "@shared/utils/logger"; import { getTelemetryManager } from "@shared/utils/telemetryManager"; import { loadDevCredentials, showDevModeWarning } from "@shared/utils/devEnvLoader"; +import { AIProviderManager } from "@shared/ai/aiProviderManager"; /** * Initialize core services and storage @@ -43,6 +44,14 @@ export async function initializeCoreServices(context: vscode.ExtensionContext): logger.error("Failed to initialize Linear secret storage", error); } + // Initialize AI Provider Manager for BYOT support + try { + AIProviderManager.initialize(context); + logger.debug("AI Provider Manager initialized"); + } catch (error) { + logger.error("Failed to initialize AI Provider Manager (non-critical)", error); + } + // Initialize Branch Association Manager const branchManager = new BranchAssociationManager(context, "both"); diff --git a/src/commands/aiKeyManagement.ts b/src/commands/aiKeyManagement.ts new file mode 100644 index 0000000..c102e15 --- /dev/null +++ b/src/commands/aiKeyManagement.ts @@ -0,0 +1,358 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { AIProviderManager } from "@shared/ai/aiProviderManager"; +import { OpenAIProvider } from "@shared/ai/providers/OpenAIProvider"; +import { AnthropicProvider } from "@shared/ai/providers/AnthropicProvider"; +import { GoogleProvider } from "@shared/ai/providers/GoogleProvider"; +import { AIProviderType } from "@shared/ai/providers/types"; + +const logger = getLogger(); + +/** + * Command: Set OpenAI API Key + */ +export async function setOpenAIKeyCommand( + context: vscode.ExtensionContext +): Promise { + const apiKey = await vscode.window.showInputBox({ + title: "Set OpenAI API Key (Beta)", + prompt: "Enter your OpenAI API key", + password: true, + placeHolder: "sk-...", + validateInput: (value) => { + if (!value || value.trim().length === 0) { + return "API key cannot be empty"; + } + if (!value.startsWith("sk-")) { + return "OpenAI API keys typically start with 'sk-'"; + } + return null; + }, + }); + + if (!apiKey) { + return; // User cancelled + } + + try { + await OpenAIProvider.setApiKey(context, apiKey.trim()); + vscode.window.showInformationMessage( + "OpenAI API key saved securely. You can now use OpenAI as your AI provider." + ); + + // Prompt to switch provider + const switchProvider = await vscode.window.showInformationMessage( + "Would you like to switch to OpenAI as your AI provider?", + "Yes", + "No" + ); + + if (switchProvider === "Yes") { + await vscode.workspace + .getConfiguration("devBuddy") + .update("ai.provider", "openai", vscode.ConfigurationTarget.Global); + AIProviderManager.getInstance().refresh(); + vscode.window.showInformationMessage( + "AI provider switched to OpenAI." + ); + } + } catch (error) { + logger.error("Failed to save OpenAI API key:", error); + vscode.window.showErrorMessage( + `Failed to save API key: ${error instanceof Error ? error.message : "Unknown error"}` + ); + } +} + +/** + * Command: Set Anthropic API Key + */ +export async function setAnthropicKeyCommand( + context: vscode.ExtensionContext +): Promise { + const apiKey = await vscode.window.showInputBox({ + title: "Set Anthropic API Key (Beta)", + prompt: "Enter your Anthropic API key", + password: true, + placeHolder: "sk-ant-...", + validateInput: (value) => { + if (!value || value.trim().length === 0) { + return "API key cannot be empty"; + } + return null; + }, + }); + + if (!apiKey) { + return; // User cancelled + } + + try { + await AnthropicProvider.setApiKey(context, apiKey.trim()); + vscode.window.showInformationMessage( + "Anthropic API key saved securely. You can now use Anthropic as your AI provider." + ); + + // Prompt to switch provider + const switchProvider = await vscode.window.showInformationMessage( + "Would you like to switch to Anthropic as your AI provider?", + "Yes", + "No" + ); + + if (switchProvider === "Yes") { + await vscode.workspace + .getConfiguration("devBuddy") + .update("ai.provider", "anthropic", vscode.ConfigurationTarget.Global); + AIProviderManager.getInstance().refresh(); + vscode.window.showInformationMessage( + "AI provider switched to Anthropic." + ); + } + } catch (error) { + logger.error("Failed to save Anthropic API key:", error); + vscode.window.showErrorMessage( + `Failed to save API key: ${error instanceof Error ? error.message : "Unknown error"}` + ); + } +} + +/** + * Command: Set Google AI API Key + */ +export async function setGoogleKeyCommand( + context: vscode.ExtensionContext +): Promise { + const apiKey = await vscode.window.showInputBox({ + title: "Set Google AI API Key (Beta)", + prompt: "Enter your Google AI (Gemini) API key", + password: true, + placeHolder: "AIza...", + validateInput: (value) => { + if (!value || value.trim().length === 0) { + return "API key cannot be empty"; + } + return null; + }, + }); + + if (!apiKey) { + return; // User cancelled + } + + try { + await GoogleProvider.setApiKey(context, apiKey.trim()); + vscode.window.showInformationMessage( + "Google AI API key saved securely. You can now use Google AI as your AI provider." + ); + + // Prompt to switch provider + const switchProvider = await vscode.window.showInformationMessage( + "Would you like to switch to Google AI as your AI provider?", + "Yes", + "No" + ); + + if (switchProvider === "Yes") { + await vscode.workspace + .getConfiguration("devBuddy") + .update("ai.provider", "google", vscode.ConfigurationTarget.Global); + AIProviderManager.getInstance().refresh(); + vscode.window.showInformationMessage( + "AI provider switched to Google AI." + ); + } + } catch (error) { + logger.error("Failed to save Google AI API key:", error); + vscode.window.showErrorMessage( + `Failed to save API key: ${error instanceof Error ? error.message : "Unknown error"}` + ); + } +} + +/** + * Command: Remove AI API Key + */ +export async function removeApiKeyCommand( + context: vscode.ExtensionContext +): Promise { + const providers: Array<{ label: string; description: string; provider: AIProviderType }> = [ + { + label: "OpenAI", + description: "Remove OpenAI API key", + provider: "openai", + }, + { + label: "Anthropic", + description: "Remove Anthropic API key", + provider: "anthropic", + }, + { + label: "Google AI", + description: "Remove Google AI API key", + provider: "google", + }, + ]; + + const selected = await vscode.window.showQuickPick(providers, { + title: "Remove AI API Key", + placeHolder: "Select the API key to remove", + }); + + if (!selected) { + return; // User cancelled + } + + const confirm = await vscode.window.showWarningMessage( + `Are you sure you want to remove the ${selected.label} API key?`, + { modal: true }, + "Remove" + ); + + if (confirm !== "Remove") { + return; + } + + try { + switch (selected.provider) { + case "openai": + await OpenAIProvider.removeApiKey(context); + break; + case "anthropic": + await AnthropicProvider.removeApiKey(context); + break; + case "google": + await GoogleProvider.removeApiKey(context); + break; + } + + vscode.window.showInformationMessage( + `${selected.label} API key removed successfully.` + ); + + // Check if current provider is the one we just removed + const config = vscode.workspace.getConfiguration("devBuddy"); + const currentProvider = config.get("ai.provider"); + + if (currentProvider === selected.provider) { + const switchProvider = await vscode.window.showWarningMessage( + "Your current AI provider's key was removed. Switch to Copilot?", + "Yes", + "No" + ); + + if (switchProvider === "Yes") { + await config.update( + "ai.provider", + "copilot", + vscode.ConfigurationTarget.Global + ); + AIProviderManager.getInstance().refresh(); + vscode.window.showInformationMessage( + "AI provider switched to Copilot." + ); + } + } + } catch (error) { + logger.error(`Failed to remove ${selected.label} API key:`, error); + vscode.window.showErrorMessage( + `Failed to remove API key: ${error instanceof Error ? error.message : "Unknown error"}` + ); + } +} + +/** + * Command: Show AI Provider Status + */ +export async function showProviderStatusCommand(): Promise { + const manager = AIProviderManager.getInstance(); + const statuses = await manager.getAllProviderStatuses(); + const currentProvider = manager.getProviderType(); + const aiDisabled = manager.isAIDisabled(); + + const items: vscode.QuickPickItem[] = []; + + if (aiDisabled) { + items.push({ + label: "$(warning) AI Features Disabled", + description: "Using rule-based summarization", + detail: "Enable AI in settings: devBuddy.ai.disabled = false", + }); + } + + for (const status of statuses) { + const isCurrent = status.provider === currentProvider; + const icon = status.isAvailable + ? "$(check)" + : status.isConfigured + ? "$(warning)" + : "$(circle-slash)"; + const currentMarker = isCurrent ? " $(star-full)" : ""; + + // Add Beta label for BYOT providers + const betaLabel = status.provider !== "copilot" ? " (Beta)" : ""; + + let description = status.model; + if (status.provider === "copilot") { + description += " (VS Code LM API)"; + } + if (isCurrent) { + description += " - Current"; + } + + let detail = ""; + if (status.provider === "copilot") { + detail = status.isAvailable + ? "GitHub Copilot is active" + : "GitHub Copilot not available - check subscription"; + } else { + detail = status.isConfigured + ? "API key configured (Beta feature)" + : `API key not configured - Run 'DevBuddy: Set ${status.provider.charAt(0).toUpperCase() + status.provider.slice(1)} API Key'`; + } + + items.push({ + label: `${icon} ${status.provider.charAt(0).toUpperCase() + status.provider.slice(1)}${betaLabel}${currentMarker}`, + description, + detail, + }); + } + + // Add action items + items.push({ label: "", kind: vscode.QuickPickItemKind.Separator }); + items.push({ + label: "$(gear) Change AI Provider", + description: "Open settings to change provider", + }); + items.push({ + label: "$(key) Manage API Keys", + description: "Add or remove API keys", + }); + + const selected = await vscode.window.showQuickPick(items, { + title: "AI Provider Status", + placeHolder: "View provider status or take action", + }); + + if (selected?.label.includes("Change AI Provider")) { + vscode.commands.executeCommand( + "workbench.action.openSettings", + "devBuddy.ai.provider" + ); + } else if (selected?.label.includes("Manage API Keys")) { + const action = await vscode.window.showQuickPick( + [ + { label: "$(add) Set OpenAI API Key", command: "devBuddy.ai.setOpenAIKey" }, + { label: "$(add) Set Anthropic API Key", command: "devBuddy.ai.setAnthropicKey" }, + { label: "$(add) Set Google AI API Key", command: "devBuddy.ai.setGoogleKey" }, + { label: "$(trash) Remove API Key", command: "devBuddy.ai.removeApiKey" }, + ], + { placeHolder: "Select action" } + ); + + if (action) { + vscode.commands.executeCommand(action.command); + } + } +} + diff --git a/src/commands/index.ts b/src/commands/index.ts index 21538a8..101c363 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -26,6 +26,15 @@ import { registerCommonCommands } from "./common"; import { registerBranchCommands } from "./branch"; import { registerMultiRepoCommands } from "./multiRepo"; +// AI Key Management commands +import { + setOpenAIKeyCommand, + setAnthropicKeyCommand, + setGoogleKeyCommand, + removeApiKeyCommand, + showProviderStatusCommand, +} from "./aiKeyManagement"; + /** * Register all commands for the extension * This is the central command registration point @@ -178,6 +187,27 @@ export function registerAllCommands( registerMultiRepoCommands(context, ticketsProvider); } + // ==================== AI KEY MANAGEMENT COMMANDS ==================== + // BYOT (Bring Your Own Token) support for AI providers + + context.subscriptions.push( + vscode.commands.registerCommand("devBuddy.ai.setOpenAIKey", () => + setOpenAIKeyCommand(context) + ), + vscode.commands.registerCommand("devBuddy.ai.setAnthropicKey", () => + setAnthropicKeyCommand(context) + ), + vscode.commands.registerCommand("devBuddy.ai.setGoogleKey", () => + setGoogleKeyCommand(context) + ), + vscode.commands.registerCommand("devBuddy.ai.removeApiKey", () => + removeApiKeyCommand(context) + ), + vscode.commands.registerCommand("devBuddy.ai.showProviderStatus", () => + showProviderStatusCommand() + ) + ); + logger.success("All commands registered!"); } diff --git a/src/shared/ai/aiProviderManager.ts b/src/shared/ai/aiProviderManager.ts new file mode 100644 index 0000000..972d98b --- /dev/null +++ b/src/shared/ai/aiProviderManager.ts @@ -0,0 +1,237 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { + IAIProvider, + AIProviderType, + AIProviderStatus, + AIRequest, + AIResponse, +} from "./providers/types"; +import { CopilotProvider } from "./providers/CopilotProvider"; +import { OpenAIProvider } from "./providers/OpenAIProvider"; +import { AnthropicProvider } from "./providers/AnthropicProvider"; +import { GoogleProvider } from "./providers/GoogleProvider"; +import { FallbackSummarizer } from "./fallbackSummarizer"; + +const logger = getLogger(); + +/** + * AI Provider Manager + * Manages provider selection, initialization, and request routing + */ +export class AIProviderManager { + private static instance: AIProviderManager | null = null; + private static extensionContext: vscode.ExtensionContext | null = null; + + private currentProvider: IAIProvider | null = null; + private fallbackSummarizer: FallbackSummarizer; + private aiDisabled: boolean = false; + + private constructor() { + this.fallbackSummarizer = new FallbackSummarizer(); + this.loadConfiguration(); + } + + /** + * Initialize the manager with extension context + * Must be called during extension activation + */ + static initialize(context: vscode.ExtensionContext): void { + AIProviderManager.extensionContext = context; + + // Set context for all BYOT providers + OpenAIProvider.setExtensionContext(context); + AnthropicProvider.setExtensionContext(context); + GoogleProvider.setExtensionContext(context); + + logger.debug("[AIProviderManager] Initialized with extension context"); + } + + /** + * Get the singleton instance + */ + static getInstance(): AIProviderManager { + if (!AIProviderManager.instance) { + AIProviderManager.instance = new AIProviderManager(); + } + return AIProviderManager.instance; + } + + /** + * Load configuration and initialize the appropriate provider + */ + private loadConfiguration(): void { + const config = vscode.workspace.getConfiguration("devBuddy"); + this.aiDisabled = config.get("ai.disabled", false); + + if (this.aiDisabled) { + logger.info( + "[AIProviderManager] AI features disabled, using rule-based fallback" + ); + this.currentProvider = null; + return; + } + + const providerType = config.get("ai.provider", "copilot"); + this.initializeProvider(providerType); + } + + /** + * Initialize a specific provider + */ + private initializeProvider(providerType: AIProviderType): void { + logger.debug(`[AIProviderManager] Initializing provider: ${providerType}`); + + switch (providerType) { + case "copilot": + this.currentProvider = new CopilotProvider(); + break; + case "openai": + this.currentProvider = new OpenAIProvider(); + break; + case "anthropic": + this.currentProvider = new AnthropicProvider(); + break; + case "google": + this.currentProvider = new GoogleProvider(); + break; + default: + logger.warn( + `[AIProviderManager] Unknown provider: ${providerType}, falling back to Copilot` + ); + this.currentProvider = new CopilotProvider(); + } + } + + /** + * Refresh provider (e.g., after settings change) + */ + refresh(): void { + this.loadConfiguration(); + logger.debug("[AIProviderManager] Provider refreshed"); + } + + /** + * Check if AI is available + */ + async isAvailable(): Promise { + if (this.aiDisabled || !this.currentProvider) { + return false; + } + return this.currentProvider.isAvailable(); + } + + /** + * Get the current provider type + */ + getProviderType(): AIProviderType | null { + return this.currentProvider?.getProviderType() ?? null; + } + + /** + * Get the current model name + */ + getModelName(): string { + return this.currentProvider?.getModelName() ?? "none"; + } + + /** + * Send a request to the AI provider + */ + async sendRequest(request: AIRequest): Promise { + if (this.aiDisabled) { + throw new Error("AI features are disabled. Enable in settings or use rule-based fallback."); + } + + if (!this.currentProvider) { + throw new Error("No AI provider configured"); + } + + return this.currentProvider.sendRequest(request); + } + + /** + * Get the status of all providers + */ + async getAllProviderStatuses(): Promise { + const context = AIProviderManager.extensionContext; + const statuses: AIProviderStatus[] = []; + + // Copilot + const copilot = new CopilotProvider(); + statuses.push(await copilot.getStatus()); + + // OpenAI + const openaiConfigured = context + ? await OpenAIProvider.hasApiKey(context) + : false; + statuses.push({ + provider: "openai", + isConfigured: openaiConfigured, + isAvailable: openaiConfigured, + model: vscode.workspace + .getConfiguration("devBuddy") + .get("ai.openai.model", "gpt-4o-mini"), + }); + + // Anthropic + const anthropicConfigured = context + ? await AnthropicProvider.hasApiKey(context) + : false; + statuses.push({ + provider: "anthropic", + isConfigured: anthropicConfigured, + isAvailable: anthropicConfigured, + model: vscode.workspace + .getConfiguration("devBuddy") + .get("ai.anthropic.model", "claude-3-5-haiku-20241022"), + }); + + // Google + const googleConfigured = context + ? await GoogleProvider.hasApiKey(context) + : false; + statuses.push({ + provider: "google", + isConfigured: googleConfigured, + isAvailable: googleConfigured, + model: vscode.workspace + .getConfiguration("devBuddy") + .get("ai.google.model", "gemini-1.5-flash"), + }); + + return statuses; + } + + /** + * Get the current provider status + */ + async getCurrentProviderStatus(): Promise { + if (!this.currentProvider) { + return null; + } + return this.currentProvider.getStatus(); + } + + /** + * Get the fallback summarizer (for rule-based analysis) + */ + getFallbackSummarizer(): FallbackSummarizer { + return this.fallbackSummarizer; + } + + /** + * Check if AI is disabled + */ + isAIDisabled(): boolean { + return this.aiDisabled; + } + + /** + * Get extension context (for commands that need it) + */ + static getExtensionContext(): vscode.ExtensionContext | null { + return AIProviderManager.extensionContext; + } +} + diff --git a/src/shared/ai/aiSummarizer.ts b/src/shared/ai/aiSummarizer.ts index b7a799f..a90b951 100644 --- a/src/shared/ai/aiSummarizer.ts +++ b/src/shared/ai/aiSummarizer.ts @@ -1,5 +1,6 @@ import * as vscode from "vscode"; import { FallbackSummarizer } from "./fallbackSummarizer"; +import { AIProviderManager } from "./aiProviderManager"; import { getLogger } from "@shared/utils/logger"; export interface AISummaryRequest { @@ -17,159 +18,38 @@ export interface AISummaryResponse { } export class AISummarizer { - private model: vscode.LanguageModelChat | null = null; - private modelFamily: string = "gpt-4o"; - private writingTone: string = "professional"; - private preferredModelSelector: string = "auto"; + private providerManager: AIProviderManager; private fallbackSummarizer: FallbackSummarizer; + private writingTone: string = "professional"; private aiDisabled: boolean = false; constructor() { this.fallbackSummarizer = new FallbackSummarizer(); + this.providerManager = AIProviderManager.getInstance(); this.loadConfiguration(); - this.initializeModel(); } private loadConfiguration() { const config = vscode.workspace.getConfiguration("devBuddy"); - - // Check if AI is completely disabled (for sensitive organizations) this.aiDisabled = config.get("ai.disabled", false); - - // Get the preferred model selector (new setting) - this.preferredModelSelector = config.get("ai.model", "auto"); this.writingTone = config.get("writingTone", "professional"); - - // Extract model family from selector - if (this.preferredModelSelector === "auto") { - this.modelFamily = ""; // Will select best available - } else { - // Remove "copilot:" prefix if present - const modelPart = this.preferredModelSelector.replace(/^copilot:/, ""); - - // Map to model family names used by VS Code Language Model API - switch (modelPart) { - case "gpt-4o": - this.modelFamily = "gpt-4o"; - break; - case "gpt-4.1": - this.modelFamily = "gpt-4.1"; - break; - case "gpt-4-turbo": - this.modelFamily = "gpt-4-turbo"; - break; - case "gpt-4": - this.modelFamily = "gpt-4"; - break; - case "gpt-4o-mini": - this.modelFamily = "gpt-4o-mini"; - break; - case "gpt-3.5-turbo": - this.modelFamily = "gpt-3.5-turbo"; - break; - case "gemini-2.0-flash": - this.modelFamily = "gemini-2.0-flash-exp"; - break; - default: { - // Try legacy setting as fallback - const legacyModel = config.get("aiModel", "gpt-4o"); - this.modelFamily = legacyModel === "gemini-2.0-flash" - ? "gemini-2.0-flash-exp" - : legacyModel; - } - } - } } - private async initializeModel() { - const logger = getLogger(); - - // Skip AI initialization if disabled + async isAvailable(): Promise { if (this.aiDisabled) { - logger.info("AI features disabled by user preference, using rule-based fallback"); - this.model = null; - return; - } - - try { - logger.debug( - `Requested model: ${this.preferredModelSelector}, Family: ${this.modelFamily || "auto"}` - ); - - // Get ALL available language models - logger.debug("Fetching all available models..."); - const allModels = await vscode.lm.selectChatModels(); - - if (!allModels || allModels.length === 0) { - logger.warn("No AI models available, falling back to rule-based summarization"); - this.model = null; - return; - } - - // Log all available models - logger.debug(`Found ${allModels.length} available models:`); - allModels.forEach((m, index) => { - logger.debug(` ${index + 1}. ${m.id} (vendor: ${m.vendor}, family: ${m.family}, name: ${m.name})`); - }); - - // If auto mode, select the best available model - if (this.preferredModelSelector === "auto" || !this.modelFamily) { - // Try models in preference order (verified working models, best quality first) - const preferredFamilies = [ - "gpt-4o", // Best: OpenAI's latest flagship - "gpt-4.1", // Excellent: Proven and reliable - "gpt-4-turbo", // Great: Fast and powerful - "gpt-4", // Good: Classic GPT-4 - "gemini-2.0-flash-exp", // Alternative: Google's model - "gpt-4o-mini", // Faster: When speed matters - "gpt-3.5-turbo", // Fallback: Most widely available - ]; - - for (const family of preferredFamilies) { - const match = allModels.find((m) => m.family === family); - if (match) { - this.model = match; - logger.success( - `Auto-selected model: ${match.id} (vendor: ${match.vendor}, family: ${match.family})` - ); - return; - } - } - - // Use first available as last resort - this.model = allModels[0]; - logger.info(`Using first available model: ${this.model.id}`); - return; - } - - // Try to find a model matching the requested family - const matchingModel = allModels.find((m) => - m.family?.toLowerCase().includes(this.modelFamily.toLowerCase()) - ); - - if (matchingModel) { - this.model = matchingModel; - logger.success( - `Using matching model: ${matchingModel.id} (vendor: ${matchingModel.vendor}, family: ${matchingModel.family}, maxInputTokens: ${matchingModel.maxInputTokens})` - ); - } else { - // Use first available model as fallback - this.model = allModels[0]; - logger.warn( - `Model family "${this.modelFamily}" not found, using fallback: ${this.model.id} (vendor: ${this.model.vendor}, family: ${this.model.family})` - ); - } - } catch (error) { - logger.error("AI model initialization failed", error); - this.model = null; + return false; } + return this.providerManager.isAvailable(); } - async isAvailable(): Promise { - if (!this.model) { - await this.initializeModel(); - } - return this.model !== null; + /** + * Get current provider info for logging/display + */ + getProviderInfo(): { provider: string; model: string } { + return { + provider: this.providerManager.getProviderType() || "fallback", + model: this.providerManager.getModelName(), + }; } /** @@ -179,46 +59,34 @@ export class AISummarizer { request: AISummaryRequest ): Promise { const logger = getLogger(); - - // Use fallback summarizer if no AI model available - if (!this.model) { + + // Use fallback summarizer if AI is disabled or unavailable + if (this.aiDisabled || !(await this.providerManager.isAvailable())) { logger.debug("Using rule-based PR summary"); return this.fallbackSummarizer.generatePRSummary(request); } try { const prompt = this.buildPRSummaryPrompt(request); - const messages = [vscode.LanguageModelChatMessage.User(prompt)]; + const { provider, model } = this.getProviderInfo(); + logger.debug(`Sending PR request to ${provider}:${model}`); - logger.debug(`Sending PR request to model: ${this.model.id}`); + const response = await this.providerManager.sendRequest({ + prompt, + maxTokens: 2048, + temperature: 0.7, + }); - const response = await this.model.sendRequest( - messages, - {}, - new vscode.CancellationTokenSource().token + logger.success( + `Successfully generated PR summary using ${response.provider}` ); - - let summary = ""; - for await (const fragment of response.text) { - summary += fragment; - } - - logger.success("Successfully generated PR summary"); - return summary.trim(); + return response.content; } catch (error) { logger.error("Error generating PR summary", error); - // Try fallback to a different model - logger.debug("Attempting to use fallback model..."); - const fallbackResult = await this.tryFallbackModel(request, "pr"); - - // If all AI attempts fail, use rule-based fallback - if (!fallbackResult) { - logger.info("All AI models failed, using rule-based fallback"); - return this.fallbackSummarizer.generatePRSummary(request); - } - - return fallbackResult; + // Fall back to rule-based + logger.info("AI failed, using rule-based fallback"); + return this.fallbackSummarizer.generatePRSummary(request); } } @@ -229,158 +97,104 @@ export class AISummarizer { request: AISummaryRequest ): Promise { const logger = getLogger(); - - // Use fallback summarizer if no AI model available - if (!this.model) { + + // Use fallback summarizer if AI is disabled or unavailable + if (this.aiDisabled || !(await this.providerManager.isAvailable())) { logger.debug("Using rule-based standup summary"); return this.fallbackSummarizer.generateStandupSummary(request); } try { const prompt = this.buildStandupSummaryPrompt(request); - const messages = [vscode.LanguageModelChatMessage.User(prompt)]; + const { provider, model } = this.getProviderInfo(); + logger.debug(`Sending standup request to ${provider}:${model}`); - logger.debug(`Sending request to model: ${this.model.id}`); + const response = await this.providerManager.sendRequest({ + prompt, + maxTokens: 1024, + temperature: 0.7, + }); - const response = await this.model.sendRequest( - messages, - {}, - new vscode.CancellationTokenSource().token + logger.success( + `Successfully generated standup summary using ${response.provider}` ); - - let summary = ""; - for await (const fragment of response.text) { - summary += fragment; - } - - logger.success("Successfully generated standup summary"); - return summary.trim(); + return response.content; } catch (error) { logger.error("Error generating standup summary", error); - // Try fallback to a different model - logger.debug("Attempting to use fallback model..."); - const fallbackResult = await this.tryFallbackModel(request, "standup"); - - // If all AI attempts fail, use rule-based fallback - if (!fallbackResult) { - logger.info("All AI models failed, using rule-based fallback"); - return this.fallbackSummarizer.generateStandupSummary(request); - } - - return fallbackResult; + // Fall back to rule-based + logger.info("AI failed, using rule-based fallback"); + return this.fallbackSummarizer.generateStandupSummary(request); } } /** - * Try using a fallback model if the primary fails + * Suggest "what you'll do next" based on current work */ - private async tryFallbackModel( - request: AISummaryRequest, - type: "standup" | "pr" - ): Promise { + async suggestNextSteps(request: AISummaryRequest): Promise { const logger = getLogger(); - - try { - // Get all models again and try first available - const allModels = await vscode.lm.selectChatModels(); - - if (!allModels || allModels.length === 0) { - logger.debug("No fallback models available"); - return null; - } - - // Try models in preference order (verified working models, best quality first) - const preferredFamilies = [ - "gpt-4o", // Best: OpenAI's latest flagship - "gpt-4.1", // Excellent: Proven and reliable - "gpt-4-turbo", // Great: Fast and powerful - "gpt-4", // Good: Classic GPT-4 - "gemini-2.0-flash-exp", // Alternative: Google's model - "gpt-4o-mini", // Faster: When speed matters - "gpt-3.5-turbo", // Fallback: Most widely available - ]; - let fallbackModel = null; - - for (const family of preferredFamilies) { - fallbackModel = allModels.find((m) => m.family === family); - if (fallbackModel) break; - } - - if (!fallbackModel) { - fallbackModel = allModels[0]; - } - - logger.debug(`Trying fallback model: ${fallbackModel.id} (${fallbackModel.family})`); - const prompt = - type === "standup" - ? this.buildStandupSummaryPrompt(request) - : this.buildPRSummaryPrompt(request); - const messages = [vscode.LanguageModelChatMessage.User(prompt)]; + // Use fallback summarizer if AI is disabled or unavailable + if (this.aiDisabled || !(await this.providerManager.isAvailable())) { + logger.debug("Using rule-based next steps suggestion"); + return this.fallbackSummarizer.suggestNextSteps(request); + } - const response = await fallbackModel.sendRequest( - messages, - {}, - new vscode.CancellationTokenSource().token - ); + try { + const prompt = `Based on these recent commits, suggest 1-2 concise next steps (keep it under 50 words): - let summary = ""; - for await (const fragment of response.text) { - summary += fragment; - } +Commits: +${request.commits.map((c) => `- ${c.message}`).join("\n")} - logger.success(`Fallback model succeeded: ${fallbackModel.family}`); +Provide only the next steps, no explanations.`; - // Update the model for future use - this.model = fallbackModel; + const response = await this.providerManager.sendRequest({ + prompt, + maxTokens: 256, + temperature: 0.7, + }); - return summary.trim(); + return response.content; } catch (error) { - logger.error("Fallback model also failed", error); - return null; + logger.error("Error suggesting next steps", error); + return this.fallbackSummarizer.suggestNextSteps(request); } } /** - * Suggest "what you'll do next" based on current work + * Analyze if commits indicate any potential blockers or risks */ - async suggestNextSteps(request: AISummaryRequest): Promise { + async detectBlockersFromCommits( + commits: Array<{ message: string }> + ): Promise { const logger = getLogger(); - - // Use fallback summarizer if no AI model available - if (!this.model) { - logger.debug("Using rule-based next steps suggestion"); - return this.fallbackSummarizer.suggestNextSteps(request); + + // Use fallback summarizer if AI is disabled or unavailable + if (this.aiDisabled || !(await this.providerManager.isAvailable())) { + logger.debug("Using rule-based blocker detection"); + return this.fallbackSummarizer.detectBlockers(commits); } try { - const prompt = `Based on these recent commits, suggest 1-2 concise next steps (keep it under 50 words): - -Commits: -${request.commits.map((c) => `- ${c.message}`).join("\n")} + const commitMessages = commits.map((c) => c.message).join("\n"); -Provide only the next steps, no explanations.`; + const prompt = `Based on these commit messages, identify any potential blockers, risks, or issues that might need attention. If everything looks normal, respond with "None detected". - const messages = [vscode.LanguageModelChatMessage.User(prompt)]; +Commits: +${commitMessages} - const response = await this.model.sendRequest( - messages, - {}, - new vscode.CancellationTokenSource().token - ); +Respond with either "None detected" or a brief description of the concern.`; - let suggestion = ""; - for await (const fragment of response.text) { - suggestion += fragment; - } + const response = await this.providerManager.sendRequest({ + prompt, + maxTokens: 256, + temperature: 0.3, + }); - return suggestion.trim(); + return response.content; } catch (error) { - logger.error("Error suggesting next steps", error); - // Fall back to rule-based suggestions - logger.debug("Using rule-based next steps suggestion"); - return this.fallbackSummarizer.suggestNextSteps(request); + logger.error("Error detecting blockers", error); + return this.fallbackSummarizer.detectBlockers(commits); } } @@ -498,52 +312,6 @@ Output ONLY the summary text in first person, no introduction or headers.`; } } - /** - * Analyze if commits indicate any potential blockers or risks - */ - async detectBlockersFromCommits( - commits: Array<{ message: string }> - ): Promise { - const logger = getLogger(); - - // Use fallback summarizer if no AI model available - if (!this.model) { - logger.debug("Using rule-based blocker detection"); - return this.fallbackSummarizer.detectBlockers(commits); - } - - try { - const commitMessages = commits.map((c) => c.message).join("\n"); - - const prompt = `Based on these commit messages, identify any potential blockers, risks, or issues that might need attention. If everything looks normal, respond with "None detected". - -Commits: -${commitMessages} - -Respond with either "None detected" or a brief description of the concern.`; - - const messages = [vscode.LanguageModelChatMessage.User(prompt)]; - - const response = await this.model.sendRequest( - messages, - {}, - new vscode.CancellationTokenSource().token - ); - - let result = ""; - for await (const fragment of response.text) { - result += fragment; - } - - return result.trim(); - } catch (error) { - logger.error("Error detecting blockers", error); - // Fall back to rule-based detection - logger.debug("Using rule-based blocker detection"); - return this.fallbackSummarizer.detectBlockers(commits); - } - } - /** * Categorize commits by type (features, fixes, refactors, etc.) */ @@ -669,9 +437,7 @@ Respond with either "None detected" or a brief description of the concern.`; /** * Format categorized files for AI prompt */ - private formatCategorizedFiles( - categories: Map - ): string { + private formatCategorizedFiles(categories: Map): string { let output = ""; const topCategories = Array.from(categories.entries()) .sort((a, b) => b[1].length - a[1].length) diff --git a/src/shared/ai/providers/AnthropicProvider.ts b/src/shared/ai/providers/AnthropicProvider.ts new file mode 100644 index 0000000..7fbf77e --- /dev/null +++ b/src/shared/ai/providers/AnthropicProvider.ts @@ -0,0 +1,160 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { BaseAIProvider } from "./BaseAIProvider"; +import { AIRequest, AIProviderType, AI_API_KEY_SECRETS } from "./types"; + +const logger = getLogger(); + +/** + * Anthropic provider using direct API access with user's API key + */ +export class AnthropicProvider extends BaseAIProvider { + protected providerType: AIProviderType = "anthropic"; + private apiKey: string | null = null; + private static extensionContext: vscode.ExtensionContext | null = null; + + /** + * Set the extension context for secret storage access + */ + static setExtensionContext(context: vscode.ExtensionContext): void { + AnthropicProvider.extensionContext = context; + } + + protected loadConfiguration(): void { + const config = vscode.workspace.getConfiguration("devBuddy"); + this.model = config.get( + "ai.anthropic.model", + "claude-3-5-haiku-20241022" + ); + } + + protected async initialize(): Promise { + await this.loadApiKey(); + } + + /** + * Load API key from secure storage + */ + private async loadApiKey(): Promise { + if (!AnthropicProvider.extensionContext) { + logger.warn("[Anthropic] Extension context not set, cannot load API key"); + return; + } + + try { + this.apiKey = await AnthropicProvider.extensionContext.secrets.get( + AI_API_KEY_SECRETS.anthropic + ) || null; + } catch (error) { + logger.error("[Anthropic] Failed to load API key:", error); + this.apiKey = null; + } + } + + /** + * Save API key to secure storage + */ + static async setApiKey( + context: vscode.ExtensionContext, + apiKey: string + ): Promise { + await context.secrets.store(AI_API_KEY_SECRETS.anthropic, apiKey); + logger.success("[Anthropic] API key saved securely"); + } + + /** + * Remove API key from secure storage + */ + static async removeApiKey(context: vscode.ExtensionContext): Promise { + await context.secrets.delete(AI_API_KEY_SECRETS.anthropic); + logger.info("[Anthropic] API key removed"); + } + + /** + * Check if API key is configured + */ + static async hasApiKey(context: vscode.ExtensionContext): Promise { + const key = await context.secrets.get(AI_API_KEY_SECRETS.anthropic); + return !!key; + } + + async isAvailable(): Promise { + await this.loadApiKey(); + return this.apiKey !== null && this.apiKey.length > 0; + } + + protected async performRequest(request: AIRequest): Promise { + await this.loadApiKey(); + + if (!this.apiKey) { + throw new Error( + "Anthropic API key not configured. Run 'DevBuddy: Set Anthropic API Key' to configure." + ); + } + + const body: { + model: string; + max_tokens: number; + system?: string; + messages: Array<{ role: string; content: string }>; + } = { + model: this.model, + max_tokens: request.maxTokens || 2048, + messages: [{ role: "user", content: request.prompt }], + }; + + if (request.systemPrompt) { + body.system = request.systemPrompt; + } + + logger.debug(`[Anthropic] Sending request to model: ${this.model}`); + + const response = await fetch("https://api.anthropic.com/v1/messages", { + method: "POST", + headers: { + "Content-Type": "application/json", + "x-api-key": this.apiKey, + "anthropic-version": "2023-06-01", + }, + body: JSON.stringify(body), + }); + + if (!response.ok) { + const errorBody = await response.text(); + let errorMessage = `Anthropic API error: ${response.status}`; + + try { + const errorJson = JSON.parse(errorBody); + if (errorJson.error?.message) { + errorMessage = `Anthropic API error: ${errorJson.error.message}`; + } + } catch { + // Use default error message + } + + logger.error(`[Anthropic] ${errorMessage}`); + throw new Error(errorMessage); + } + + const data = await response.json() as { + content?: Array<{ type: string; text?: string }>; + usage?: { input_tokens?: number; output_tokens?: number }; + }; + + const textContent = data.content?.find((c) => c.type === "text"); + const content = textContent?.text; + + if (!content) { + throw new Error("Anthropic API returned empty response"); + } + + if (data.usage) { + const totalTokens = + (data.usage.input_tokens || 0) + (data.usage.output_tokens || 0); + logger.debug(`[Anthropic] Tokens used: ${totalTokens}`); + } + + return content.trim(); + } +} + diff --git a/src/shared/ai/providers/BaseAIProvider.ts b/src/shared/ai/providers/BaseAIProvider.ts new file mode 100644 index 0000000..14b3fb9 --- /dev/null +++ b/src/shared/ai/providers/BaseAIProvider.ts @@ -0,0 +1,116 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { + IAIProvider, + AIProviderType, + AIRequest, + AIResponse, + AIProviderStatus, +} from "./types"; + +const logger = getLogger(); + +/** + * Abstract base class for AI providers + * Provides common functionality for all providers + */ +export abstract class BaseAIProvider implements IAIProvider { + protected abstract providerType: AIProviderType; + protected model: string = ""; + + constructor() { + this.loadConfiguration(); + } + + /** + * Load provider-specific configuration + */ + protected abstract loadConfiguration(): void; + + /** + * Initialize the provider (e.g., validate API key, connect to service) + */ + protected abstract initialize(): Promise; + + /** + * Perform the actual API request + */ + protected abstract performRequest(request: AIRequest): Promise; + + /** + * Get the provider type + */ + getProviderType(): AIProviderType { + return this.providerType; + } + + /** + * Get the current model name + */ + getModelName(): string { + return this.model; + } + + /** + * Check if the provider is available + */ + abstract isAvailable(): Promise; + + /** + * Send a request to the AI provider with error handling + */ + async sendRequest(request: AIRequest): Promise { + logger.debug( + `[${this.providerType}] Sending request to model: ${this.model}` + ); + + try { + const content = await this.performRequest(request); + + logger.success( + `[${this.providerType}] Request completed successfully` + ); + + return { + content, + provider: this.providerType, + model: this.model, + }; + } catch (error) { + logger.error(`[${this.providerType}] Request failed:`, error); + throw error; + } + } + + /** + * Get the current status of the provider + */ + async getStatus(): Promise { + try { + const available = await this.isAvailable(); + return { + provider: this.providerType, + isConfigured: true, + isAvailable: available, + model: this.model, + }; + } catch (error) { + return { + provider: this.providerType, + isConfigured: false, + isAvailable: false, + model: this.model, + error: error instanceof Error ? error.message : "Unknown error", + }; + } + } + + /** + * Helper to get configuration value + */ + protected getConfig(key: string, defaultValue: T): T { + const config = vscode.workspace.getConfiguration("devBuddy"); + return config.get(key, defaultValue); + } +} + diff --git a/src/shared/ai/providers/CopilotProvider.ts b/src/shared/ai/providers/CopilotProvider.ts new file mode 100644 index 0000000..8ab2aa1 --- /dev/null +++ b/src/shared/ai/providers/CopilotProvider.ts @@ -0,0 +1,228 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { BaseAIProvider } from "./BaseAIProvider"; +import { AIRequest, AIProviderType } from "./types"; + +const logger = getLogger(); + +/** + * Copilot provider using VS Code's Language Model API + * This is the default provider that uses GitHub Copilot + */ +export class CopilotProvider extends BaseAIProvider { + protected providerType: AIProviderType = "copilot"; + private vsCodeModel: vscode.LanguageModelChat | null = null; + private preferredModelSelector: string = "auto"; + + protected loadConfiguration(): void { + const config = vscode.workspace.getConfiguration("devBuddy"); + this.preferredModelSelector = config.get("ai.model", "auto"); + + // Extract model family from selector + if (this.preferredModelSelector === "auto") { + this.model = "auto"; + } else { + // Remove "copilot:" prefix if present + const modelPart = this.preferredModelSelector.replace(/^copilot:/, ""); + this.model = this.mapModelFamily(modelPart); + } + } + + /** + * Map model selector to VS Code LM API model family + */ + private mapModelFamily(modelPart: string): string { + switch (modelPart) { + case "gpt-4o": + return "gpt-4o"; + case "gpt-4.1": + return "gpt-4.1"; + case "gpt-4-turbo": + return "gpt-4-turbo"; + case "gpt-4": + return "gpt-4"; + case "gpt-4o-mini": + return "gpt-4o-mini"; + case "gpt-3.5-turbo": + return "gpt-3.5-turbo"; + case "gemini-2.0-flash": + return "gemini-2.0-flash-exp"; + default: + return modelPart; + } + } + + protected async initialize(): Promise { + try { + logger.debug(`[Copilot] Initializing with model: ${this.model}`); + + const allModels = await vscode.lm.selectChatModels(); + + if (!allModels || allModels.length === 0) { + logger.warn("[Copilot] No AI models available"); + this.vsCodeModel = null; + return; + } + + logger.debug(`[Copilot] Found ${allModels.length} available models`); + + if (this.model === "auto" || !this.model) { + // Auto-select best available model + const preferredFamilies = [ + "gpt-4o", + "gpt-4.1", + "gpt-4-turbo", + "gpt-4", + "gemini-2.0-flash-exp", + "gpt-4o-mini", + "gpt-3.5-turbo", + ]; + + for (const family of preferredFamilies) { + const match = allModels.find((m) => m.family === family); + if (match) { + this.vsCodeModel = match; + this.model = match.family; + logger.success(`[Copilot] Auto-selected model: ${match.id}`); + return; + } + } + + // Fallback to first available + this.vsCodeModel = allModels[0]; + this.model = allModels[0].family; + logger.info(`[Copilot] Using first available: ${this.vsCodeModel.id}`); + } else { + // Find specific model + const matchingModel = allModels.find((m) => + m.family?.toLowerCase().includes(this.model.toLowerCase()) + ); + + if (matchingModel) { + this.vsCodeModel = matchingModel; + logger.success(`[Copilot] Using model: ${matchingModel.id}`); + } else { + this.vsCodeModel = allModels[0]; + this.model = allModels[0].family; + logger.warn( + `[Copilot] Model "${this.model}" not found, using: ${this.vsCodeModel.id}` + ); + } + } + } catch (error) { + logger.error("[Copilot] Initialization failed:", error); + this.vsCodeModel = null; + } + } + + async isAvailable(): Promise { + if (!this.vsCodeModel) { + await this.initialize(); + } + return this.vsCodeModel !== null; + } + + protected async performRequest(request: AIRequest): Promise { + if (!this.vsCodeModel) { + await this.initialize(); + } + + if (!this.vsCodeModel) { + throw new Error( + "Copilot is not available. Make sure GitHub Copilot is installed and active." + ); + } + + const messages: vscode.LanguageModelChatMessage[] = []; + + if (request.systemPrompt) { + messages.push(vscode.LanguageModelChatMessage.User(request.systemPrompt)); + } + + messages.push(vscode.LanguageModelChatMessage.User(request.prompt)); + + const response = await this.vsCodeModel.sendRequest( + messages, + {}, + new vscode.CancellationTokenSource().token + ); + + let content = ""; + for await (const fragment of response.text) { + content += fragment; + } + + return content.trim(); + } + + /** + * Try to use a fallback model if the primary fails + */ + async tryFallback(request: AIRequest): Promise { + try { + const allModels = await vscode.lm.selectChatModels(); + + if (!allModels || allModels.length === 0) { + return null; + } + + const preferredFamilies = [ + "gpt-4o", + "gpt-4.1", + "gpt-4-turbo", + "gpt-4", + "gemini-2.0-flash-exp", + "gpt-4o-mini", + "gpt-3.5-turbo", + ]; + + let fallbackModel = null; + for (const family of preferredFamilies) { + fallbackModel = allModels.find( + (m) => m.family === family && m !== this.vsCodeModel + ); + if (fallbackModel) break; + } + + if (!fallbackModel) { + fallbackModel = allModels.find((m) => m !== this.vsCodeModel); + } + + if (!fallbackModel) { + return null; + } + + logger.debug(`[Copilot] Trying fallback: ${fallbackModel.id}`); + + const messages: vscode.LanguageModelChatMessage[] = []; + if (request.systemPrompt) { + messages.push( + vscode.LanguageModelChatMessage.User(request.systemPrompt) + ); + } + messages.push(vscode.LanguageModelChatMessage.User(request.prompt)); + + const response = await fallbackModel.sendRequest( + messages, + {}, + new vscode.CancellationTokenSource().token + ); + + let content = ""; + for await (const fragment of response.text) { + content += fragment; + } + + // Update model for future use + this.vsCodeModel = fallbackModel; + this.model = fallbackModel.family; + + logger.success(`[Copilot] Fallback succeeded: ${fallbackModel.family}`); + return content.trim(); + } catch (error) { + logger.error("[Copilot] Fallback failed:", error); + return null; + } + } +} + diff --git a/src/shared/ai/providers/GoogleProvider.ts b/src/shared/ai/providers/GoogleProvider.ts new file mode 100644 index 0000000..5a157a1 --- /dev/null +++ b/src/shared/ai/providers/GoogleProvider.ts @@ -0,0 +1,186 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { BaseAIProvider } from "./BaseAIProvider"; +import { AIRequest, AIProviderType, AI_API_KEY_SECRETS } from "./types"; + +const logger = getLogger(); + +/** + * Google AI (Gemini) provider using direct API access with user's API key + */ +export class GoogleProvider extends BaseAIProvider { + protected providerType: AIProviderType = "google"; + private apiKey: string | null = null; + private static extensionContext: vscode.ExtensionContext | null = null; + + /** + * Set the extension context for secret storage access + */ + static setExtensionContext(context: vscode.ExtensionContext): void { + GoogleProvider.extensionContext = context; + } + + protected loadConfiguration(): void { + const config = vscode.workspace.getConfiguration("devBuddy"); + this.model = config.get("ai.google.model", "gemini-1.5-flash"); + } + + protected async initialize(): Promise { + await this.loadApiKey(); + } + + /** + * Load API key from secure storage + */ + private async loadApiKey(): Promise { + if (!GoogleProvider.extensionContext) { + logger.warn("[Google] Extension context not set, cannot load API key"); + return; + } + + try { + this.apiKey = await GoogleProvider.extensionContext.secrets.get( + AI_API_KEY_SECRETS.google + ) || null; + } catch (error) { + logger.error("[Google] Failed to load API key:", error); + this.apiKey = null; + } + } + + /** + * Save API key to secure storage + */ + static async setApiKey( + context: vscode.ExtensionContext, + apiKey: string + ): Promise { + await context.secrets.store(AI_API_KEY_SECRETS.google, apiKey); + logger.success("[Google] API key saved securely"); + } + + /** + * Remove API key from secure storage + */ + static async removeApiKey(context: vscode.ExtensionContext): Promise { + await context.secrets.delete(AI_API_KEY_SECRETS.google); + logger.info("[Google] API key removed"); + } + + /** + * Check if API key is configured + */ + static async hasApiKey(context: vscode.ExtensionContext): Promise { + const key = await context.secrets.get(AI_API_KEY_SECRETS.google); + return !!key; + } + + async isAvailable(): Promise { + await this.loadApiKey(); + return this.apiKey !== null && this.apiKey.length > 0; + } + + protected async performRequest(request: AIRequest): Promise { + await this.loadApiKey(); + + if (!this.apiKey) { + throw new Error( + "Google AI API key not configured. Run 'DevBuddy: Set Google AI API Key' to configure." + ); + } + + // Build the request body for Gemini API + const contents: Array<{ + role: string; + parts: Array<{ text: string }>; + }> = []; + + // Add system instruction as a user turn if provided (Gemini uses system_instruction) + const body: { + contents: typeof contents; + generationConfig: { + maxOutputTokens: number; + temperature: number; + }; + systemInstruction?: { + parts: Array<{ text: string }>; + }; + } = { + contents: [], + generationConfig: { + maxOutputTokens: request.maxTokens || 2048, + temperature: request.temperature ?? 0.7, + }, + }; + + if (request.systemPrompt) { + body.systemInstruction = { + parts: [{ text: request.systemPrompt }], + }; + } + + body.contents = [ + { + role: "user", + parts: [{ text: request.prompt }], + }, + ]; + + const url = `https://generativelanguage.googleapis.com/v1beta/models/${this.model}:generateContent?key=${this.apiKey}`; + + logger.debug(`[Google] Sending request to model: ${this.model}`); + + const response = await fetch(url, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(body), + }); + + if (!response.ok) { + const errorBody = await response.text(); + let errorMessage = `Google AI API error: ${response.status}`; + + try { + const errorJson = JSON.parse(errorBody); + if (errorJson.error?.message) { + errorMessage = `Google AI API error: ${errorJson.error.message}`; + } + } catch { + // Use default error message + } + + logger.error(`[Google] ${errorMessage}`); + throw new Error(errorMessage); + } + + const data = await response.json() as { + candidates?: Array<{ + content?: { + parts?: Array<{ text?: string }>; + }; + }>; + usageMetadata?: { + promptTokenCount?: number; + candidatesTokenCount?: number; + totalTokenCount?: number; + }; + }; + + const content = data.candidates?.[0]?.content?.parts?.[0]?.text; + + if (!content) { + throw new Error("Google AI API returned empty response"); + } + + if (data.usageMetadata?.totalTokenCount) { + logger.debug( + `[Google] Tokens used: ${data.usageMetadata.totalTokenCount}` + ); + } + + return content.trim(); + } +} + diff --git a/src/shared/ai/providers/OpenAIProvider.ts b/src/shared/ai/providers/OpenAIProvider.ts new file mode 100644 index 0000000..f5c7d0b --- /dev/null +++ b/src/shared/ai/providers/OpenAIProvider.ts @@ -0,0 +1,153 @@ +import * as vscode from "vscode"; +import { getLogger } from "@shared/utils/logger"; +import { BaseAIProvider } from "./BaseAIProvider"; +import { AIRequest, AIProviderType, AI_API_KEY_SECRETS } from "./types"; + +const logger = getLogger(); + +/** + * OpenAI provider using direct API access with user's API key + */ +export class OpenAIProvider extends BaseAIProvider { + protected providerType: AIProviderType = "openai"; + private apiKey: string | null = null; + private static extensionContext: vscode.ExtensionContext | null = null; + + /** + * Set the extension context for secret storage access + */ + static setExtensionContext(context: vscode.ExtensionContext): void { + OpenAIProvider.extensionContext = context; + } + + protected loadConfiguration(): void { + const config = vscode.workspace.getConfiguration("devBuddy"); + this.model = config.get("ai.openai.model", "gpt-4o-mini"); + } + + protected async initialize(): Promise { + await this.loadApiKey(); + } + + /** + * Load API key from secure storage + */ + private async loadApiKey(): Promise { + if (!OpenAIProvider.extensionContext) { + logger.warn("[OpenAI] Extension context not set, cannot load API key"); + return; + } + + try { + this.apiKey = await OpenAIProvider.extensionContext.secrets.get( + AI_API_KEY_SECRETS.openai + ) || null; + } catch (error) { + logger.error("[OpenAI] Failed to load API key:", error); + this.apiKey = null; + } + } + + /** + * Save API key to secure storage + */ + static async setApiKey( + context: vscode.ExtensionContext, + apiKey: string + ): Promise { + await context.secrets.store(AI_API_KEY_SECRETS.openai, apiKey); + logger.success("[OpenAI] API key saved securely"); + } + + /** + * Remove API key from secure storage + */ + static async removeApiKey(context: vscode.ExtensionContext): Promise { + await context.secrets.delete(AI_API_KEY_SECRETS.openai); + logger.info("[OpenAI] API key removed"); + } + + /** + * Check if API key is configured + */ + static async hasApiKey(context: vscode.ExtensionContext): Promise { + const key = await context.secrets.get(AI_API_KEY_SECRETS.openai); + return !!key; + } + + async isAvailable(): Promise { + await this.loadApiKey(); + return this.apiKey !== null && this.apiKey.length > 0; + } + + protected async performRequest(request: AIRequest): Promise { + await this.loadApiKey(); + + if (!this.apiKey) { + throw new Error( + "OpenAI API key not configured. Run 'DevBuddy: Set OpenAI API Key' to configure." + ); + } + + const messages: Array<{ role: string; content: string }> = []; + + if (request.systemPrompt) { + messages.push({ role: "system", content: request.systemPrompt }); + } + + messages.push({ role: "user", content: request.prompt }); + + const body = { + model: this.model, + messages, + max_tokens: request.maxTokens || 2048, + temperature: request.temperature ?? 0.7, + }; + + logger.debug(`[OpenAI] Sending request to model: ${this.model}`); + + const response = await fetch("https://api.openai.com/v1/chat/completions", { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.apiKey}`, + }, + body: JSON.stringify(body), + }); + + if (!response.ok) { + const errorBody = await response.text(); + let errorMessage = `OpenAI API error: ${response.status}`; + + try { + const errorJson = JSON.parse(errorBody); + if (errorJson.error?.message) { + errorMessage = `OpenAI API error: ${errorJson.error.message}`; + } + } catch { + // Use default error message + } + + logger.error(`[OpenAI] ${errorMessage}`); + throw new Error(errorMessage); + } + + const data = await response.json() as { + choices?: Array<{ message?: { content?: string } }>; + usage?: { total_tokens?: number }; + }; + + const content = data.choices?.[0]?.message?.content; + + if (!content) { + throw new Error("OpenAI API returned empty response"); + } + + if (data.usage?.total_tokens) { + logger.debug(`[OpenAI] Tokens used: ${data.usage.total_tokens}`); + } + + return content.trim(); + } +} + diff --git a/src/shared/ai/providers/index.ts b/src/shared/ai/providers/index.ts new file mode 100644 index 0000000..3261498 --- /dev/null +++ b/src/shared/ai/providers/index.ts @@ -0,0 +1,11 @@ +/** + * AI Providers module exports + */ + +export * from "./types"; +export { BaseAIProvider } from "./BaseAIProvider"; +export { CopilotProvider } from "./CopilotProvider"; +export { OpenAIProvider } from "./OpenAIProvider"; +export { AnthropicProvider } from "./AnthropicProvider"; +export { GoogleProvider } from "./GoogleProvider"; + diff --git a/src/shared/ai/providers/types.ts b/src/shared/ai/providers/types.ts new file mode 100644 index 0000000..d60c2a0 --- /dev/null +++ b/src/shared/ai/providers/types.ts @@ -0,0 +1,88 @@ +/** + * AI Provider types for DevBuddy BYOT (Bring Your Own Token) feature + */ + +/** + * Supported AI providers + */ +export type AIProviderType = "copilot" | "openai" | "anthropic" | "google"; + +/** + * Common request interface for AI operations + */ +export interface AIRequest { + prompt: string; + systemPrompt?: string; + maxTokens?: number; + temperature?: number; +} + +/** + * Common response interface for AI operations + */ +export interface AIResponse { + content: string; + provider: AIProviderType; + model: string; + tokensUsed?: number; +} + +/** + * Provider configuration + */ +export interface AIProviderConfig { + provider: AIProviderType; + model: string; + apiKey?: string; // Only for BYOT providers +} + +/** + * Provider status information + */ +export interface AIProviderStatus { + provider: AIProviderType; + isConfigured: boolean; + isAvailable: boolean; + model: string; + error?: string; +} + +/** + * Secret storage keys for API keys + */ +export const AI_API_KEY_SECRETS = { + openai: "devBuddy.ai.openaiApiKey", + anthropic: "devBuddy.ai.anthropicApiKey", + google: "devBuddy.ai.googleApiKey", +} as const; + +/** + * Base interface for AI providers + */ +export interface IAIProvider { + /** + * Get the provider type + */ + getProviderType(): AIProviderType; + + /** + * Get the current model name + */ + getModelName(): string; + + /** + * Check if the provider is configured and ready + */ + isAvailable(): Promise; + + /** + * Send a request to the AI provider + */ + sendRequest(request: AIRequest): Promise; + + /** + * Get the current status of the provider + */ + getStatus(): Promise; +} + diff --git a/webview-ui/build/jira-create-ticket.js b/webview-ui/build/jira-create-ticket.js index 9adb3a5..2676e86 100644 --- a/webview-ui/build/jira-create-ticket.js +++ b/webview-ui/build/jira-create-ticket.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var LM=Object.create;var $p=Object.defineProperty;var PM=Object.getOwnPropertyDescriptor;var BM=Object.getOwnPropertyNames;var FM=Object.getPrototypeOf,zM=Object.prototype.hasOwnProperty;var Tt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),il=(e,t)=>{for(var n in t)$p(e,n,{get:t[n],enumerable:!0})},UM=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of BM(t))!zM.call(e,o)&&o!==n&&$p(e,o,{get:()=>t[o],enumerable:!(r=PM(t,o))||r.enumerable});return e};var j=(e,t,n)=>(n=e!=null?LM(FM(e)):{},UM(t||!e||!e.__esModule?$p(n,"default",{value:e,enumerable:!0}):n,e));var Zy=Tt(ae=>{"use strict";var sl=Symbol.for("react.element"),$M=Symbol.for("react.portal"),HM=Symbol.for("react.fragment"),qM=Symbol.for("react.strict_mode"),VM=Symbol.for("react.profiler"),WM=Symbol.for("react.provider"),jM=Symbol.for("react.context"),KM=Symbol.for("react.forward_ref"),GM=Symbol.for("react.suspense"),JM=Symbol.for("react.memo"),YM=Symbol.for("react.lazy"),Uy=Symbol.iterator;function ZM(e){return e===null||typeof e!="object"?null:(e=Uy&&e[Uy]||e["@@iterator"],typeof e=="function"?e:null)}var qy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vy=Object.assign,Wy={};function $i(e,t,n){this.props=e,this.context=t,this.refs=Wy,this.updater=n||qy}$i.prototype.isReactComponent={};$i.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jy(){}jy.prototype=$i.prototype;function qp(e,t,n){this.props=e,this.context=t,this.refs=Wy,this.updater=n||qy}var Vp=qp.prototype=new jy;Vp.constructor=qp;Vy(Vp,$i.prototype);Vp.isPureReactComponent=!0;var $y=Array.isArray,Ky=Object.prototype.hasOwnProperty,Wp={current:null},Gy={key:!0,ref:!0,__self:!0,__source:!0};function Jy(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Ky.call(t,r)&&!Gy.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{"use strict";Xy.exports=Zy()});var ax=Tt(Se=>{"use strict";function Yp(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rpu(l,n))apu(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[s]=n,r=s);else if(apu(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function pu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Qy=performance,Se.unstable_now=function(){return Qy.now()}):(Kp=Date,ex=Kp.now(),Se.unstable_now=function(){return Kp.now()-ex});var Qy,Kp,ex,Hn=[],Yr=[],nO=1,on=null,gt=3,gu=!1,Ho=!1,al=!1,rx=typeof setTimeout=="function"?setTimeout:null,ox=typeof clearTimeout=="function"?clearTimeout:null,tx=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Zp(e){for(var t=An(Yr);t!==null;){if(t.callback===null)mu(Yr);else if(t.startTime<=e)mu(Yr),t.sortIndex=t.expirationTime,Yp(Hn,t);else break;t=An(Yr)}}function Xp(e){if(al=!1,Zp(e),!Ho)if(An(Hn)!==null)Ho=!0,eh(Qp);else{var t=An(Yr);t!==null&&th(Xp,t.startTime-e)}}function Qp(e,t){Ho=!1,al&&(al=!1,ox(ul),ul=-1),gu=!0;var n=gt;try{for(Zp(t),on=An(Hn);on!==null&&(!(on.expirationTime>t)||e&&!lx());){var r=on.callback;if(typeof r=="function"){on.callback=null,gt=on.priorityLevel;var o=r(on.expirationTime<=t);t=Se.unstable_now(),typeof o=="function"?on.callback=o:on===An(Hn)&&mu(Hn),Zp(t)}else mu(Hn);on=An(Hn)}if(on!==null)var i=!0;else{var s=An(Yr);s!==null&&th(Xp,s.startTime-t),i=!1}return i}finally{on=null,gt=n,gu=!1}}var bu=!1,hu=null,ul=-1,ix=5,sx=-1;function lx(){return!(Se.unstable_now()-sxe||125r?(e.sortIndex=n,Yp(Yr,e),An(Hn)===null&&e===An(Yr)&&(al?(ox(ul),ul=-1):al=!0,th(Xp,n-r))):(e.sortIndex=o,Yp(Hn,e),Ho||gu||(Ho=!0,eh(Qp))),e};Se.unstable_shouldYield=lx;Se.unstable_wrapCallback=function(e){var t=gt;return function(){var n=gt;gt=t;try{return e.apply(this,arguments)}finally{gt=n}}}});var cx=Tt((E$,ux)=>{"use strict";ux.exports=ax()});var hE=Tt(Xt=>{"use strict";var rO=Be(),Yt=cx();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_h=Object.prototype.hasOwnProperty,oO=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,dx={},fx={};function iO(e){return _h.call(fx,e)?!0:_h.call(dx,e)?!1:oO.test(e)?fx[e]=!0:(dx[e]=!0,!1)}function sO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lO(e,t,n,r){if(t===null||typeof t>"u"||sO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lt[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var mm=/[\-:]([a-z])/g;function gm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mm,gm);lt[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mm,gm);lt[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mm,gm);lt[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function bm(e,t,n,r){var o=lt.hasOwnProperty(t)?lt[t]:null;(o!==null?o.type!==0:r||!(2{var IM=Object.create;var Hp=Object.defineProperty;var LM=Object.getOwnPropertyDescriptor;var PM=Object.getOwnPropertyNames;var BM=Object.getPrototypeOf,FM=Object.prototype.hasOwnProperty;var At=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),il=(e,t)=>{for(var n in t)Hp(e,n,{get:t[n],enumerable:!0})},zM=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of PM(t))!FM.call(e,o)&&o!==n&&Hp(e,o,{get:()=>t[o],enumerable:!(r=LM(t,o))||r.enumerable});return e};var j=(e,t,n)=>(n=e!=null?IM(BM(e)):{},zM(t||!e||!e.__esModule?Hp(n,"default",{value:e,enumerable:!0}):n,e));var Qy=At(ae=>{"use strict";var sl=Symbol.for("react.element"),UM=Symbol.for("react.portal"),$M=Symbol.for("react.fragment"),HM=Symbol.for("react.strict_mode"),VM=Symbol.for("react.profiler"),qM=Symbol.for("react.provider"),WM=Symbol.for("react.context"),jM=Symbol.for("react.forward_ref"),KM=Symbol.for("react.suspense"),GM=Symbol.for("react.memo"),YM=Symbol.for("react.lazy"),Hy=Symbol.iterator;function JM(e){return e===null||typeof e!="object"?null:(e=Hy&&e[Hy]||e["@@iterator"],typeof e=="function"?e:null)}var Wy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jy=Object.assign,Ky={};function $i(e,t,n){this.props=e,this.context=t,this.refs=Ky,this.updater=n||Wy}$i.prototype.isReactComponent={};$i.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gy(){}Gy.prototype=$i.prototype;function qp(e,t,n){this.props=e,this.context=t,this.refs=Ky,this.updater=n||Wy}var Wp=qp.prototype=new Gy;Wp.constructor=qp;jy(Wp,$i.prototype);Wp.isPureReactComponent=!0;var Vy=Array.isArray,Yy=Object.prototype.hasOwnProperty,jp={current:null},Jy={key:!0,ref:!0,__self:!0,__source:!0};function Zy(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Yy.call(t,r)&&!Jy.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{"use strict";ex.exports=Qy()});var cx=At(Se=>{"use strict";function Zp(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rpu(l,n))apu(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[s]=n,r=s);else if(apu(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function pu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(tx=performance,Se.unstable_now=function(){return tx.now()}):(Gp=Date,nx=Gp.now(),Se.unstable_now=function(){return Gp.now()-nx});var tx,Gp,nx,Hn=[],Jr=[],tO=1,on=null,gt=3,gu=!1,Ho=!1,al=!1,ix=typeof setTimeout=="function"?setTimeout:null,sx=typeof clearTimeout=="function"?clearTimeout:null,rx=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Xp(e){for(var t=Tn(Jr);t!==null;){if(t.callback===null)mu(Jr);else if(t.startTime<=e)mu(Jr),t.sortIndex=t.expirationTime,Zp(Hn,t);else break;t=Tn(Jr)}}function Qp(e){if(al=!1,Xp(e),!Ho)if(Tn(Hn)!==null)Ho=!0,th(eh);else{var t=Tn(Jr);t!==null&&nh(Qp,t.startTime-e)}}function eh(e,t){Ho=!1,al&&(al=!1,sx(ul),ul=-1),gu=!0;var n=gt;try{for(Xp(t),on=Tn(Hn);on!==null&&(!(on.expirationTime>t)||e&&!ux());){var r=on.callback;if(typeof r=="function"){on.callback=null,gt=on.priorityLevel;var o=r(on.expirationTime<=t);t=Se.unstable_now(),typeof o=="function"?on.callback=o:on===Tn(Hn)&&mu(Hn),Xp(t)}else mu(Hn);on=Tn(Hn)}if(on!==null)var i=!0;else{var s=Tn(Jr);s!==null&&nh(Qp,s.startTime-t),i=!1}return i}finally{on=null,gt=n,gu=!1}}var bu=!1,hu=null,ul=-1,lx=5,ax=-1;function ux(){return!(Se.unstable_now()-axe||125r?(e.sortIndex=n,Zp(Jr,e),Tn(Hn)===null&&e===Tn(Jr)&&(al?(sx(ul),ul=-1):al=!0,nh(Qp,n-r))):(e.sortIndex=o,Zp(Hn,e),Ho||gu||(Ho=!0,th(eh))),e};Se.unstable_shouldYield=ux;Se.unstable_wrapCallback=function(e){var t=gt;return function(){var n=gt;gt=t;try{return e.apply(this,arguments)}finally{gt=n}}}});var fx=At((_$,dx)=>{"use strict";dx.exports=cx()});var gE=At(Xt=>{"use strict";var nO=Be(),Jt=fx();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sh=Object.prototype.hasOwnProperty,rO=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,px={},hx={};function oO(e){return Sh.call(hx,e)?!0:Sh.call(px,e)?!1:rO.test(e)?hx[e]=!0:(px[e]=!0,!1)}function iO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sO(e,t,n,r){if(t===null||typeof t>"u"||iO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lt[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var gm=/[\-:]([a-z])/g;function bm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(gm,bm);lt[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(gm,bm);lt[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gm,bm);lt[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function ym(e,t,n,r){var o=lt.hasOwnProperty(t)?lt[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` -`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{rh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yl(e):""}function aO(e){switch(e.tag){case 5:return yl(e.type);case 16:return yl("Lazy");case 13:return yl("Suspense");case 19:return yl("SuspenseList");case 0:case 2:case 15:return e=oh(e.type,!1),e;case 11:return e=oh(e.type.render,!1),e;case 1:return e=oh(e.type,!0),e;default:return""}}function Ah(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wi:return"Fragment";case Vi:return"Portal";case Sh:return"Profiler";case ym:return"StrictMode";case Ch:return"Suspense";case Th:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xv:return(e.displayName||"Context")+".Consumer";case yv:return(e._context.displayName||"Context")+".Provider";case xm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vm:return t=e.displayName||null,t!==null?t:Ah(e.type)||"Memo";case Xr:t=e._payload,e=e._init;try{return Ah(e(t))}catch{}}return null}function uO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ah(t);case 8:return t===ym?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function po(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cO(e){var t=kv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xu(e){e._valueTracker||(e._valueTracker=cO(e))}function Ev(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=kv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ku(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Nh(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=po(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wv(e,t){t=t.checked,t!=null&&bm(e,"checked",t,!1)}function Mh(e,t){wv(e,t);var n=po(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oh(e,t.type,po(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Oh(e,t,n){(t!=="number"||Ku(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xl=Array.isArray;function ns(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var El={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dO=["Webkit","ms","Moz","O"];Object.keys(El).forEach(function(e){dO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),El[t]=El[e]})});function Tv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||El.hasOwnProperty(e)&&El[e]?(""+t).trim():t+"px"}function Av(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Tv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var fO=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ih(e,t){if(t){if(fO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Lh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ph=null;function km(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bh=null,rs=null,is=null;function yx(e){if(e=Yl(e)){if(typeof Bh!="function")throw Error(R(280));var t=e.stateNode;t&&(t=kc(t),Bh(e.stateNode,e.type,t))}}function Nv(e){rs?is?is.push(e):is=[e]:rs=e}function Mv(){if(rs){var e=rs,t=is;if(is=rs=null,yx(e),t)for(e=0;e>>=0,e===0?32:31-(wO(e)/_O|0)|0}var ku=64,Eu=4194304;function vl(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=vl(l):(i&=s,i!==0&&(r=vl(i)))}else s=n&~o,s!==0?r=vl(s):i!==0&&(r=vl(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Gl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dn(t),e[t]=n}function AO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_l),Tx=" ",Ax=!1;function Yv(e,t){switch(e){case"keyup":return nR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ji=!1;function oR(e,t){switch(e){case"compositionend":return Zv(t);case"keypress":return t.which!==32?null:(Ax=!0,Tx);case"textInput":return e=t.data,e===Tx&&Ax?null:e;default:return null}}function iR(e,t){if(ji)return e==="compositionend"||!Nm&&Yv(e,t)?(e=Gv(),Fu=Cm=no=null,ji=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ox(n)}}function tk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nk(){for(var e=window,t=Ku();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ku(e.document)}return t}function Mm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function hR(e){var t=nk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tk(n.ownerDocument.documentElement,n)){if(r!==null&&Mm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Rx(n,i);var s=Rx(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ki=null,qh=null,Cl=null,Vh=!1;function Dx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vh||Ki==null||Ki!==Ku(r)||(r=Ki,"selectionStart"in r&&Mm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cl&&Fl(Cl,r)||(Cl=r,r=ec(qh,"onSelect"),0Yi||(e.current=Yh[Yi],Yh[Yi]=null,Yi--)}function Ce(e,t){Yi++,Yh[Yi]=e.current,e.current=t}var ho={},vt=go(ho),zt=go(!1),Yo=ho;function cs(e,t){var n=e.type.contextTypes;if(!n)return ho;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ut(e){return e=e.childContextTypes,e!=null}function nc(){Ae(zt),Ae(vt)}function Hx(e,t,n){if(vt.current!==ho)throw Error(R(168));Ce(vt,t),Ce(zt,n)}function dk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(R(108,uO(e)||"Unknown",o));return Ie({},n,r)}function rc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ho,Yo=vt.current,Ce(vt,e),Ce(zt,zt.current),!0}function qx(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=dk(e,t,Yo),r.__reactInternalMemoizedMergedChildContext=e,Ae(zt),Ae(vt),Ce(vt,e)):Ae(zt),Ce(zt,n)}var mr=null,Ec=!1,mh=!1;function fk(e){mr===null?mr=[e]:mr.push(e)}function _R(e){Ec=!0,fk(e)}function bo(){if(!mh&&mr!==null){mh=!0;var e=0,t=ye;try{var n=mr;for(ye=1;e>=s,o-=s,gr=1<<32-Dn(t)+o|n<_?(T=w,w=null):T=w.sibling;var C=f(g,w,x[_],v);if(C===null){w===null&&(w=T);break}e&&w&&C.alternate===null&&t(g,w),y=i(C,y,_),E===null?k=C:E.sibling=C,E=C,w=T}if(_===x.length)return n(g,w),Me&&qo(g,_),k;if(w===null){for(;__?(T=w,w=null):T=w.sibling;var F=f(g,w,C.value,v);if(F===null){w===null&&(w=T);break}e&&w&&F.alternate===null&&t(g,w),y=i(F,y,_),E===null?k=F:E.sibling=F,E=F,w=T}if(C.done)return n(g,w),Me&&qo(g,_),k;if(w===null){for(;!C.done;_++,C=x.next())C=d(g,C.value,v),C!==null&&(y=i(C,y,_),E===null?k=C:E.sibling=C,E=C);return Me&&qo(g,_),k}for(w=r(g,w);!C.done;_++,C=x.next())C=p(w,g,_,C.value,v),C!==null&&(e&&C.alternate!==null&&w.delete(C.key===null?_:C.key),y=i(C,y,_),E===null?k=C:E.sibling=C,E=C);return e&&w.forEach(function(N){return t(g,N)}),Me&&qo(g,_),k}function b(g,y,x,v){if(typeof x=="object"&&x!==null&&x.type===Wi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case yu:e:{for(var k=x.key,E=y;E!==null;){if(E.key===k){if(k=x.type,k===Wi){if(E.tag===7){n(g,E.sibling),y=o(E,x.props.children),y.return=g,g=y;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Xr&&jx(k)===E.type){n(g,E.sibling),y=o(E,x.props),y.ref=hl(g,E,x),y.return=g,g=y;break e}n(g,E);break}else t(g,E);E=E.sibling}x.type===Wi?(y=Jo(x.props.children,g.mode,v,x.key),y.return=g,g=y):(v=ju(x.type,x.key,x.props,null,g.mode,v),v.ref=hl(g,y,x),v.return=g,g=v)}return s(g);case Vi:e:{for(E=x.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(g,y.sibling),y=o(y,x.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=wh(x,g.mode,v),y.return=g,g=y}return s(g);case Xr:return E=x._init,b(g,y,E(x._payload),v)}if(xl(x))return h(g,y,x,v);if(cl(x))return m(g,y,x,v);Du(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,x),y.return=g,g=y):(n(g,y),y=Eh(x,g.mode,v),y.return=g,g=y),s(g)):n(g,y)}return b}var fs=gk(!0),bk=gk(!1),sc=go(null),lc=null,Qi=null,Im=null;function Lm(){Im=Qi=lc=null}function Pm(e){var t=sc.current;Ae(sc),e._currentValue=t}function Qh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ls(e,t){lc=e,Im=Qi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ft=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Im!==e)if(e={context:e,memoizedValue:t,next:null},Qi===null){if(lc===null)throw Error(R(308));Qi=e,lc.dependencies={lanes:0,firstContext:e}}else Qi=Qi.next=e;return t}var jo=null;function Bm(e){jo===null?jo=[e]:jo.push(e)}function yk(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Bm(t)):(n.next=o.next,o.next=n),t.interleaved=n,kr(e,r)}function kr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Qr=!1;function Fm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ao(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(de&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,kr(e,n)}return o=r.interleaved,o===null?(t.next=t,Bm(r)):(t.next=o.next,o.next=t),r.interleaved=t,kr(e,n)}function Uu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wm(e,n)}}function Kx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ac(e,t,n,r){var o=e.updateQueue;Qr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;s=0,c=u=a=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,m=l;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Ie({},d,f);break e;case 2:Qr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=f;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;f=l,l=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Qo|=s,e.lanes=s,e.memoizedState=d}}function Gx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=bh.transition;bh.transition={};try{e(!1),t()}finally{ye=n,bh.transition=r}}function Pk(){return dn().memoizedState}function AR(e,t,n){var r=co(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bk(e))Fk(t,n);else if(n=yk(e,t,n,r),n!==null){var o=Mt();In(n,e,r,o),zk(n,t,r)}}function NR(e,t,n){var r=co(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bk(e))Fk(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Ln(l,s)){var a=t.interleaved;a===null?(o.next=o,Bm(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=yk(e,t,o,r),n!==null&&(o=Mt(),In(n,e,r,o),zk(n,t,r))}}function Bk(e){var t=e.alternate;return e===De||t!==null&&t===De}function Fk(e,t){Tl=cc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zk(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wm(e,n)}}var dc={readContext:cn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},MR={readContext:cn,useCallback:function(e,t){return Vn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:Yx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hu(4194308,4,Ok.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hu(4,2,e,t)},useMemo:function(e,t){var n=Vn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AR.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=Vn();return e={current:e},t.memoizedState=e},useState:Jx,useDebugValue:jm,useDeferredValue:function(e){return Vn().memoizedState=e},useTransition:function(){var e=Jx(!1),t=e[0];return e=TR.bind(null,e[1]),Vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=De,o=Vn();if(Me){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Xe===null)throw Error(R(349));(Xo&30)!==0||wk(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Yx(Sk.bind(null,r,i,e),[e]),r.flags|=2048,jl(9,_k.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Vn(),t=Xe.identifierPrefix;if(Me){var n=br,r=gr;n=(r&~(1<<32-Dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vl++,0")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{oh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yl(e):""}function lO(e){switch(e.tag){case 5:return yl(e.type);case 16:return yl("Lazy");case 13:return yl("Suspense");case 19:return yl("SuspenseList");case 0:case 2:case 15:return e=ih(e.type,!1),e;case 11:return e=ih(e.type.render,!1),e;case 1:return e=ih(e.type,!0),e;default:return""}}function Nh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wi:return"Fragment";case qi:return"Portal";case Ch:return"Profiler";case xm:return"StrictMode";case Ah:return"Suspense";case Th:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kv:return(e.displayName||"Context")+".Consumer";case vv:return(e._context.displayName||"Context")+".Provider";case vm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case km:return t=e.displayName||null,t!==null?t:Nh(e.type)||"Memo";case Xr:t=e._payload,e=e._init;try{return Nh(e(t))}catch{}}return null}function aO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Nh(t);case 8:return t===xm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function po(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uO(e){var t=wv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xu(e){e._valueTracker||(e._valueTracker=uO(e))}function _v(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ku(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mh(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=po(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Sv(e,t){t=t.checked,t!=null&&ym(e,"checked",t,!1)}function Oh(e,t){Sv(e,t);var n=po(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rh(e,t.type,po(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Rh(e,t,n){(t!=="number"||Ku(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xl=Array.isArray;function ns(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var El={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},cO=["Webkit","ms","Moz","O"];Object.keys(El).forEach(function(e){cO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),El[t]=El[e]})});function Nv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||El.hasOwnProperty(e)&&El[e]?(""+t).trim():t+"px"}function Mv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Nv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var dO=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Lh(e,t){if(t){if(dO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Ph(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bh=null;function Em(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fh=null,rs=null,is=null;function vx(e){if(e=Jl(e)){if(typeof Fh!="function")throw Error(R(280));var t=e.stateNode;t&&(t=kc(t),Fh(e.stateNode,e.type,t))}}function Ov(e){rs?is?is.push(e):is=[e]:rs=e}function Rv(){if(rs){var e=rs,t=is;if(is=rs=null,vx(e),t)for(e=0;e>>=0,e===0?32:31-(EO(e)/wO|0)|0}var ku=64,Eu=4194304;function vl(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=vl(l):(i&=s,i!==0&&(r=vl(i)))}else s=n&~o,s!==0?r=vl(s):i!==0&&(r=vl(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Gl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dn(t),e[t]=n}function AO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_l),Nx=" ",Mx=!1;function Xv(e,t){switch(e){case"keyup":return tR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ji=!1;function rR(e,t){switch(e){case"compositionend":return Qv(t);case"keypress":return t.which!==32?null:(Mx=!0,Nx);case"textInput":return e=t.data,e===Nx&&Mx?null:e;default:return null}}function oR(e,t){if(ji)return e==="compositionend"||!Mm&&Xv(e,t)?(e=Jv(),Fu=Am=no=null,ji=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Dx(n)}}function rk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ok(){for(var e=window,t=Ku();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ku(e.document)}return t}function Om(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pR(e){var t=ok(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&rk(n.ownerDocument.documentElement,n)){if(r!==null&&Om(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Ix(n,i);var s=Ix(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ki=null,qh=null,Cl=null,Wh=!1;function Lx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wh||Ki==null||Ki!==Ku(r)||(r=Ki,"selectionStart"in r&&Om(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cl&&Fl(Cl,r)||(Cl=r,r=ec(qh,"onSelect"),0Ji||(e.current=Zh[Ji],Zh[Ji]=null,Ji--)}function Ce(e,t){Ji++,Zh[Ji]=e.current,e.current=t}var ho={},vt=go(ho),zt=go(!1),Jo=ho;function cs(e,t){var n=e.type.contextTypes;if(!n)return ho;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ut(e){return e=e.childContextTypes,e!=null}function nc(){Te(zt),Te(vt)}function qx(e,t,n){if(vt.current!==ho)throw Error(R(168));Ce(vt,t),Ce(zt,n)}function pk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(R(108,aO(e)||"Unknown",o));return Ie({},n,r)}function rc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ho,Jo=vt.current,Ce(vt,e),Ce(zt,zt.current),!0}function Wx(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=pk(e,t,Jo),r.__reactInternalMemoizedMergedChildContext=e,Te(zt),Te(vt),Ce(vt,e)):Te(zt),Ce(zt,n)}var mr=null,Ec=!1,gh=!1;function hk(e){mr===null?mr=[e]:mr.push(e)}function wR(e){Ec=!0,hk(e)}function bo(){if(!gh&&mr!==null){gh=!0;var e=0,t=ye;try{var n=mr;for(ye=1;e>=s,o-=s,gr=1<<32-Dn(t)+o|n<_?(A=w,w=null):A=w.sibling;var C=f(m,w,x[_],v);if(C===null){w===null&&(w=A);break}e&&w&&C.alternate===null&&t(m,w),y=i(C,y,_),E===null?k=C:E.sibling=C,E=C,w=A}if(_===x.length)return n(m,w),Me&&Vo(m,_),k;if(w===null){for(;__?(A=w,w=null):A=w.sibling;var F=f(m,w,C.value,v);if(F===null){w===null&&(w=A);break}e&&w&&F.alternate===null&&t(m,w),y=i(F,y,_),E===null?k=F:E.sibling=F,E=F,w=A}if(C.done)return n(m,w),Me&&Vo(m,_),k;if(w===null){for(;!C.done;_++,C=x.next())C=d(m,C.value,v),C!==null&&(y=i(C,y,_),E===null?k=C:E.sibling=C,E=C);return Me&&Vo(m,_),k}for(w=r(m,w);!C.done;_++,C=x.next())C=p(w,m,_,C.value,v),C!==null&&(e&&C.alternate!==null&&w.delete(C.key===null?_:C.key),y=i(C,y,_),E===null?k=C:E.sibling=C,E=C);return e&&w.forEach(function(N){return t(m,N)}),Me&&Vo(m,_),k}function b(m,y,x,v){if(typeof x=="object"&&x!==null&&x.type===Wi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case yu:e:{for(var k=x.key,E=y;E!==null;){if(E.key===k){if(k=x.type,k===Wi){if(E.tag===7){n(m,E.sibling),y=o(E,x.props.children),y.return=m,m=y;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Xr&&Gx(k)===E.type){n(m,E.sibling),y=o(E,x.props),y.ref=hl(m,E,x),y.return=m,m=y;break e}n(m,E);break}else t(m,E);E=E.sibling}x.type===Wi?(y=Yo(x.props.children,m.mode,v,x.key),y.return=m,m=y):(v=ju(x.type,x.key,x.props,null,m.mode,v),v.ref=hl(m,y,x),v.return=m,m=v)}return s(m);case qi:e:{for(E=x.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(m,y.sibling),y=o(y,x.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=_h(x,m.mode,v),y.return=m,m=y}return s(m);case Xr:return E=x._init,b(m,y,E(x._payload),v)}if(xl(x))return h(m,y,x,v);if(cl(x))return g(m,y,x,v);Du(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(m,y.sibling),y=o(y,x),y.return=m,m=y):(n(m,y),y=wh(x,m.mode,v),y.return=m,m=y),s(m)):n(m,y)}return b}var fs=yk(!0),xk=yk(!1),sc=go(null),lc=null,Qi=null,Lm=null;function Pm(){Lm=Qi=lc=null}function Bm(e){var t=sc.current;Te(sc),e._currentValue=t}function em(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ls(e,t){lc=e,Lm=Qi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ft=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Lm!==e)if(e={context:e,memoizedValue:t,next:null},Qi===null){if(lc===null)throw Error(R(308));Qi=e,lc.dependencies={lanes:0,firstContext:e}}else Qi=Qi.next=e;return t}var jo=null;function Fm(e){jo===null?jo=[e]:jo.push(e)}function vk(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Fm(t)):(n.next=o.next,o.next=n),t.interleaved=n,kr(e,r)}function kr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Qr=!1;function zm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ao(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(de&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,kr(e,n)}return o=r.interleaved,o===null?(t.next=t,Fm(r)):(t.next=o.next,o.next=t),r.interleaved=t,kr(e,n)}function Uu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_m(e,n)}}function Yx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ac(e,t,n,r){var o=e.updateQueue;Qr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;s=0,c=u=a=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,g=l;switch(f=t,p=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Ie({},d,f);break e;case 2:Qr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=f;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;f=l,l=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Qo|=s,e.lanes=s,e.memoizedState=d}}function Jx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=yh.transition;yh.transition={};try{e(!1),t()}finally{ye=n,yh.transition=r}}function Fk(){return dn().memoizedState}function AR(e,t,n){var r=co(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zk(e))Uk(t,n);else if(n=vk(e,t,n,r),n!==null){var o=Mt();In(n,e,r,o),$k(n,t,r)}}function TR(e,t,n){var r=co(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zk(e))Uk(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Ln(l,s)){var a=t.interleaved;a===null?(o.next=o,Fm(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=vk(e,t,o,r),n!==null&&(o=Mt(),In(n,e,r,o),$k(n,t,r))}}function zk(e){var t=e.alternate;return e===De||t!==null&&t===De}function Uk(e,t){Al=cc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $k(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_m(e,n)}}var dc={readContext:cn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},NR={readContext:cn,useCallback:function(e,t){return qn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:Xx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hu(4194308,4,Dk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hu(4,2,e,t)},useMemo:function(e,t){var n=qn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AR.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=qn();return e={current:e},t.memoizedState=e},useState:Zx,useDebugValue:Km,useDeferredValue:function(e){return qn().memoizedState=e},useTransition:function(){var e=Zx(!1),t=e[0];return e=CR.bind(null,e[1]),qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=De,o=qn();if(Me){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Xe===null)throw Error(R(349));(Xo&30)!==0||Sk(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Xx(Ak.bind(null,r,i,e),[e]),r.flags|=2048,jl(9,Ck.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=qn(),t=Xe.identifierPrefix;if(Me){var n=br,r=gr;n=(r&~(1<<32-Dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ql++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Wn]=t,e[$l]=r,Jk(e,t,!1,!1),t.stateNode=e;e:{switch(s=Lh(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;oms&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=uc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Me)return yt(t),null}else 2*qe()-i.renderingStartTime>ms&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=qe(),t.sibling=null,n=Re.current,Ce(Re,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return Xm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Kt&1073741824)!==0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function FR(e,t){switch(Rm(t),t.tag){case 1:return Ut(t.type)&&nc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),Ae(zt),Ae(vt),$m(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Um(t),null;case 13:if(Ae(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Re),null;case 4:return ps(),null;case 10:return Pm(t.type._context),null;case 22:case 23:return Xm(),null;case 24:return null;default:return null}}var Lu=!1,xt=!1,zR=typeof WeakSet=="function"?WeakSet:Set,U=null;function es(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function lm(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var lv=!1;function UR(e,t){if(Wh=Xu,e=nk(),Mm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(jh={focusedElem:e,selectionRange:n},Xu=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Mn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(v){Fe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return h=lv,lv=!1,h}function Al(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&lm(t,n,i)}o=o.next}while(o!==r)}}function Sc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function am(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Xk(e){var t=e.alternate;t!==null&&(e.alternate=null,Xk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[$l],delete t[Jh],delete t[ER],delete t[wR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qk(e){return e.tag===5||e.tag===3||e.tag===4}function av(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function um(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tc));else if(r!==4&&(e=e.child,e!==null))for(um(e,t,n),e=e.sibling;e!==null;)um(e,t,n),e=e.sibling}function cm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cm(e,t,n),e=e.sibling;e!==null;)cm(e,t,n),e=e.sibling}var it=null,On=!1;function Zr(e,t,n){for(n=n.child;n!==null;)eE(e,t,n),n=n.sibling}function eE(e,t,n){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(bc,n)}catch{}switch(n.tag){case 5:xt||es(n,t);case 6:var r=it,o=On;it=null,Zr(e,t,n),it=r,On=o,it!==null&&(On?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(On?(e=it,n=n.stateNode,e.nodeType===8?hh(e.parentNode,n):e.nodeType===1&&hh(e,n),Pl(e)):hh(it,n.stateNode));break;case 4:r=it,o=On,it=n.stateNode.containerInfo,On=!0,Zr(e,t,n),it=r,On=o;break;case 0:case 11:case 14:case 15:if(!xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&lm(n,t,s),o=o.next}while(o!==r)}Zr(e,t,n);break;case 1:if(!xt&&(es(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Fe(n,t,l)}Zr(e,t,n);break;case 21:Zr(e,t,n);break;case 22:n.mode&1?(xt=(r=xt)||n.memoizedState!==null,Zr(e,t,n),xt=r):Zr(e,t,n);break;default:Zr(e,t,n)}}function uv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zR),t.forEach(function(r){var o=JR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*HR(r/1960))-r,10e?16:e,ro===null)var r=!1;else{if(e=ro,ro=null,hc=0,(de&6)!==0)throw Error(R(331));var o=de;for(de|=4,U=e.current;U!==null;){var i=U,s=i.child;if((U.flags&16)!==0){var l=i.deletions;if(l!==null){for(var a=0;aqe()-Ym?Go(e,0):Jm|=n),$t(e,t)}function aE(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eu,Eu<<=1,(Eu&130023424)===0&&(Eu=4194304)));var n=Mt();e=kr(e,t),e!==null&&(Gl(e,t,n),$t(e,n))}function GR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aE(e,n)}function JR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),aE(e,n)}var uE;uE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||zt.current)Ft=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ft=!1,PR(e,t,n);Ft=(e.flags&131072)!==0}else Ft=!1,Me&&(t.flags&1048576)!==0&&pk(t,ic,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qu(e,t),e=t.pendingProps;var o=cs(t,vt.current);ls(t,n),o=qm(null,t,r,e,o,n);var i=Vm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ut(r)?(i=!0,rc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Fm(t),o.updater=_c,t.stateNode=o,o._reactInternals=t,tm(t,r,e,n),t=rm(null,t,r,!0,i,n)):(t.tag=0,Me&&i&&Om(t),Nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ZR(r),e=Mn(r,e),o){case 0:t=nm(null,t,r,e,n);break e;case 1:t=ov(null,t,r,e,n);break e;case 11:t=nv(null,t,r,e,n);break e;case 14:t=rv(null,t,r,Mn(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),nm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),ov(e,t,r,o,n);case 3:e:{if(jk(t),e===null)throw Error(R(387));r=t.pendingProps,i=t.memoizedState,o=i.element,xk(e,t),ac(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=hs(Error(R(423)),t),t=iv(e,t,r,n,o);break e}else if(r!==o){o=hs(Error(R(424)),t),t=iv(e,t,r,n,o);break e}else for(Gt=lo(t.stateNode.containerInfo.firstChild),Jt=t,Me=!0,Rn=null,n=bk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ds(),r===o){t=Er(e,t,n);break e}Nt(e,t,r,n)}t=t.child}return t;case 5:return vk(t),e===null&&Xh(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Kh(r,o)?s=null:i!==null&&Kh(r,i)&&(t.flags|=32),Wk(e,t),Nt(e,t,s,n),t.child;case 6:return e===null&&Xh(t),null;case 13:return Kk(e,t,n);case 4:return zm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fs(t,null,r,n):Nt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),nv(e,t,r,o,n);case 7:return Nt(e,t,t.pendingProps,n),t.child;case 8:return Nt(e,t,t.pendingProps.children,n),t.child;case 12:return Nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ce(sc,r._currentValue),r._currentValue=s,i!==null)if(Ln(i.value,s)){if(i.children===o.children&&!zt.current){t=Er(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=yr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Qh(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(R(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Qh(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ls(t,n),o=cn(o),r=r(o),t.flags|=1,Nt(e,t,r,n),t.child;case 14:return r=t.type,o=Mn(r,t.pendingProps),o=Mn(r.type,o),rv(e,t,r,o,n);case 15:return qk(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),qu(e,t),t.tag=1,Ut(r)?(e=!0,rc(t)):e=!1,ls(t,n),Uk(t,r,o),tm(t,r,o,n),rm(null,t,r,!0,e,n);case 19:return Gk(e,t,n);case 22:return Vk(e,t,n)}throw Error(R(156,t.tag))};function cE(e,t){return Bv(e,t)}function YR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,n,r){return new YR(e,t,n,r)}function e0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZR(e){if(typeof e=="function")return e0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xm)return 11;if(e===vm)return 14}return 2}function fo(e,t){var n=e.alternate;return n===null?(n=an(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ju(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")e0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wi:return Jo(n.children,o,i,t);case ym:s=8,o|=8;break;case Sh:return e=an(12,n,t,o|2),e.elementType=Sh,e.lanes=i,e;case Ch:return e=an(13,n,t,o),e.elementType=Ch,e.lanes=i,e;case Th:return e=an(19,n,t,o),e.elementType=Th,e.lanes=i,e;case vv:return Tc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yv:s=10;break e;case xv:s=9;break e;case xm:s=11;break e;case vm:s=14;break e;case Xr:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=an(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Jo(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Tc(e,t,n,r){return e=an(22,e,r,t),e.elementType=vv,e.lanes=n,e.stateNode={isHidden:!1},e}function Eh(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function wh(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XR(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sh(0),this.expirationTimes=sh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sh(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function t0(e,t,n,r,o,i,s,l,a){return e=new XR(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=an(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fm(i),e}function QR(e,t,n){var r=3{"use strict";function mE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mE)}catch{}}mE(),gE.exports=hE()});var yE=Tt(i0=>{"use strict";var bE=ys();i0.createRoot=bE.createRoot,i0.hydrateRoot=bE.hydrateRoot;var S$});var wE=Tt(Rc=>{"use strict";var oD=Be(),iD=Symbol.for("react.element"),sD=Symbol.for("react.fragment"),lD=Object.prototype.hasOwnProperty,aD=oD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uD={key:!0,ref:!0,__self:!0,__source:!0};function EE(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)lD.call(t,r)&&!uD.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:iD,type:e,key:i,ref:s,props:o,_owner:aD.current}}Rc.Fragment=sD;Rc.jsx=EE;Rc.jsxs=EE});var pe=Tt((M$,_E)=>{"use strict";_E.exports=wE()});var IE=Tt(DE=>{"use strict";var xs=Be();function dD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fD=typeof Object.is=="function"?Object.is:dD,pD=xs.useState,hD=xs.useEffect,mD=xs.useLayoutEffect,gD=xs.useDebugValue;function bD(e,t){var n=t(),r=pD({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return mD(function(){o.value=n,o.getSnapshot=t,l0(o)&&i({inst:o})},[e,n,t]),hD(function(){return l0(o)&&i({inst:o}),e(function(){l0(o)&&i({inst:o})})},[e]),gD(n),n}function l0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fD(e,n)}catch{return!0}}function yD(e,t){return t()}var xD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?yD:bD;DE.useSyncExternalStore=xs.useSyncExternalStore!==void 0?xs.useSyncExternalStore:xD});var Dc=Tt((Z$,LE)=>{"use strict";LE.exports=IE()});var iS=Tt(oS=>{"use strict";var Md=Be(),E8=Dc();function w8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _8=typeof Object.is=="function"?Object.is:w8,S8=E8.useSyncExternalStore,C8=Md.useRef,T8=Md.useEffect,A8=Md.useMemo,N8=Md.useDebugValue;oS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=C8(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=A8(function(){function a(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,_8(c,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(c=p,h):(c=p,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,n,r,o]);var l=S8(e,i[0],i[1]);return T8(function(){s.hasValue=!0,s.value=l},[l]),N8(l),l}});var lS=Tt((fV,sS)=>{"use strict";sS.exports=iS()});var NT=Tt((pK,AT)=>{function gT(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&gT(n)}),e}var Tf=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function bT(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Lo(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var G5="",cT=e=>!!e.scope,J5=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},J1=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=bT(t)}openNode(t){if(!cT(t))return;let n=J5(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){cT(t)&&(this.buffer+=G5)}value(){return this.buffer}span(t){this.buffer+=``}},dT=(e={})=>{let t={children:[]};return Object.assign(t,e),t},Y1=class e{constructor(){this.rootNode=dT(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=dT({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},Z1=class extends Y1{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new J1(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Fa(e){return e?typeof e=="string"?e:e.source:null}function yT(e){return Ci("(?=",e,")")}function Y5(e){return Ci("(?:",e,")*")}function Z5(e){return Ci("(?:",e,")?")}function Ci(...e){return e.map(n=>Fa(n)).join("")}function X5(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Q1(...e){return"("+(X5(e).capture?"":"?:")+e.map(r=>Fa(r)).join("|")+")"}function xT(e){return new RegExp(e.toString()+"|").exec("").length-1}function Q5(e,t){let n=e&&e.exec(t);return n&&n.index===0}var eB=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function eb(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,i=Fa(r),s="";for(;i.length>0;){let l=eB.exec(i);if(!l){s+=i;break}s+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+o):(s+=l[0],l[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}var tB=/\b\B/,vT="[a-zA-Z]\\w*",tb="[a-zA-Z_]\\w*",kT="\\b\\d+(\\.\\d+)?",ET="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",wT="\\b(0b[01]+)",nB="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",rB=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Ci(t,/.*\b/,e.binary,/\b.*/)),Lo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},za={begin:"\\\\[\\s\\S]",relevance:0},oB={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[za]},iB={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[za]},sB={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Nf=function(e,t,n={}){let r=Lo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=Q1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ci(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},lB=Nf("//","$"),aB=Nf("/\\*","\\*/"),uB=Nf("#","$"),cB={scope:"number",begin:kT,relevance:0},dB={scope:"number",begin:ET,relevance:0},fB={scope:"number",begin:wT,relevance:0},pB={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[za,{begin:/\[/,end:/\]/,relevance:0,contains:[za]}]},hB={scope:"title",begin:vT,relevance:0},mB={scope:"title",begin:tb,relevance:0},gB={begin:"\\.\\s*"+tb,relevance:0},bB=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},Cf=Object.freeze({__proto__:null,APOS_STRING_MODE:oB,BACKSLASH_ESCAPE:za,BINARY_NUMBER_MODE:fB,BINARY_NUMBER_RE:wT,COMMENT:Nf,C_BLOCK_COMMENT_MODE:aB,C_LINE_COMMENT_MODE:lB,C_NUMBER_MODE:dB,C_NUMBER_RE:ET,END_SAME_AS_BEGIN:bB,HASH_COMMENT_MODE:uB,IDENT_RE:vT,MATCH_NOTHING_RE:tB,METHOD_GUARD:gB,NUMBER_MODE:cB,NUMBER_RE:kT,PHRASAL_WORDS_MODE:sB,QUOTE_STRING_MODE:iB,REGEXP_MODE:pB,RE_STARTERS_RE:nB,SHEBANG:rB,TITLE_MODE:hB,UNDERSCORE_IDENT_RE:tb,UNDERSCORE_TITLE_MODE:mB});function yB(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function xB(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function vB(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=yB,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function kB(e,t){Array.isArray(e.illegal)&&(e.illegal=Q1(...e.illegal))}function EB(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function wB(e,t){e.relevance===void 0&&(e.relevance=1)}var _B=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ci(n.beforeMatch,yT(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},SB=["of","and","for","in","not","or","if","then","parent","list","value"],CB="keyword";function _T(e,t,n=CB){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(i){Object.assign(r,_T(e[i],t,i))}),r;function o(i,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){let a=l.split("|");r[a[0]]=[i,TB(a[0],a[1])]})}}function TB(e,t){return t?Number(t):AB(e)?0:1}function AB(e){return SB.includes(e.toLowerCase())}var fT={},Si=e=>{},pT=(e,...t)=>{},qs=(e,t)=>{fT[`${e}/${t}`]||(fT[`${e}/${t}`]=!0)},Af=new Error;function ST(e,t,{key:n}){let r=0,o=e[n],i={},s={};for(let l=1;l<=t.length;l++)s[l+r]=o[l],i[l+r]=!0,r+=xT(t[l-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function NB(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Si("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Af;if(typeof e.beginScope!="object"||e.beginScope===null)throw Si("beginScope must be object"),Af;ST(e,e.begin,{key:"beginScope"}),e.begin=eb(e.begin,{joinWith:""})}}function MB(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Si("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Af;if(typeof e.endScope!="object"||e.endScope===null)throw Si("endScope must be object"),Af;ST(e,e.end,{key:"endScope"}),e.end=eb(e.end,{joinWith:""})}}function OB(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function RB(e){OB(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),NB(e),MB(e)}function DB(e){function t(s,l){return new RegExp(Fa(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,l]),this.matchAt+=xT(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let l=this.regexes.map(a=>a[1]);this.matcherRe=t(eb(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(l);if(!a)return null;let u=a.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return a.splice(0,u),Object.assign(a,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];let a=new n;return this.rules.slice(l).forEach(([u,c])=>a.addRule(u,c)),a.compile(),this.multiRegexes[l]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,a){this.rules.push([l,a]),a.type==="begin"&&this.count++}exec(l){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let u=a.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(s){let l=new r;return s.contains.forEach(a=>l.addRule(a.begin,{rule:a,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function i(s,l){let a=s;if(s.isCompiled)return a;[xB,EB,RB,_B].forEach(c=>c(s,l)),e.compilerExtensions.forEach(c=>c(s,l)),s.__beforeBegin=null,[vB,kB,wB].forEach(c=>c(s,l)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=_T(s.keywords,e.case_insensitive)),a.keywordPatternRe=t(u,!0),l&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(a.endRe=t(a.end)),a.terminatorEnd=Fa(a.end)||"",s.endsWithParent&&l.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(a.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return IB(c==="self"?s:c)})),s.contains.forEach(function(c){i(c,a)}),s.starts&&i(s.starts,l),a.matcher=o(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Lo(e.classNameAliases||{}),i(e)}function CT(e){return e?e.endsWithParent||CT(e.starts):!1}function IB(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Lo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:CT(e)?Lo(e,{starts:e.starts?Lo(e.starts):null}):Object.isFrozen(e)?Lo(e):e}var LB="11.11.1",X1=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},G1=bT,hT=Lo,mT=Symbol("nomatch"),PB=7,TT=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Z1};function a(S){return l.noHighlightRe.test(S)}function u(S){let M=S.className+" ";M+=S.parentNode?S.parentNode.className:"";let L=l.languageDetectRe.exec(M);if(L){let J=_(L[1]);return J||(pT(i.replace("{}",L[1])),pT("Falling back to no-highlight mode for this block.",S)),J?L[1]:"no-highlight"}return M.split(/\s+/).find(J=>a(J)||_(J))}function c(S,M,L){let J="",oe="";typeof M=="object"?(J=S,L=M.ignoreIllegals,oe=M.language):(qs("10.7.0","highlight(lang, code, ...args) has been deprecated."),qs("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,J=M),L===void 0&&(L=!0);let fe={code:J,language:oe};z("before:highlight",fe);let ge=fe.result?fe.result:d(fe.language,fe.code,L);return ge.code=fe.code,z("after:highlight",ge),ge}function d(S,M,L,J){let oe=Object.create(null);function fe(B,G){return B.keywords[G]}function ge(){if(!ee.keywords){ot.addText(_e);return}let B=0;ee.keywordPatternRe.lastIndex=0;let G=ee.keywordPatternRe.exec(_e),se="";for(;G;){se+=_e.substring(B,G.index);let be=rn.case_insensitive?G[0].toLowerCase():G[0],mt=fe(ee,be);if(mt){let[pr,DM]=mt;if(ot.addText(se),se="",oe[be]=(oe[be]||0)+1,oe[be]<=PB&&(uu+=DM),pr.startsWith("_"))se+=G[0];else{let IM=rn.classNameAliases[pr]||pr;ht(G[0],IM)}}else se+=G[0];B=ee.keywordPatternRe.lastIndex,G=ee.keywordPatternRe.exec(_e)}se+=_e.substring(B),ot.addText(se)}function pt(){if(_e==="")return;let B=null;if(typeof ee.subLanguage=="string"){if(!t[ee.subLanguage]){ot.addText(_e);return}B=d(ee.subLanguage,_e,!0,au[ee.subLanguage]),au[ee.subLanguage]=B._top}else B=p(_e,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&(uu+=B.relevance),ot.__addSublanguage(B._emitter,B.language)}function Pe(){ee.subLanguage!=null?pt():ge(),_e=""}function ht(B,G){B!==""&&(ot.startScope(G),ot.addText(B),ot.endScope())}function Gr(B,G){let se=1,be=G.length-1;for(;se<=be;){if(!B._emit[se]){se++;continue}let mt=rn.classNameAliases[B[se]]||B[se],pr=G[se];mt?ht(pr,mt):(_e=pr,ge(),_e=""),se++}}function su(B,G){return B.scope&&typeof B.scope=="string"&&ot.openNode(rn.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(ht(_e,rn.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),_e=""):B.beginScope._multi&&(Gr(B.beginScope,G),_e="")),ee=Object.create(B,{parent:{value:ee}}),ee}function ol(B,G,se){let be=Q5(B.endRe,se);if(be){if(B["on:end"]){let mt=new Tf(B);B["on:end"](G,mt),mt.isMatchIgnored&&(be=!1)}if(be){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return ol(B.parent,G,se)}function Lp(B){return ee.matcher.regexIndex===0?(_e+=B[0],1):(Up=!0,0)}function Pp(B){let G=B[0],se=B.rule,be=new Tf(se),mt=[se.__beforeBegin,se["on:begin"]];for(let pr of mt)if(pr&&(pr(B,be),be.isMatchIgnored))return Lp(G);return se.skip?_e+=G:(se.excludeBegin&&(_e+=G),Pe(),!se.returnBegin&&!se.excludeBegin&&(_e=G)),su(se,B),se.returnBegin?0:G.length}function Bp(B){let G=B[0],se=M.substring(B.index),be=ol(ee,B,se);if(!be)return mT;let mt=ee;ee.endScope&&ee.endScope._wrap?(Pe(),ht(G,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(Pe(),Gr(ee.endScope,B)):mt.skip?_e+=G:(mt.returnEnd||mt.excludeEnd||(_e+=G),Pe(),mt.excludeEnd&&(_e=G));do ee.scope&&ot.closeNode(),!ee.skip&&!ee.subLanguage&&(uu+=ee.relevance),ee=ee.parent;while(ee!==be.parent);return be.starts&&su(be.starts,B),mt.returnEnd?0:G.length}function Fp(){let B=[];for(let G=ee;G!==rn;G=G.parent)G.scope&&B.unshift(G.scope);B.forEach(G=>ot.openNode(G))}let Ui={};function lu(B,G){let se=G&&G[0];if(_e+=B,se==null)return Pe(),0;if(Ui.type==="begin"&&G.type==="end"&&Ui.index===G.index&&se===""){if(_e+=M.slice(G.index,G.index+1),!o){let be=new Error(`0 width match regex (${S})`);throw be.languageName=S,be.badRule=Ui.rule,be}return 1}if(Ui=G,G.type==="begin")return Pp(G);if(G.type==="illegal"&&!L){let be=new Error('Illegal lexeme "'+se+'" for mode "'+(ee.scope||"")+'"');throw be.mode=ee,be}else if(G.type==="end"){let be=Bp(G);if(be!==mT)return be}if(G.type==="illegal"&&se==="")return _e+=` -`,1;if(zp>1e5&&zp>G.index*3)throw new Error("potential infinite loop, way more iterations than matches");return _e+=se,se.length}let rn=_(S);if(!rn)throw Si(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');let Ee=DB(rn),Jr="",ee=J||Ee,au={},ot=new l.__emitter(l);Fp();let _e="",uu=0,$o=0,zp=0,Up=!1;try{if(rn.__emitTokens)rn.__emitTokens(M,ot);else{for(ee.matcher.considerAll();;){zp++,Up?Up=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=$o;let B=ee.matcher.exec(M);if(!B)break;let G=M.substring($o,B.index),se=lu(G,B);$o=B.index+se}lu(M.substring($o))}return ot.finalize(),Jr=ot.toHTML(),{language:S,value:Jr,relevance:uu,illegal:!1,_emitter:ot,_top:ee}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:S,value:G1(M),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:$o,context:M.slice($o-100,$o+100),mode:B.mode,resultSoFar:Jr},_emitter:ot};if(o)return{language:S,value:G1(M),illegal:!1,relevance:0,errorRaised:B,_emitter:ot,_top:ee};throw B}}function f(S){let M={value:G1(S),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return M._emitter.addText(S),M}function p(S,M){M=M||l.languages||Object.keys(t);let L=f(S),J=M.filter(_).filter(C).map(Pe=>d(Pe,S,!1));J.unshift(L);let oe=J.sort((Pe,ht)=>{if(Pe.relevance!==ht.relevance)return ht.relevance-Pe.relevance;if(Pe.language&&ht.language){if(_(Pe.language).supersetOf===ht.language)return 1;if(_(ht.language).supersetOf===Pe.language)return-1}return 0}),[fe,ge]=oe,pt=fe;return pt.secondBest=ge,pt}function h(S,M,L){let J=M&&n[M]||L;S.classList.add("hljs"),S.classList.add(`language-${J}`)}function m(S){let M=null,L=u(S);if(a(L)||(z("before:highlightElement",{el:S,language:L}),S.dataset.highlighted))return;if(S.children.length>0&&(l.ignoreUnescapedHTML,l.throwUnescapedHTML))throw new X1("One of your code blocks includes unescaped HTML.",S.innerHTML);M=S;let J=M.textContent,oe=L?c(J,{language:L,ignoreIllegals:!0}):p(J);S.innerHTML=oe.value,S.dataset.highlighted="yes",h(S,L,oe.language),S.result={language:oe.language,re:oe.relevance,relevance:oe.relevance},oe.secondBest&&(S.secondBest={language:oe.secondBest.language,relevance:oe.secondBest.relevance}),z("after:highlightElement",{el:S,result:oe,text:J})}function b(S){l=hT(l,S)}let g=()=>{v(),qs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){v(),qs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function v(){function S(){v()}if(document.readyState==="loading"){x||window.addEventListener("DOMContentLoaded",S,!1),x=!0;return}document.querySelectorAll(l.cssSelector).forEach(m)}function k(S,M){let L=null;try{L=M(e)}catch(J){if(Si("Language definition for '{}' could not be registered.".replace("{}",S)),o)Si(J);else throw J;L=s}L.name||(L.name=S),t[S]=L,L.rawDefinition=M.bind(null,e),L.aliases&&T(L.aliases,{languageName:S})}function E(S){delete t[S];for(let M of Object.keys(n))n[M]===S&&delete n[M]}function w(){return Object.keys(t)}function _(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function T(S,{languageName:M}){typeof S=="string"&&(S=[S]),S.forEach(L=>{n[L.toLowerCase()]=M})}function C(S){let M=_(S);return M&&!M.disableAutodetect}function F(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=M=>{S["before:highlightBlock"](Object.assign({block:M.el},M))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=M=>{S["after:highlightBlock"](Object.assign({block:M.el},M))})}function N(S){F(S),r.push(S)}function X(S){let M=r.indexOf(S);M!==-1&&r.splice(M,1)}function z(S,M){let L=S;r.forEach(function(J){J[L]&&J[L](M)})}function I(S){return qs("10.7.0","highlightBlock will be removed entirely in v12.0"),qs("10.7.0","Please use highlightElement now."),m(S)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:v,highlightElement:m,highlightBlock:I,configure:b,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:E,listLanguages:w,getLanguage:_,registerAliases:T,autoDetection:C,inherit:hT,addPlugin:N,removePlugin:X}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=LB,e.regex={concat:Ci,lookahead:yT,either:Q1,optional:Z5,anyNumberOfTimes:Y5};for(let S in Cf)typeof Cf[S]=="object"&&gT(Cf[S]);return Object.assign(e,Cf),e},Vs=TT({});Vs.newInstance=()=>TT({});AT.exports=Vs;Vs.HighlightJS=Vs;Vs.default=Vs});var Y3=Tt((pX,J3)=>{var py=!0,K3=!1,G3=!1;J3.exports=function(e,t){t&&(py=!t.enabled,K3=!!t.label,G3=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function Sz(e,t){return Oz(e[t])&&Rz(e[t-1])&&Dz(e[t-2])&&Iz(e[t])}function Cz(e,t){if(e.children.unshift(Tz(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),K3)if(G3){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(Mz(e.content,n,t))}else e.children.unshift(Az(t)),e.children.push(Nz(t))}function Tz(e,t){var n=new t("html_inline","",0),r=py?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function Az(e){var t=new e("html_inline","",0);return t.content="",t}function Mz(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function Oz(e){return e.type==="inline"}function Rz(e){return e.type==="paragraph_open"}function Dz(e){return e.type==="list_item_open"}function Iz(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var OM=j(yE());var ft=j(Be());var ri=j(Be()),s0;function xE(){return s0||(s0=acquireVsCodeApi()),s0}function vE(){let e=(0,ri.useRef)(xE()),t=(0,ri.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,ri.useCallback)(r=>{let o=i=>{r(i.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,ri.useEffect)(()=>{e.current=xE()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var kE=document.createElement("style");kE.textContent=`.button_Button { +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function kh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}var RR=typeof WeakMap=="function"?WeakMap:Map;function Vk(e,t,n){n=yr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){pc||(pc=!0,fm=r)},n}function qk(e,t,n){n=yr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(uo===null?uo=new Set([this]):uo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function tv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new RR;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=jR.bind(null,e,t,n),t.then(e,e))}function nv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function rv(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yr(-1,1),t.tag=2,ao(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var DR=wr.ReactCurrentOwner,Ft=!1;function Nt(e,t,n,r){t.child=e===null?xk(t,null,n,r):fs(t,e.child,n,r)}function ov(e,t,n,r,o){n=n.render;var i=t.ref;return ls(t,o),r=qm(e,t,n,r,i,o),n=Wm(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Er(e,t,o)):(Me&&n&&Rm(t),t.flags|=1,Nt(e,t,r,o),t.child)}function iv(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!t0(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Wk(e,t,i,r,o)):(e=ju(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Fl,n(s,r)&&e.ref===t.ref)return Er(e,t,o)}return t.flags|=1,e=fo(i,r),e.ref=t.ref,e.return=t,t.child=e}function Wk(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Fl(i,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Ft=!0);else return t.lanes=e.lanes,Er(e,t,o)}return rm(e,t,n,r,o)}function jk(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(ts,Kt),Kt|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(ts,Kt),Kt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ce(ts,Kt),Kt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ce(ts,Kt),Kt|=r;return Nt(e,t,o,n),t.child}function Kk(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rm(e,t,n,r,o){var i=Ut(n)?Jo:vt.current;return i=cs(t,i),ls(t,o),n=qm(e,t,n,r,i,o),r=Wm(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Er(e,t,o)):(Me&&r&&Rm(t),t.flags|=1,Nt(e,t,n,o),t.child)}function sv(e,t,n,r,o){if(Ut(n)){var i=!0;rc(t)}else i=!1;if(ls(t,o),t.stateNode===null)Vu(e,t),Hk(t,n,r),nm(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=cn(u):(u=Ut(n)?Jo:vt.current,u=cs(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&ev(t,s,r,u),Qr=!1;var f=t.memoizedState;s.state=f,ac(t,r,s,o),a=t.memoizedState,l!==r||f!==a||zt.current||Qr?(typeof c=="function"&&(tm(t,n,c,r),a=t.memoizedState),(l=Qr||Qx(t,n,l,r,f,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,kk(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Mn(t.type,l),s.props=u,d=t.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=cn(a):(a=Ut(n)?Jo:vt.current,a=cs(t,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||f!==a)&&ev(t,s,r,a),Qr=!1,f=t.memoizedState,s.state=f,ac(t,r,s,o);var h=t.memoizedState;l!==d||f!==h||zt.current||Qr?(typeof p=="function"&&(tm(t,n,p,r),h=t.memoizedState),(u=Qr||Qx(t,n,u,r,f,h,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return om(e,t,n,r,i,o)}function om(e,t,n,r,o,i){Kk(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Wx(t,n,!1),Er(e,t,i);r=t.stateNode,DR.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=fs(t,e.child,null,i),t.child=fs(t,null,l,i)):Nt(e,t,l,i),t.memoizedState=r.state,o&&Wx(t,n,!0),t.child}function Gk(e){var t=e.stateNode;t.pendingContext?qx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qx(e,t.context,!1),Um(e,t.containerInfo)}function lv(e,t,n,r,o){return ds(),Im(o),t.flags|=256,Nt(e,t,n,r),t.child}var im={dehydrated:null,treeContext:null,retryLane:0};function sm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Yk(e,t,n){var r=t.pendingProps,o=Re.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ce(Re,o&1),e===null)return Qh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Ac(s,r,0,null),e=Yo(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=sm(n),t.memoizedState=im,e):Gm(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return IR(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=fo(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=fo(l,i):(i=Yo(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?sm(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=im,r}return i=e.child,e=i.sibling,r=fo(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gm(e,t){return t=Ac({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Iu(e,t,n,r){return r!==null&&Im(r),fs(t,e.child,null,n),e=Gm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function IR(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=kh(Error(R(422))),Iu(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ac({mode:"visible",children:r.children},o,0,null),i=Yo(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&fs(t,e.child,null,s),t.child.memoizedState=sm(s),t.memoizedState=im,i);if((t.mode&1)===0)return Iu(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(R(419)),r=kh(i,r,void 0),Iu(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ft||l){if(r=Xe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,kr(e,o),In(r,e,o,-1))}return e0(),r=kh(Error(R(421))),Iu(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=KR.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Gt=lo(o.nextSibling),Yt=t,Me=!0,Rn=null,e!==null&&(sn[ln++]=gr,sn[ln++]=br,sn[ln++]=Zo,gr=e.id,br=e.overflow,Zo=t),t=Gm(t,r.children),t.flags|=4096,t)}function av(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),em(e.return,t,n)}function Eh(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Jk(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Nt(e,t,r.children,n),r=Re.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&av(e,n,t);else if(e.tag===19)av(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ce(Re,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&uc(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Eh(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&uc(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Eh(t,!0,n,null,i);break;case"together":Eh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vu(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qo|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=fo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function LR(e,t,n){switch(t.tag){case 3:Gk(t),ds();break;case 5:Ek(t);break;case 1:Ut(t.type)&&rc(t);break;case 4:Um(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ce(sc,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(Re,Re.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Yk(e,t,n):(Ce(Re,Re.current&1),e=Er(e,t,n),e!==null?e.sibling:null);Ce(Re,Re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Jk(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ce(Re,Re.current),r)break;return null;case 22:case 23:return t.lanes=0,jk(e,t,n)}return Er(e,t,n)}var Zk,lm,Xk,Qk;Zk=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lm=function(){};Xk=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ko(Kn.current);var i=null;switch(n){case"input":o=Mh(e,o),r=Mh(e,r),i=[];break;case"select":o=Ie({},o,{value:void 0}),r=Ie({},r,{value:void 0}),i=[];break;case"textarea":o=Dh(e,o),r=Dh(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=tc)}Lh(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ol.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o?.[u],r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ol.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ae("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Qk=function(e,t,n,r){n!==r&&(t.flags|=4)};function ml(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function PR(e,t,n){var r=t.pendingProps;switch(Dm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return Ut(t.type)&&nc(),yt(t),null;case 3:return r=t.stateNode,ps(),Te(zt),Te(vt),Hm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ru(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Rn!==null&&(mm(Rn),Rn=null))),lm(e,t),yt(t),null;case 5:$m(t);var o=Ko(Vl.current);if(n=t.type,e!==null&&t.stateNode!=null)Xk(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return yt(t),null}if(e=Ko(Kn.current),Ru(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Wn]=t,r[$l]=i,e=(t.mode&1)!==0,n){case"dialog":Ae("cancel",r),Ae("close",r);break;case"iframe":case"object":case"embed":Ae("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Wn]=t,e[$l]=r,Zk(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ph(n,r),n){case"dialog":Ae("cancel",e),Ae("close",e),o=r;break;case"iframe":case"object":case"embed":Ae("load",e),o=r;break;case"video":case"audio":for(o=0;oms&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=uc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Me)return yt(t),null}else 2*Ve()-i.renderingStartTime>ms&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ve(),t.sibling=null,n=Re.current,Ce(Re,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return Qm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Kt&1073741824)!==0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function BR(e,t){switch(Dm(t),t.tag){case 1:return Ut(t.type)&&nc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),Te(zt),Te(vt),Hm(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return $m(t),null;case 13:if(Te(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Re),null;case 4:return ps(),null;case 10:return Bm(t.type._context),null;case 22:case 23:return Qm(),null;case 24:return null;default:return null}}var Lu=!1,xt=!1,FR=typeof WeakSet=="function"?WeakSet:Set,U=null;function es(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function am(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var uv=!1;function zR(e,t){if(jh=Xu,e=ok(),Om(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kh={focusedElem:e,selectionRange:n},Xu=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,b=h.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:Mn(t.type,g),b);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(v){Fe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return h=uv,uv=!1,h}function Tl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&am(t,n,i)}o=o.next}while(o!==r)}}function Sc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function um(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function eE(e){var t=e.alternate;t!==null&&(e.alternate=null,eE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[$l],delete t[Jh],delete t[kR],delete t[ER])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tE(e){return e.tag===5||e.tag===3||e.tag===4}function cv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tc));else if(r!==4&&(e=e.child,e!==null))for(cm(e,t,n),e=e.sibling;e!==null;)cm(e,t,n),e=e.sibling}function dm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dm(e,t,n),e=e.sibling;e!==null;)dm(e,t,n),e=e.sibling}var it=null,On=!1;function Zr(e,t,n){for(n=n.child;n!==null;)nE(e,t,n),n=n.sibling}function nE(e,t,n){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(bc,n)}catch{}switch(n.tag){case 5:xt||es(n,t);case 6:var r=it,o=On;it=null,Zr(e,t,n),it=r,On=o,it!==null&&(On?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(On?(e=it,n=n.stateNode,e.nodeType===8?mh(e.parentNode,n):e.nodeType===1&&mh(e,n),Pl(e)):mh(it,n.stateNode));break;case 4:r=it,o=On,it=n.stateNode.containerInfo,On=!0,Zr(e,t,n),it=r,On=o;break;case 0:case 11:case 14:case 15:if(!xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&am(n,t,s),o=o.next}while(o!==r)}Zr(e,t,n);break;case 1:if(!xt&&(es(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Fe(n,t,l)}Zr(e,t,n);break;case 21:Zr(e,t,n);break;case 22:n.mode&1?(xt=(r=xt)||n.memoizedState!==null,Zr(e,t,n),xt=r):Zr(e,t,n);break;default:Zr(e,t,n)}}function dv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new FR),t.forEach(function(r){var o=GR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*$R(r/1960))-r,10e?16:e,ro===null)var r=!1;else{if(e=ro,ro=null,hc=0,(de&6)!==0)throw Error(R(331));var o=de;for(de|=4,U=e.current;U!==null;){var i=U,s=i.child;if((U.flags&16)!==0){var l=i.deletions;if(l!==null){for(var a=0;aVe()-Zm?Go(e,0):Jm|=n),$t(e,t)}function cE(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eu,Eu<<=1,(Eu&130023424)===0&&(Eu=4194304)));var n=Mt();e=kr(e,t),e!==null&&(Gl(e,t,n),$t(e,n))}function KR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cE(e,n)}function GR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),cE(e,n)}var dE;dE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||zt.current)Ft=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ft=!1,LR(e,t,n);Ft=(e.flags&131072)!==0}else Ft=!1,Me&&(t.flags&1048576)!==0&&mk(t,ic,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vu(e,t),e=t.pendingProps;var o=cs(t,vt.current);ls(t,n),o=qm(null,t,r,e,o,n);var i=Wm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ut(r)?(i=!0,rc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zm(t),o.updater=_c,t.stateNode=o,o._reactInternals=t,nm(t,r,e,n),t=om(null,t,r,!0,i,n)):(t.tag=0,Me&&i&&Rm(t),Nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=JR(r),e=Mn(r,e),o){case 0:t=rm(null,t,r,e,n);break e;case 1:t=sv(null,t,r,e,n);break e;case 11:t=ov(null,t,r,e,n);break e;case 14:t=iv(null,t,r,Mn(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),rm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),sv(e,t,r,o,n);case 3:e:{if(Gk(t),e===null)throw Error(R(387));r=t.pendingProps,i=t.memoizedState,o=i.element,kk(e,t),ac(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=hs(Error(R(423)),t),t=lv(e,t,r,n,o);break e}else if(r!==o){o=hs(Error(R(424)),t),t=lv(e,t,r,n,o);break e}else for(Gt=lo(t.stateNode.containerInfo.firstChild),Yt=t,Me=!0,Rn=null,n=xk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ds(),r===o){t=Er(e,t,n);break e}Nt(e,t,r,n)}t=t.child}return t;case 5:return Ek(t),e===null&&Qh(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Gh(r,o)?s=null:i!==null&&Gh(r,i)&&(t.flags|=32),Kk(e,t),Nt(e,t,s,n),t.child;case 6:return e===null&&Qh(t),null;case 13:return Yk(e,t,n);case 4:return Um(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fs(t,null,r,n):Nt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),ov(e,t,r,o,n);case 7:return Nt(e,t,t.pendingProps,n),t.child;case 8:return Nt(e,t,t.pendingProps.children,n),t.child;case 12:return Nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ce(sc,r._currentValue),r._currentValue=s,i!==null)if(Ln(i.value,s)){if(i.children===o.children&&!zt.current){t=Er(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=yr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),em(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(R(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),em(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ls(t,n),o=cn(o),r=r(o),t.flags|=1,Nt(e,t,r,n),t.child;case 14:return r=t.type,o=Mn(r,t.pendingProps),o=Mn(r.type,o),iv(e,t,r,o,n);case 15:return Wk(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mn(r,o),Vu(e,t),t.tag=1,Ut(r)?(e=!0,rc(t)):e=!1,ls(t,n),Hk(t,r,o),nm(t,r,o,n),om(null,t,r,!0,e,n);case 19:return Jk(e,t,n);case 22:return jk(e,t,n)}throw Error(R(156,t.tag))};function fE(e,t){return zv(e,t)}function YR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,n,r){return new YR(e,t,n,r)}function t0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function JR(e){if(typeof e=="function")return t0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vm)return 11;if(e===km)return 14}return 2}function fo(e,t){var n=e.alternate;return n===null?(n=an(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ju(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")t0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wi:return Yo(n.children,o,i,t);case xm:s=8,o|=8;break;case Ch:return e=an(12,n,t,o|2),e.elementType=Ch,e.lanes=i,e;case Ah:return e=an(13,n,t,o),e.elementType=Ah,e.lanes=i,e;case Th:return e=an(19,n,t,o),e.elementType=Th,e.lanes=i,e;case Ev:return Ac(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vv:s=10;break e;case kv:s=9;break e;case vm:s=11;break e;case km:s=14;break e;case Xr:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=an(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Yo(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Ac(e,t,n,r){return e=an(22,e,r,t),e.elementType=Ev,e.lanes=n,e.stateNode={isHidden:!1},e}function wh(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function _h(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ZR(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lh(0),this.expirationTimes=lh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lh(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function n0(e,t,n,r,o,i,s,l,a){return e=new ZR(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=an(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zm(i),e}function XR(e,t,n){var r=3{"use strict";function bE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bE)}catch{}}bE(),yE.exports=gE()});var vE=At(s0=>{"use strict";var xE=ys();s0.createRoot=xE.createRoot,s0.hydrateRoot=xE.hydrateRoot;var A$});var SE=At(Rc=>{"use strict";var rD=Be(),oD=Symbol.for("react.element"),iD=Symbol.for("react.fragment"),sD=Object.prototype.hasOwnProperty,lD=rD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aD={key:!0,ref:!0,__self:!0,__source:!0};function _E(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)sD.call(t,r)&&!aD.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:oD,type:e,key:i,ref:s,props:o,_owner:lD.current}}Rc.Fragment=iD;Rc.jsx=_E;Rc.jsxs=_E});var pe=At((R$,CE)=>{"use strict";CE.exports=SE()});var PE=At(LE=>{"use strict";var xs=Be();function cD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dD=typeof Object.is=="function"?Object.is:cD,fD=xs.useState,pD=xs.useEffect,hD=xs.useLayoutEffect,mD=xs.useDebugValue;function gD(e,t){var n=t(),r=fD({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return hD(function(){o.value=n,o.getSnapshot=t,a0(o)&&i({inst:o})},[e,n,t]),pD(function(){return a0(o)&&i({inst:o}),e(function(){a0(o)&&i({inst:o})})},[e]),mD(n),n}function a0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dD(e,n)}catch{return!0}}function bD(e,t){return t()}var yD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bD:gD;LE.useSyncExternalStore=xs.useSyncExternalStore!==void 0?xs.useSyncExternalStore:yD});var Dc=At((Q$,BE)=>{"use strict";BE.exports=PE()});var oS=At(rS=>{"use strict";var Od=Be(),_8=Dc();function S8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var C8=typeof Object.is=="function"?Object.is:S8,A8=_8.useSyncExternalStore,T8=Od.useRef,N8=Od.useEffect,M8=Od.useMemo,O8=Od.useDebugValue;rS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=T8(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=M8(function(){function a(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,C8(c,p))return h;var g=r(p);return o!==void 0&&o(h,g)?(c=p,h):(c=p,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,n,r,o]);var l=A8(e,i[0],i[1]);return N8(function(){s.hasValue=!0,s.value=l},[l]),O8(l),l}});var sS=At((hq,iS)=>{"use strict";iS.exports=oS()});var TA=At((mK,AA)=>{function mA(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&mA(n)}),e}var Tf=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function gA(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Lo(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var J5="",uA=e=>!!e.scope,Z5=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},Z1=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=gA(t)}openNode(t){if(!uA(t))return;let n=Z5(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){uA(t)&&(this.buffer+=J5)}value(){return this.buffer}span(t){this.buffer+=``}},cA=(e={})=>{let t={children:[]};return Object.assign(t,e),t},X1=class e{constructor(){this.rootNode=cA(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=cA({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},Q1=class extends X1{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Z1(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Fa(e){return e?typeof e=="string"?e:e.source:null}function bA(e){return Ci("(?=",e,")")}function X5(e){return Ci("(?:",e,")*")}function Q5(e){return Ci("(?:",e,")?")}function Ci(...e){return e.map(n=>Fa(n)).join("")}function eB(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function tb(...e){return"("+(eB(e).capture?"":"?:")+e.map(r=>Fa(r)).join("|")+")"}function yA(e){return new RegExp(e.toString()+"|").exec("").length-1}function tB(e,t){let n=e&&e.exec(t);return n&&n.index===0}var nB=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nb(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,i=Fa(r),s="";for(;i.length>0;){let l=nB.exec(i);if(!l){s+=i;break}s+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+o):(s+=l[0],l[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}var rB=/\b\B/,xA="[a-zA-Z]\\w*",rb="[a-zA-Z_]\\w*",vA="\\b\\d+(\\.\\d+)?",kA="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",EA="\\b(0b[01]+)",oB="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",iB=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Ci(t,/.*\b/,e.binary,/\b.*/)),Lo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},za={begin:"\\\\[\\s\\S]",relevance:0},sB={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[za]},lB={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[za]},aB={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Mf=function(e,t,n={}){let r=Lo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=tb("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ci(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},uB=Mf("//","$"),cB=Mf("/\\*","\\*/"),dB=Mf("#","$"),fB={scope:"number",begin:vA,relevance:0},pB={scope:"number",begin:kA,relevance:0},hB={scope:"number",begin:EA,relevance:0},mB={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[za,{begin:/\[/,end:/\]/,relevance:0,contains:[za]}]},gB={scope:"title",begin:xA,relevance:0},bB={scope:"title",begin:rb,relevance:0},yB={begin:"\\.\\s*"+rb,relevance:0},xB=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},Af=Object.freeze({__proto__:null,APOS_STRING_MODE:sB,BACKSLASH_ESCAPE:za,BINARY_NUMBER_MODE:hB,BINARY_NUMBER_RE:EA,COMMENT:Mf,C_BLOCK_COMMENT_MODE:cB,C_LINE_COMMENT_MODE:uB,C_NUMBER_MODE:pB,C_NUMBER_RE:kA,END_SAME_AS_BEGIN:xB,HASH_COMMENT_MODE:dB,IDENT_RE:xA,MATCH_NOTHING_RE:rB,METHOD_GUARD:yB,NUMBER_MODE:fB,NUMBER_RE:vA,PHRASAL_WORDS_MODE:aB,QUOTE_STRING_MODE:lB,REGEXP_MODE:mB,RE_STARTERS_RE:oB,SHEBANG:iB,TITLE_MODE:gB,UNDERSCORE_IDENT_RE:rb,UNDERSCORE_TITLE_MODE:bB});function vB(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function kB(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function EB(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=vB,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function wB(e,t){Array.isArray(e.illegal)&&(e.illegal=tb(...e.illegal))}function _B(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function SB(e,t){e.relevance===void 0&&(e.relevance=1)}var CB=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ci(n.beforeMatch,bA(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},AB=["of","and","for","in","not","or","if","then","parent","list","value"],TB="keyword";function wA(e,t,n=TB){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(i){Object.assign(r,wA(e[i],t,i))}),r;function o(i,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){let a=l.split("|");r[a[0]]=[i,NB(a[0],a[1])]})}}function NB(e,t){return t?Number(t):MB(e)?0:1}function MB(e){return AB.includes(e.toLowerCase())}var dA={},Si=e=>{},fA=(e,...t)=>{},Vs=(e,t)=>{dA[`${e}/${t}`]||(dA[`${e}/${t}`]=!0)},Nf=new Error;function _A(e,t,{key:n}){let r=0,o=e[n],i={},s={};for(let l=1;l<=t.length;l++)s[l+r]=o[l],i[l+r]=!0,r+=yA(t[l-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function OB(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Si("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Nf;if(typeof e.beginScope!="object"||e.beginScope===null)throw Si("beginScope must be object"),Nf;_A(e,e.begin,{key:"beginScope"}),e.begin=nb(e.begin,{joinWith:""})}}function RB(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Si("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Nf;if(typeof e.endScope!="object"||e.endScope===null)throw Si("endScope must be object"),Nf;_A(e,e.end,{key:"endScope"}),e.end=nb(e.end,{joinWith:""})}}function DB(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function IB(e){DB(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),OB(e),RB(e)}function LB(e){function t(s,l){return new RegExp(Fa(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,l]),this.matchAt+=yA(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let l=this.regexes.map(a=>a[1]);this.matcherRe=t(nb(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(l);if(!a)return null;let u=a.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return a.splice(0,u),Object.assign(a,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];let a=new n;return this.rules.slice(l).forEach(([u,c])=>a.addRule(u,c)),a.compile(),this.multiRegexes[l]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,a){this.rules.push([l,a]),a.type==="begin"&&this.count++}exec(l){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let u=a.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(s){let l=new r;return s.contains.forEach(a=>l.addRule(a.begin,{rule:a,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function i(s,l){let a=s;if(s.isCompiled)return a;[kB,_B,IB,CB].forEach(c=>c(s,l)),e.compilerExtensions.forEach(c=>c(s,l)),s.__beforeBegin=null,[EB,wB,SB].forEach(c=>c(s,l)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=wA(s.keywords,e.case_insensitive)),a.keywordPatternRe=t(u,!0),l&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(a.endRe=t(a.end)),a.terminatorEnd=Fa(a.end)||"",s.endsWithParent&&l.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(a.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return PB(c==="self"?s:c)})),s.contains.forEach(function(c){i(c,a)}),s.starts&&i(s.starts,l),a.matcher=o(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Lo(e.classNameAliases||{}),i(e)}function SA(e){return e?e.endsWithParent||SA(e.starts):!1}function PB(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Lo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:SA(e)?Lo(e,{starts:e.starts?Lo(e.starts):null}):Object.isFrozen(e)?Lo(e):e}var BB="11.11.1",eb=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},J1=gA,pA=Lo,hA=Symbol("nomatch"),FB=7,CA=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Q1};function a(S){return l.noHighlightRe.test(S)}function u(S){let M=S.className+" ";M+=S.parentNode?S.parentNode.className:"";let L=l.languageDetectRe.exec(M);if(L){let Y=_(L[1]);return Y||(fA(i.replace("{}",L[1])),fA("Falling back to no-highlight mode for this block.",S)),Y?L[1]:"no-highlight"}return M.split(/\s+/).find(Y=>a(Y)||_(Y))}function c(S,M,L){let Y="",oe="";typeof M=="object"?(Y=S,L=M.ignoreIllegals,oe=M.language):(Vs("10.7.0","highlight(lang, code, ...args) has been deprecated."),Vs("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,Y=M),L===void 0&&(L=!0);let fe={code:Y,language:oe};z("before:highlight",fe);let ge=fe.result?fe.result:d(fe.language,fe.code,L);return ge.code=fe.code,z("after:highlight",ge),ge}function d(S,M,L,Y){let oe=Object.create(null);function fe(B,G){return B.keywords[G]}function ge(){if(!ee.keywords){ot.addText(_e);return}let B=0;ee.keywordPatternRe.lastIndex=0;let G=ee.keywordPatternRe.exec(_e),se="";for(;G;){se+=_e.substring(B,G.index);let be=rn.case_insensitive?G[0].toLowerCase():G[0],mt=fe(ee,be);if(mt){let[pr,RM]=mt;if(ot.addText(se),se="",oe[be]=(oe[be]||0)+1,oe[be]<=FB&&(uu+=RM),pr.startsWith("_"))se+=G[0];else{let DM=rn.classNameAliases[pr]||pr;ht(G[0],DM)}}else se+=G[0];B=ee.keywordPatternRe.lastIndex,G=ee.keywordPatternRe.exec(_e)}se+=_e.substring(B),ot.addText(se)}function pt(){if(_e==="")return;let B=null;if(typeof ee.subLanguage=="string"){if(!t[ee.subLanguage]){ot.addText(_e);return}B=d(ee.subLanguage,_e,!0,au[ee.subLanguage]),au[ee.subLanguage]=B._top}else B=p(_e,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&(uu+=B.relevance),ot.__addSublanguage(B._emitter,B.language)}function Pe(){ee.subLanguage!=null?pt():ge(),_e=""}function ht(B,G){B!==""&&(ot.startScope(G),ot.addText(B),ot.endScope())}function Gr(B,G){let se=1,be=G.length-1;for(;se<=be;){if(!B._emit[se]){se++;continue}let mt=rn.classNameAliases[B[se]]||B[se],pr=G[se];mt?ht(pr,mt):(_e=pr,ge(),_e=""),se++}}function su(B,G){return B.scope&&typeof B.scope=="string"&&ot.openNode(rn.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(ht(_e,rn.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),_e=""):B.beginScope._multi&&(Gr(B.beginScope,G),_e="")),ee=Object.create(B,{parent:{value:ee}}),ee}function ol(B,G,se){let be=tB(B.endRe,se);if(be){if(B["on:end"]){let mt=new Tf(B);B["on:end"](G,mt),mt.isMatchIgnored&&(be=!1)}if(be){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return ol(B.parent,G,se)}function Pp(B){return ee.matcher.regexIndex===0?(_e+=B[0],1):($p=!0,0)}function Bp(B){let G=B[0],se=B.rule,be=new Tf(se),mt=[se.__beforeBegin,se["on:begin"]];for(let pr of mt)if(pr&&(pr(B,be),be.isMatchIgnored))return Pp(G);return se.skip?_e+=G:(se.excludeBegin&&(_e+=G),Pe(),!se.returnBegin&&!se.excludeBegin&&(_e=G)),su(se,B),se.returnBegin?0:G.length}function Fp(B){let G=B[0],se=M.substring(B.index),be=ol(ee,B,se);if(!be)return hA;let mt=ee;ee.endScope&&ee.endScope._wrap?(Pe(),ht(G,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(Pe(),Gr(ee.endScope,B)):mt.skip?_e+=G:(mt.returnEnd||mt.excludeEnd||(_e+=G),Pe(),mt.excludeEnd&&(_e=G));do ee.scope&&ot.closeNode(),!ee.skip&&!ee.subLanguage&&(uu+=ee.relevance),ee=ee.parent;while(ee!==be.parent);return be.starts&&su(be.starts,B),mt.returnEnd?0:G.length}function zp(){let B=[];for(let G=ee;G!==rn;G=G.parent)G.scope&&B.unshift(G.scope);B.forEach(G=>ot.openNode(G))}let Ui={};function lu(B,G){let se=G&&G[0];if(_e+=B,se==null)return Pe(),0;if(Ui.type==="begin"&&G.type==="end"&&Ui.index===G.index&&se===""){if(_e+=M.slice(G.index,G.index+1),!o){let be=new Error(`0 width match regex (${S})`);throw be.languageName=S,be.badRule=Ui.rule,be}return 1}if(Ui=G,G.type==="begin")return Bp(G);if(G.type==="illegal"&&!L){let be=new Error('Illegal lexeme "'+se+'" for mode "'+(ee.scope||"")+'"');throw be.mode=ee,be}else if(G.type==="end"){let be=Fp(G);if(be!==hA)return be}if(G.type==="illegal"&&se==="")return _e+=` +`,1;if(Up>1e5&&Up>G.index*3)throw new Error("potential infinite loop, way more iterations than matches");return _e+=se,se.length}let rn=_(S);if(!rn)throw Si(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');let Ee=LB(rn),Yr="",ee=Y||Ee,au={},ot=new l.__emitter(l);zp();let _e="",uu=0,$o=0,Up=0,$p=!1;try{if(rn.__emitTokens)rn.__emitTokens(M,ot);else{for(ee.matcher.considerAll();;){Up++,$p?$p=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=$o;let B=ee.matcher.exec(M);if(!B)break;let G=M.substring($o,B.index),se=lu(G,B);$o=B.index+se}lu(M.substring($o))}return ot.finalize(),Yr=ot.toHTML(),{language:S,value:Yr,relevance:uu,illegal:!1,_emitter:ot,_top:ee}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:S,value:J1(M),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:$o,context:M.slice($o-100,$o+100),mode:B.mode,resultSoFar:Yr},_emitter:ot};if(o)return{language:S,value:J1(M),illegal:!1,relevance:0,errorRaised:B,_emitter:ot,_top:ee};throw B}}function f(S){let M={value:J1(S),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return M._emitter.addText(S),M}function p(S,M){M=M||l.languages||Object.keys(t);let L=f(S),Y=M.filter(_).filter(C).map(Pe=>d(Pe,S,!1));Y.unshift(L);let oe=Y.sort((Pe,ht)=>{if(Pe.relevance!==ht.relevance)return ht.relevance-Pe.relevance;if(Pe.language&&ht.language){if(_(Pe.language).supersetOf===ht.language)return 1;if(_(ht.language).supersetOf===Pe.language)return-1}return 0}),[fe,ge]=oe,pt=fe;return pt.secondBest=ge,pt}function h(S,M,L){let Y=M&&n[M]||L;S.classList.add("hljs"),S.classList.add(`language-${Y}`)}function g(S){let M=null,L=u(S);if(a(L)||(z("before:highlightElement",{el:S,language:L}),S.dataset.highlighted))return;if(S.children.length>0&&(l.ignoreUnescapedHTML,l.throwUnescapedHTML))throw new eb("One of your code blocks includes unescaped HTML.",S.innerHTML);M=S;let Y=M.textContent,oe=L?c(Y,{language:L,ignoreIllegals:!0}):p(Y);S.innerHTML=oe.value,S.dataset.highlighted="yes",h(S,L,oe.language),S.result={language:oe.language,re:oe.relevance,relevance:oe.relevance},oe.secondBest&&(S.secondBest={language:oe.secondBest.language,relevance:oe.secondBest.relevance}),z("after:highlightElement",{el:S,result:oe,text:Y})}function b(S){l=pA(l,S)}let m=()=>{v(),Vs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){v(),Vs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function v(){function S(){v()}if(document.readyState==="loading"){x||window.addEventListener("DOMContentLoaded",S,!1),x=!0;return}document.querySelectorAll(l.cssSelector).forEach(g)}function k(S,M){let L=null;try{L=M(e)}catch(Y){if(Si("Language definition for '{}' could not be registered.".replace("{}",S)),o)Si(Y);else throw Y;L=s}L.name||(L.name=S),t[S]=L,L.rawDefinition=M.bind(null,e),L.aliases&&A(L.aliases,{languageName:S})}function E(S){delete t[S];for(let M of Object.keys(n))n[M]===S&&delete n[M]}function w(){return Object.keys(t)}function _(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function A(S,{languageName:M}){typeof S=="string"&&(S=[S]),S.forEach(L=>{n[L.toLowerCase()]=M})}function C(S){let M=_(S);return M&&!M.disableAutodetect}function F(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=M=>{S["before:highlightBlock"](Object.assign({block:M.el},M))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=M=>{S["after:highlightBlock"](Object.assign({block:M.el},M))})}function N(S){F(S),r.push(S)}function X(S){let M=r.indexOf(S);M!==-1&&r.splice(M,1)}function z(S,M){let L=S;r.forEach(function(Y){Y[L]&&Y[L](M)})}function I(S){return Vs("10.7.0","highlightBlock will be removed entirely in v12.0"),Vs("10.7.0","Please use highlightElement now."),g(S)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:v,highlightElement:g,highlightBlock:I,configure:b,initHighlighting:m,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:E,listLanguages:w,getLanguage:_,registerAliases:A,autoDetection:C,inherit:pA,addPlugin:N,removePlugin:X}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=BB,e.regex={concat:Ci,lookahead:bA,either:tb,optional:Q5,anyNumberOfTimes:X5};for(let S in Af)typeof Af[S]=="object"&&mA(Af[S]);return Object.assign(e,Af),e},qs=CA({});qs.newInstance=()=>CA({});AA.exports=qs;qs.HighlightJS=qs;qs.default=qs});var Y3=At((mX,G3)=>{var my=!0,j3=!1,K3=!1;G3.exports=function(e,t){t&&(my=!t.enabled,j3=!!t.label,K3=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function Az(e,t){return Dz(e[t])&&Iz(e[t-1])&&Lz(e[t-2])&&Pz(e[t])}function Tz(e,t){if(e.children.unshift(Nz(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),j3)if(K3){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(Rz(e.content,n,t))}else e.children.unshift(Mz(t)),e.children.push(Oz(t))}function Nz(e,t){var n=new t("html_inline","",0),r=my?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function Mz(e){var t=new e("html_inline","",0);return t.content="",t}function Rz(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function Dz(e){return e.type==="inline"}function Iz(e){return e.type==="paragraph_open"}function Lz(e){return e.type==="list_item_open"}function Pz(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var MM=j(vE());var ft=j(Be());var ri=j(Be()),l0;function kE(){return l0||(l0=acquireVsCodeApi()),l0}function EE(){let e=(0,ri.useRef)(kE()),t=(0,ri.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,ri.useCallback)(r=>{let o=i=>{r(i.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,ri.useEffect)(()=>{e.current=kE()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var wE=document.createElement("style");wE.textContent=`.button_Button { padding: 8px 16px; border-radius: 4px; border: 1px solid transparent; @@ -40,7 +40,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,J=M),L===void 0&& background-color: #45494e; } -`;document.head.appendChild(kE);var cD=j(pe());var SE=document.createElement("style");SE.textContent=`.container_Input { +`;document.head.appendChild(wE);var uD=j(pe());var AE=document.createElement("style");AE.textContent=`.container_Input { margin-bottom: 16px; } @@ -75,7 +75,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,J=M),L===void 0&& margin-top: 4px; } -`;document.head.appendChild(SE);var CE=j(pe());var TE=document.createElement("style");TE.textContent=`.container_Select { +`;document.head.appendChild(AE);var TE=j(pe());var NE=document.createElement("style");NE.textContent=`.container_Select { margin-bottom: 16px; } @@ -111,7 +111,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,J=M),L===void 0&& margin-top: 4px; } -`;document.head.appendChild(TE);var AE=j(pe());var NE=document.createElement("style");NE.textContent=`.container_TextArea { +`;document.head.appendChild(NE);var ME=j(pe());var OE=document.createElement("style");OE.textContent=`.container_TextArea { margin-bottom: 16px; } @@ -148,7 +148,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,J=M),L===void 0&& margin-top: 4px; } -`;document.head.appendChild(NE);var ME=j(pe());var OE=document.createElement("style");OE.textContent=`.badge_Badge { +`;document.head.appendChild(OE);var RE=j(pe());var DE=document.createElement("style");DE.textContent=`.badge_Badge { display: inline-flex; align-items: center; gap: 4px; @@ -200,19 +200,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`),oe=S,J=M),L===void 0&& background-color: rgba(0, 0, 0, 0.15); } -`;document.head.appendChild(OE);var RE=j(pe());var rl=j(Be());var Sa=j(Be(),1),Ao=j(Be(),1),dS=j(ys(),1),fS=j(Dc(),1),Lr=j(pe(),1);function kt(e){this.content=e}kt.prototype={constructor:kt,find:function(e){for(var t=0;t>1}};kt.from=function(e){if(e instanceof kt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new kt(t)};var a0=kt;function WE(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=WE(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function jE(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ut&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(l.isText?l=l.cut(Math.max(0,t-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,t-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?Ic(n+1,i):Ic(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};ce.none=[];var si=class extends Error{},P=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=GE(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(KE(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(A.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new e(t,r,o)}};P.empty=new P(A.empty,0,0);function KE(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:l}=e.findIndex(n);if(o==t||i.isText){if(l!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(KE(i.content,t-o-1,n-o-1)))}function GE(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=GE(s.content,t-i-1,n,s);return l&&e.replaceChild(o,s.copy(l))}function vD(e,t,n){if(n.openStart>e.depth)throw new si("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new si("Inconsistent open depths");return JE(e,t,n,0)}function JE(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Xl(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(oi(e.nodeAfter,r),i++));for(let l=i;lo&&d0(e,t,o+1),s=r.depth>o&&d0(n,r,o+1),l=[];return Xl(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(YE(i,s),oi(ii(i,ZE(e,t,n,r,o+1)),l)):(i&&oi(ii(i,Bc(e,t,o+1)),l),Xl(t,n,o,l),s&&oi(ii(s,Bc(n,r,o+1)),l)),Xl(r,null,o,l),new A(l)}function Bc(e,t,n){let r=[];if(Xl(null,e,n,r),e.depth>n){let o=d0(e,t,n+1);oi(ii(o,Bc(e,t,n+1)),r)}return Xl(t,null,n,r),new A(r)}function kD(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(A.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Fc=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new li(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new e(n,r,i)}static resolveCached(t,n){let r=PE.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),XE(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=A.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=A.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Ht.prototype.text=void 0;var p0=class e extends Ht{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):XE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function XE(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var ai=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new h0(t,n);if(r.next==null)return e.empty;let o=QE(r);r.next&&r.err("Unexpected trailing text");let i=MD(ND(o));return OD(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` -`)}};ai.empty=new ai(!0);var h0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function QE(e){let t=[];do t.push(_D(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function _D(e){let t=[];do t.push(SD(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function SD(e){let t=AD(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=CD(e,t);else break;return t}function BE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function CD(e,t){let n=BE(e),r=n;return e.eat(",")&&(e.next!="}"?r=BE(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function TD(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function AD(e){if(e.eat("(")){let t=QE(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=TD(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function ND(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,l,a){let u={term:a,to:l};return t[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{e[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new ai(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:nw(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ht(this,this.computeAttrs(t),A.from(n),ce.setFrom(r))}createChecked(t=null,n,r){return n=A.from(n),this.checkContent(n),new Ht(this,this.computeAttrs(t),n,ce.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=A.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(A.empty,!0);return i?new Ht(this,t,n.append(i),ce.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new e(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function RD(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var m0=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?RD(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},ea=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=ow(t,o.attrs),this.excluded=null;let i=tw(this.attrs);this.instance=i?new ce(this,i):null}create(t=null){return!t&&this.instance?this.instance:new ce(this,nw(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new e(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}},yo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=a0.from(t.nodes),n.marks=a0.from(t.marks||{}),this.nodes=zc.compile(this.spec.nodes,this),this.marks=ea.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=ai.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?zE(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:zE(this,s.split(" "))}this.nodeFromJSON=o=>Ht.fromJSON(this,o),this.markFromJSON=o=>ce.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof zc){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new p0(r,r.defaultAttrs,t,ce.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function zE(e,t){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function DD(e){return e.tag!=null}function ID(e){return e.style!=null}var fn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(DD(o))this.tags.push(o);else if(ID(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Uc(this,n,!1);return r.addAll(t,ce.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Uc(this,n,!0);return r.addAll(t,ce.none,n.from,n.to),P.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=$E(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=$E(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},iw={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},LD={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},sw={ol:!0,ul:!0},ta=1,g0=2,Ql=4;function UE(e,t,n){return t!=null?(t?ta:0)|(t==="full"?g0:0):e&&e.whitespace=="pre"?ta|g0:n&~Ql}var vs=class{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=ce.none,this.match=i||(s&Ql?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(A.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ta)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=A.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(A.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!iw.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Uc=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=UE(null,n.preserveWhitespace,0)|(r?Ql:0);o?i=new vs(o.type,o.attrs,ce.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new vs(null,null,ce.none,!0,null,s):i=new vs(t.schema.topNodeType,null,ce.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&g0?"full":this.localPreserveWS||(o.options&ta)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` -`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,r),this.findAround(t,a,!1)}i&&this.sync(l)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,l=o==null?null:t.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],u=a.findWrapping(t);if(u&&(!o||o.length>u.length+l)&&(o=u,i=a,!u.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(u.type):HE(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new vs(t,n,a,o,null,l)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ta)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function PD(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&sw.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function BD(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function $E(e){let t={};for(let n in e)t[n]=e[n];return t}function HE(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Lc(c0(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Lc(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=qE(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return qE(t.marks)}};function qE(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function c0(e){return e.document||window.document}var VE=new WeakMap;function FD(e){let t=VE.get(e);return t===void 0&&VE.set(e,t=zD(e)),t}function zD(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,a=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:h}=Lc(e,f,n,r);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}var uw=65535,cw=Math.pow(2,16);function UD(e,t){return e+t*cw}function lw(e){return e&uw}function $D(e){return(e-(e&uw))/cw}var dw=1,fw=2,$c=4,pw=8,oa=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&pw)>0}get deletedBefore(){return(this.delInfo&(dw|$c))>0}get deletedAfter(){return(this.delInfo&(fw|$c))>0}get deletedAcross(){return(this.delInfo&$c)>0}},Sr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=lw(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,p=a+o+(f<0?0:c);if(r)return p;let h=t==(n<0?a:d)?null:UD(l/3,t-a),m=t==a?fw:t==d?dw:$c;return(n<0?t!=a:t!=d)&&(m|=pw),new oa(p,m,h)}o+=c-u}return r?t+o:new oa(t+o,0,null)}touches(t,n){let r=0,o=lw(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+i],c=a+u;if(t<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,i)}invert(){return new Cr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("addMark",sa);var Cr=class e extends Qe{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new P(E0(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,r)}invert(){return new sa(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("removeMark",Cr);var la=class e extends Qe{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return at.fromReplace(t,this.pos,this.pos+1,new P(A.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,P.fromJSON(t,n.slice),n.insert,!!n.structure)}};Qe.jsonID("replaceAround",je);function v0(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function HD(e,t,n,r){let o=[],i=[],s,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+a.nodeSize,n),h=r.addToSet(d);for(let m=0;me.step(a)),i.forEach(a=>e.step(a))}function qD(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof ea){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ce.step(new Cr(s.from,s.to,s.style)))}function w0(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],l=t+1;for(let a=0;a=0;a--)e.step(s[a])}function VD(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Tr(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,i=0;;--r){let s=e.$from.node(r),l=e.$from.index(r)+o,a=e.$to.indexAfter(r)-i;if(rn;h--)m||r.index(h)>0?(m=!0,c=A.from(r.node(h).copy(c)),d++):a--;let f=A.empty,p=0;for(let h=i,m=!1;h>n;h--)m||o.after(h+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=A.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new je(o,i,o,i,new P(r,0,0),n.length,!0))}function JD(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,l)=>{let a=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,a)&&YD(e.doc,e.mapping.slice(i).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&mw(e,s,l,i),w0(e,e.mapping.slice(i).map(l,1),r,void 0,u===null);let c=e.mapping.slice(i),d=c.map(l,1),f=c.map(l+s.nodeSize,1);return e.step(new je(d,f,d+1,f-1,new P(A.from(r.create(a,null,s.marks)),0,0),1,!0)),u===!0&&hw(e,s,l,i),!1}})}function hw(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let a=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(a,a+1,t.type.schema.linebreakReplacement.create())}}})}function mw(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` -`))}})}function YD(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function ZD(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new je(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new P(A.from(s),0,0),1,!0))}function Qt(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function XD(e,t,n=1,r){let o=e.doc.resolve(t),i=A.empty,s=A.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=A.from(o.node(l).copy(i));let c=r&&r[u];s=A.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}e.step(new Et(t,t,new P(i.append(s),n,n),!0))}function pn(e,t){let n=e.resolve(t),r=n.index();return gw(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function QD(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&gw(i,s)&&r.node(o).canReplace(l,l+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function e6(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let l=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);mw(e,c.node(),c.before(),l)}s.inlineContent&&w0(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=e.mapping.slice(l),u=a.map(t-n);if(e.step(new Et(u,a.map(t+n,-1),P.empty,!0)),r===!0){let c=e.doc.resolve(u);hw(e,c.node(),c.before(),e.steps.length)}return e}function t6(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function aa(e,t,n=t,r=P.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return bw(o,i,r)?new Et(t,n,r):new k0(o,i,r).fit()}function bw(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var k0=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=A.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=A.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new P(i,s,l);return t>-1?new je(r.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new Et(r.pos,o.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=y0(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(A.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=y0(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new P(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=y0(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new P(na(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new P(na(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m1||a==0||m.content.size)&&(d=b,c.push(yw(m.mark(f.allowedMarks(m.marks)),u==1?a:0,u==l.childCount?p:-1)))}let h=u==l.childCount;h||(p=-1),this.placed=ra(this.placed,n,A.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=l;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=x0(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ra(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=ra(this.placed,this.depth,A.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(A.empty,!0);n.childCount&&(this.placed=ra(this.placed,this.frontier.length,n))}};function na(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(na(e.firstChild.content,t-1,n)))}function ra(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ra(e.lastChild.content,t-1,n)))}function y0(e,t){for(let n=0;n1&&(r=r.replaceChild(0,yw(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(A.empty,!0)))),e.copy(r)}function x0(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!n6(n,i.content,s)?l:null}function n6(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==p&&s.splice(1,0,-f)}let a=s.indexOf(l),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=r6(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(l)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),n=i.after(p))}}function xw(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(A.empty,!0))}return e}function i6(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=t6(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new P(A.from(r),0,0))}function s6(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=vw(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return e.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function vw(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}var Hc=class e extends Qe{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return at.fromReplace(t,this.pos,this.pos+1,new P(A.from(o),0,n.isLeaf?0:1))}getMap(){return Sr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};Qe.jsonID("attr",Hc);var qc=class e extends Qe{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return at.ok(r)}getMap(){return Sr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};Qe.jsonID("docAttr",qc);var Es=class extends Error{};Es=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Es.prototype=Object.create(Error.prototype);Es.prototype.constructor=Es;Es.prototype.name="TransformError";var xo=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new ia}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Es(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=P.empty){let o=aa(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new P(A.from(r),0,0))}delete(t,n){return this.replace(t,n,P.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return o6(this,t,n,r),this}replaceRangeWith(t,n,r){return i6(this,t,n,r),this}deleteRange(t,n){return s6(this,t,n),this}lift(t,n){return WD(this,t,n),this}join(t,n=1){return e6(this,t,n),this}wrap(t,n){return GD(this,t,n),this}setBlockType(t,n=t,r,o=null){return JD(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return ZD(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Hc(t,n,r)),this}setDocAttribute(t,n){return this.step(new qc(t,n)),this}addNodeMark(t,n){return this.step(new la(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ce)n.isInSet(r.marks)&&this.step(new ks(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new ks(t,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(t,n=1,r){return XD(this,t,n,r),this}addMark(t,n,r){return HD(this,t,n,r),this}removeMark(t,n,r){return qD(this,t,n,r),this}clearIncompatible(t,n,r){return w0(this,t,n,r),this}};var _0=Object.create(null),W=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Ss(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?_s(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):_s(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Rt(t.node(0))}static atStart(t){return _s(t,t,0,0,1)||new Rt(t)}static atEnd(t){return _s(t,t,t.content.size,t.childCount,-1)||new Rt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=_0[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in _0)throw new RangeError("Duplicate use of selection JSON ID "+t);return _0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return H.between(this.$anchor,this.$head).getBookmark()}};W.prototype.visible=!0;var Ss=class{constructor(t,n){this.$from=t,this.$to=n}},kw=!1;function Ew(e){!kw&&!e.parent.inlineContent&&(kw=!0)}var H=class e extends W{constructor(t,n=t){Ew(t),Ew(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return W.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=P.empty){if(super.replace(t,n),n==P.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new jc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=W.findFrom(n,r,!0)||W.findFrom(n,-r,!0);if(i)n=i.$head;else return W.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(W.findFrom(t,-r,!0)||W.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let l=t.child(s);if(l.isAtom){if(!i&&$.isSelectable(l))return $.create(e,n-(o<0?l.nodeSize:0))}else{let a=_s(e,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function ww(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var _w=1,Wc=2,Sw=4,T0=class extends xo{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Wc,this}ensureMarks(t){return ce.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Wc)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Wc,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ce.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(W.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Sw,this}get scrolledIntoView(){return(this.updated&Sw)>0}};function Cw(e,t){return!t||!e?e:e.bind(t)}var ci=class{constructor(t,n,r){this.name=t,this.init=Cw(n.init,r),this.apply=Cw(n.apply,r)}},a6=[new ci("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new ci("selection",{init(e,t){return e.selection||W.atStart(t.doc)},apply(e){return e.selection}}),new ci("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ci("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],ua=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=a6.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ci(r.key,r.spec.state,r))})}},Kc=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new ua(t.schema,t.plugins),i=new e(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ht.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=W.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,t,n[l],i);return}}i[s.name]=s.init(t,i)}}),i}};function Tw(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Tw(o,t,{})),n[r]=o}return n}var q=class{constructor(t){this.spec=t,this.props={},t.props&&Tw(t.props,this,this.props),this.key=t.key?t.key.key:Aw("plugin")}getState(t){return t[this.key]}},S0=Object.create(null);function Aw(e){return e in S0?e+"$"+ ++S0[e]:(S0[e]=0,e+"$")}var Y=class{constructor(t="key"){this.key=Aw(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var Gc=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Mw(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var N0=(e,t,n)=>{let r=Mw(e,n);if(!r)return!1;let o=O0(r);if(!o){let s=r.blockRange(),l=s&&Tr(s);return l==null?!1:(t&&t(e.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(zw(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Cs(i,"end")||$.isSelectable(i)))for(let s=r.depth;;s--){let l=aa(e.doc,r.before(s),r.after(s),P.empty);if(l&&l.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},Ow=(e,t,n)=>{let r=Mw(e,n);if(!r)return!1;let o=O0(r);return o?Dw(e,o,t):!1},Rw=(e,t,n)=>{let r=Iw(e,n);if(!r)return!1;let o=I0(r);return o?Dw(e,o,t):!1};function Dw(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let s=t.nodeAfter,l=s,a=t.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=aa(e.doc,i,a,P.empty);if(!u||u.from!=i||u instanceof Et&&u.slice.size>=a-i)return!1;if(n){let c=e.tr.step(u);c.setSelection(H.create(c.doc,i)),n(c.scrollIntoView())}return!0}function Cs(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var M0=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=O0(r)}let s=i&&i.nodeBefore;return!s||!$.isSelectable(s)?!1:(t&&t(e.tr.setSelection($.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function O0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Iw(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=Iw(e,n);if(!r)return!1;let o=I0(r);if(!o)return!1;let i=o.nodeAfter;if(zw(e,o,t,1))return!0;if(r.parent.content.size==0&&(Cs(i,"start")||$.isSelectable(i))){let s=aa(e.doc,r.before(),r.after(),P.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof $,o;if(r){if(n.node.isTextblock||!pn(e.doc,n.from))return!1;o=n.from}else if(o=ui(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection($.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},Pw=(e,t)=>{let n=e.selection,r;if(n instanceof $){if(n.node.isTextblock||!pn(e.doc,n.to))return!1;r=n.to}else if(r=ui(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},Bw=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Tr(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},L0=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function P0(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=P0(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,s.createAndFill());a.setSelection(W.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},F0=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Rt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=P0(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Qt(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Tr(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function u6(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof $&&t.selection.node.isBlock)return!r.parentOffset||!Qt(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){a=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),l=P0(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof H||t.selection instanceof Rt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Qt(c.doc,d,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Qt(c.doc,d,i.length,i)),!f)return!1;if(c.split(d,i.length,i),!a&&u&&r.node(s).type!=l){let p=c.mapping.map(r.before(s)),h=c.doc.resolve(p);l&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,l)&&c.setNodeMarkup(c.mapping.map(r.before(s)),l)}return n&&n(c.scrollIntoView()),!0}}var c6=u6();var Fw=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection($.create(e.doc,o))),!0)},d6=(e,t)=>(t&&t(e.tr.setSelection(new Rt(e.doc))),!0);function f6(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||pn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function zw(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&f6(e,t,n))return!0;let u=!a&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,h=A.empty;for(let g=s.length-1;g>=0;g--)h=A.from(s[g].create(null,h));h=A.from(o.copy(h));let m=e.tr.step(new je(t.pos-1,p,t.pos,p,new P(h,1,0),s.length,!0)),b=m.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&pn(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&a?null:W.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Tr(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&Cs(i,"start",!0)&&Cs(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=i,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=A.empty;for(let x=h.length-1;x>=0;x--)g=A.from(h[x].copy(g));let y=e.tr.step(new je(t.pos-h.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new P(g,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function Uw(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(H.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}var U0=Uw(-1),$0=Uw(1);function $w(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&ws(s,e,t);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function H0(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let a=s.resolve(t.start-2);i=new li(a,a,t.depth),t.endIndex=0;c--)i=A.from(n[c].type.create(n[c].attrs,i));e.step(new je(t.start-(r?2:0),t.end,t.start,t.end,new P(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?g6(t,n,e,i):b6(t,n,i):!0:!1}}function g6(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);im;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?A.empty:A.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new je(d-(l?1:0),f+(a?1:0),d+1,f-1,new P((l?A.empty:A.from(o.copy(A.empty))).append(a?A.empty:A.from(o.copy(A.empty))),l?0:1,a?0:1),l?0:1)),t(r.scrollIntoView()),!0}function Vw(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=e)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=A.from(u?e.create():null),d=new P(A.from(e.create(null,A.from(l.type.create(null,c)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new je(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var ut=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Os=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},J0=null,Nr=function(e,t,n){let r=J0||(J0=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},y6=function(){J0=null},bi=function(e,t,n,r){return n&&(Ww(e,t,n,r,-1)||Ww(e,t,n,r,1))},x6=/^(img|br|input|textarea|hr)$/i;function Ww(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:mn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||ba(e)||x6.test(e.nodeName)||e.contentEditable=="false")return!1;t=ut(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?mn(e):0}else return!1}}function mn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function v6(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=mn(e)}else if(e.parentNode&&!ba(e))t=ut(e),e=e.parentNode;else return null}}function k6(e,t){for(;;){if(e.nodeType==3&&t2),hn=Rs||(Gn?/Mac/.test(Gn.platform):!1),C2=Gn?/Win/.test(Gn.platform):!1,Mr=/Android \d/.test(Co),ya=!!jw&&"webkitFontSmoothing"in jw.documentElement.style,S6=ya?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function C6(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Ar(e,t){return typeof e=="number"?e:e[t]}function T6(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Kw(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Os(s);continue}let l=s,a=l==i.body,u=a?C6(i):T6(l),c=0,d=0;if(t.topu.bottom-Ar(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Ar(o,"top")-u.top:t.bottom-u.bottom+Ar(o,"bottom")),t.leftu.right-Ar(r,"right")&&(c=t.right-u.right+Ar(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let p=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let m=l.scrollLeft-p,b=l.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:Os(s)}}function A6(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:T2(e.dom)}}function T2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Os(r));return t}function N6({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;A2(n,r==0?0:r-t)}function A2(e,t){for(let n=0;n=l){s=Math.max(h.bottom,s),l=Math.min(h.top,l);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!a&&h.left<=t.left&&h.right>=t.left&&(a=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?O6(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:N2(n,o)}function O6(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let i=0;i=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function pg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function R6(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function I6(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let l=e.docView.nearestDesc(i,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&a.left>r.left||a.top>r.top?o=l.posBefore:(!s&&a.right-1?o:e.docView.posFromDOM(t,n,-1)}function M2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;ya&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=I6(e,r,o,t))}l==null&&(l=D6(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Gw(e){return e.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,ca(ko(Nr(r,a,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return V0(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Nr(a,mn(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return ca(ko(u,1),!1)}if(i==null&&o=0)}function ca(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function V0(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function R2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function B6(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return R2(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=O2(e,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Nr(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var F6=/[\u0590-\u08ac]/;function z6(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=e.domSelection();return l?!F6.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:R2(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&u==m;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var Jw=null,Yw=null,Zw=!1;function U6(e,t,n){return Jw==t&&Yw==n?Zw:(Jw=t,Yw=n,Zw=n=="up"||n=="down"?B6(e,t,n):z6(e,t,n))}var bn=0,Xw=1,fi=2,Jn=3,yi=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=bn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nut(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof Zc){o=t-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Jc&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?ut(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=ut(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;ch&&sn){let h=l;l=a,a=h}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let l=r+i.border,a=s-i.border;if(t>=l&&n<=a){this.dirty=t==r||n==s?fi:Xw,t==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jn:i.markDirty(t-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?fi:Jn}r=s}this.dirty=fi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?fi:Xw;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==bn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Q0=class extends yi{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},Ds=class e extends yi{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=_r.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Jn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Jn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=bn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=rg(i,0,t,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=_r.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=L2(c,r,n),u?a=new eg(t,n,r,o,c,d||null,f,u,i,s+1):n.isText?new Yc(t,n,r,o,c,f,i):new e(t,n,r,o,c,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>A.empty)}return t}matchesNode(t,n,r){return this.dirty==bn&&t.eq(this.node)&&Xc(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new ng(this,s&&s.node,t);V6(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?ce.none:this.node.child(c).marks,r,t),a.placeWidget(u,t,o)},(u,c,d,f)=>{a.syncToMarks(u.marks,r,t);let p;a.findNodeMatch(u,c,d,f)||l&&t.state.selection.from>o&&t.state.selection.to-1&&a.updateNodeAt(u,c,d,p,t)||a.updateNextNode(u,c,d,t,f,o)||a.addNode(u,c,d,t,o),o+=u.nodeSize}),a.syncToMarks([],r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==fi)&&(s&&this.protectLocalComposition(t,s),D2(this.contentDOM,this.children,t),Rs&&W6(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof H)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,l=j6(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new Q0(this,i,n,o);t.input.compositionNodes.push(s),this.children=rg(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Jn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=bn}updateOuterDeco(t){if(Xc(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=I2(this.dom,this.nodeDOM,tg(this.outerDeco,this.node,n),tg(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function Qw(e,t,n,r,o){L2(r,t,e);let i=new So(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}var Yc=class e extends So{constructor(t,n,r,o,i,s,l){super(t,n,r,o,i,null,s,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Jn||this.dirty!=bn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=bn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=bn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Jn)}get domAtom(){return!1}isText(t){return this.node.text==t}},Zc=class extends yi{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==bn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},eg=class extends So{constructor(t,n,r,o,i,s,l,a,u,c){super(t,n,r,o,i,s,l,u,c),this.spec=a}update(t,n,r,o){if(this.dirty==Jn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function D2(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Ds.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Ds)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function q6(e,t){return e.type.side-t.type.side}function V6(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):l.slice();r(f,m,t.forChild(i,f),p),i=h}}function W6(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function j6(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let u=l=0&&u+t.length+l>=n)return l+u;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return-1}function rg(e,t,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=t?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function hg(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(id(n)){for(a=s;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&$.isSelectable(d)&&o.parent&&!(d.isInline&&E6(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new $(s==f?l:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!P2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function G6(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,ut(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&qt&&_o<=11&&(n.disabled=!0,n.disabled=!1)}function B2(e,t){if(t instanceof $){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(o2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else o2(e)}function o2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function mg(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||H.between(t,n,r)}function i2(e){return e.editable&&!e.hasFocus()?!1:F2(e)}function F2(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function J6(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return bi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function og(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&W.findFrom(i,t)}function Eo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function s2(e,t,n){let r=e.state.selection;if(r instanceof H)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Eo(e,new H(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=og(e.state,t);return o&&o instanceof $?Eo(e,o):!1}else if(!(hn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(l))&&!s.contentDOM?$.isSelectable(i)?Eo(e,new $(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):ya?Eo(e,new H(e.state.doc.resolve(t<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $&&r.node.isInline)return Eo(e,new H(t>0?r.$to:r.$from));{let o=og(e.state,t);return o?Eo(e,o):!1}}}function Qc(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function fa(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function As(e,t){return t<0?Y6(e):Z6(e)}function Y6(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(gn&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(fa(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(z2(n))break;{let l=n.previousSibling;for(;l&&fa(l,-1);)o=n.parentNode,i=ut(l),l=l.previousSibling;if(l)n=l,r=Qc(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?ig(e,n,r):o&&ig(e,o,i)}function Z6(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Qc(n),i,s;for(;;)if(r{e.state==o&&Or(e)},50)}function l2(e,t){let n=e.state.doc.resolve(t);if(!(et||C2)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function a2(e,t,n){let r=e.state.selection;if(r instanceof H&&!r.empty||n.indexOf("s")>-1||hn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=og(e.state,t);if(s&&s instanceof $)return Eo(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,l=r instanceof Rt?W.near(s,t):W.findFrom(s,t);return l?Eo(e,l):!1}return!1}function u2(e,t){if(!(e.state.selection instanceof H))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function c2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function e4(e){if(!_t||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;c2(e,r,"true"),setTimeout(()=>c2(e,r,"false"),20)}return!1}function t4(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function n4(e,t){let n=t.keyCode,r=t4(t);if(n==8||hn&&n==72&&r=="c")return u2(e,-1)||As(e,-1);if(n==46&&!t.shiftKey||hn&&n==68&&r=="c")return u2(e,1)||As(e,1);if(n==13||n==27)return!0;if(n==37||hn&&n==66&&r=="c"){let o=n==37?l2(e,e.state.selection.from)=="ltr"?-1:1:-1;return s2(e,o,r)||As(e,o)}else if(n==39||hn&&n==70&&r=="c"){let o=n==39?l2(e,e.state.selection.from)=="ltr"?1:-1:1;return s2(e,o,r)||As(e,o)}else{if(n==38||hn&&n==80&&r=="c")return a2(e,-1,r)||As(e,-1);if(n==40||hn&&n==78&&r=="c")return e4(e)||a2(e,1,r)||As(e,1);if(r==(hn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function gg(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||_r.fromSchema(e.state.schema),l=W2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=V2[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` +`;document.head.appendChild(DE);var IE=j(pe());var rl=j(Be());var Sa=j(Be(),1),To=j(Be(),1),cS=j(ys(),1),dS=j(Dc(),1),Lr=j(pe(),1);function kt(e){this.content=e}kt.prototype={constructor:kt,find:function(e){for(var t=0;t>1}};kt.from=function(e){if(e instanceof kt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new kt(t)};var u0=kt;function KE(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=KE(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function GE(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ut&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(l.isText?l=l.cut(Math.max(0,t-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,t-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?Ic(n+1,i):Ic(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};ce.none=[];var si=class extends Error{},P=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=JE(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(YE(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(T.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new e(t,r,o)}};P.empty=new P(T.empty,0,0);function YE(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:l}=e.findIndex(n);if(o==t||i.isText){if(l!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(YE(i.content,t-o-1,n-o-1)))}function JE(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=JE(s.content,t-i-1,n,s);return l&&e.replaceChild(o,s.copy(l))}function xD(e,t,n){if(n.openStart>e.depth)throw new si("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new si("Inconsistent open depths");return ZE(e,t,n,0)}function ZE(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Xl(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(oi(e.nodeAfter,r),i++));for(let l=i;lo&&f0(e,t,o+1),s=r.depth>o&&f0(n,r,o+1),l=[];return Xl(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(XE(i,s),oi(ii(i,QE(e,t,n,r,o+1)),l)):(i&&oi(ii(i,Bc(e,t,o+1)),l),Xl(t,n,o,l),s&&oi(ii(s,Bc(n,r,o+1)),l)),Xl(r,null,o,l),new T(l)}function Bc(e,t,n){let r=[];if(Xl(null,e,n,r),e.depth>n){let o=f0(e,t,n+1);oi(ii(o,Bc(e,t,n+1)),r)}return Xl(t,null,n,r),new T(r)}function vD(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(T.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Fc=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new li(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new e(n,r,i)}static resolveCached(t,n){let r=FE.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),ew(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=T.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=T.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Ht.prototype.text=void 0;var h0=class e extends Ht{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ew(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function ew(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var ai=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new m0(t,n);if(r.next==null)return e.empty;let o=tw(r);r.next&&r.err("Unexpected trailing text");let i=ND(TD(o));return MD(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` +`)}};ai.empty=new ai(!0);var m0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function tw(e){let t=[];do t.push(wD(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function wD(e){let t=[];do t.push(_D(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function _D(e){let t=AD(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=SD(e,t);else break;return t}function zE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function SD(e,t){let n=zE(e),r=n;return e.eat(",")&&(e.next!="}"?r=zE(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function CD(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function AD(e){if(e.eat("(")){let t=tw(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=CD(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function TD(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,l,a){let u={term:a,to:l};return t[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{e[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new ai(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:ow(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ht(this,this.computeAttrs(t),T.from(n),ce.setFrom(r))}createChecked(t=null,n,r){return n=T.from(n),this.checkContent(n),new Ht(this,this.computeAttrs(t),n,ce.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=T.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(T.empty,!0);return i?new Ht(this,t,n.append(i),ce.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new e(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function OD(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var g0=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?OD(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},ea=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=sw(t,o.attrs),this.excluded=null;let i=rw(this.attrs);this.instance=i?new ce(this,i):null}create(t=null){return!t&&this.instance?this.instance:new ce(this,ow(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new e(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}},yo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=u0.from(t.nodes),n.marks=u0.from(t.marks||{}),this.nodes=zc.compile(this.spec.nodes,this),this.marks=ea.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=ai.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?$E(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:$E(this,s.split(" "))}this.nodeFromJSON=o=>Ht.fromJSON(this,o),this.markFromJSON=o=>ce.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof zc){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new h0(r,r.defaultAttrs,t,ce.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function $E(e,t){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function RD(e){return e.tag!=null}function DD(e){return e.style!=null}var fn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(RD(o))this.tags.push(o);else if(DD(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Uc(this,n,!1);return r.addAll(t,ce.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Uc(this,n,!0);return r.addAll(t,ce.none,n.from,n.to),P.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=VE(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=VE(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},lw={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ID={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},aw={ol:!0,ul:!0},ta=1,b0=2,Ql=4;function HE(e,t,n){return t!=null?(t?ta:0)|(t==="full"?b0:0):e&&e.whitespace=="pre"?ta|b0:n&~Ql}var vs=class{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=ce.none,this.match=i||(s&Ql?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(T.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ta)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=T.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(T.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!lw.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Uc=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=HE(null,n.preserveWhitespace,0)|(r?Ql:0);o?i=new vs(o.type,o.attrs,ce.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new vs(null,null,ce.none,!0,null,s):i=new vs(t.schema.topNodeType,null,ce.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&b0?"full":this.localPreserveWS||(o.options&ta)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` +`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,r),this.findAround(t,a,!1)}i&&this.sync(l)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,l=o==null?null:t.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],u=a.findWrapping(t);if(u&&(!o||o.length>u.length+l)&&(o=u,i=a,!u.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(u.type):qE(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new vs(t,n,a,o,null,l)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ta)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function LD(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&aw.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function PD(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function VE(e){let t={};for(let n in e)t[n]=e[n];return t}function qE(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Lc(d0(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Lc(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=WE(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return WE(t.marks)}};function WE(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function d0(e){return e.document||window.document}var jE=new WeakMap;function BD(e){let t=jE.get(e);return t===void 0&&jE.set(e,t=FD(e)),t}function FD(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,a=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:h}=Lc(e,f,n,r);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}var dw=65535,fw=Math.pow(2,16);function zD(e,t){return e+t*fw}function uw(e){return e&dw}function UD(e){return(e-(e&dw))/fw}var pw=1,hw=2,$c=4,mw=8,oa=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&mw)>0}get deletedBefore(){return(this.delInfo&(pw|$c))>0}get deletedAfter(){return(this.delInfo&(hw|$c))>0}get deletedAcross(){return(this.delInfo&$c)>0}},Sr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=uw(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,p=a+o+(f<0?0:c);if(r)return p;let h=t==(n<0?a:d)?null:zD(l/3,t-a),g=t==a?hw:t==d?pw:$c;return(n<0?t!=a:t!=d)&&(g|=mw),new oa(p,g,h)}o+=c-u}return r?t+o:new oa(t+o,0,null)}touches(t,n){let r=0,o=uw(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+i],c=a+u;if(t<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,i)}invert(){return new Cr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("addMark",sa);var Cr=class e extends Qe{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new P(w0(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,r)}invert(){return new sa(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("removeMark",Cr);var la=class e extends Qe{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return at.fromReplace(t,this.pos,this.pos+1,new P(T.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,P.fromJSON(t,n.slice),n.insert,!!n.structure)}};Qe.jsonID("replaceAround",je);function k0(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function $D(e,t,n,r){let o=[],i=[],s,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+a.nodeSize,n),h=r.addToSet(d);for(let g=0;ge.step(a)),i.forEach(a=>e.step(a))}function HD(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof ea){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ce.step(new Cr(s.from,s.to,s.style)))}function _0(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],l=t+1;for(let a=0;a=0;a--)e.step(s[a])}function VD(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ar(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,i=0;;--r){let s=e.$from.node(r),l=e.$from.index(r)+o,a=e.$to.indexAfter(r)-i;if(rn;h--)g||r.index(h)>0?(g=!0,c=T.from(r.node(h).copy(c)),d++):a--;let f=T.empty,p=0;for(let h=i,g=!1;h>n;h--)g||o.after(h+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=T.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new je(o,i,o,i,new P(r,0,0),n.length,!0))}function GD(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,l)=>{let a=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,a)&&YD(e.doc,e.mapping.slice(i).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&bw(e,s,l,i),_0(e,e.mapping.slice(i).map(l,1),r,void 0,u===null);let c=e.mapping.slice(i),d=c.map(l,1),f=c.map(l+s.nodeSize,1);return e.step(new je(d,f,d+1,f-1,new P(T.from(r.create(a,null,s.marks)),0,0),1,!0)),u===!0&&gw(e,s,l,i),!1}})}function gw(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let a=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(a,a+1,t.type.schema.linebreakReplacement.create())}}})}function bw(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` +`))}})}function YD(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function JD(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new je(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new P(T.from(s),0,0),1,!0))}function Qt(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let g=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(p))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function ZD(e,t,n=1,r){let o=e.doc.resolve(t),i=T.empty,s=T.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=T.from(o.node(l).copy(i));let c=r&&r[u];s=T.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}e.step(new Et(t,t,new P(i.append(s),n,n),!0))}function pn(e,t){let n=e.resolve(t),r=n.index();return yw(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function XD(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&yw(i,s)&&r.node(o).canReplace(l,l+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function QD(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let l=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);bw(e,c.node(),c.before(),l)}s.inlineContent&&_0(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=e.mapping.slice(l),u=a.map(t-n);if(e.step(new Et(u,a.map(t+n,-1),P.empty,!0)),r===!0){let c=e.doc.resolve(u);gw(e,c.node(),c.before(),e.steps.length)}return e}function e6(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function aa(e,t,n=t,r=P.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return xw(o,i,r)?new Et(t,n,r):new E0(o,i,r).fit()}function xw(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var E0=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=T.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=T.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new P(i,s,l);return t>-1?new je(r.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new Et(r.pos,o.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=x0(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(T.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=x0(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new P(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=x0(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new P(na(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new P(na(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=b,c.push(vw(g.mark(f.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?p:-1)))}let h=u==l.childCount;h||(p=-1),this.placed=ra(this.placed,n,T.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,b=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=v0(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ra(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=ra(this.placed,this.depth,T.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(T.empty,!0);n.childCount&&(this.placed=ra(this.placed,this.frontier.length,n))}};function na(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(na(e.firstChild.content,t-1,n)))}function ra(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ra(e.lastChild.content,t-1,n)))}function x0(e,t){for(let n=0;n1&&(r=r.replaceChild(0,vw(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(T.empty,!0)))),e.copy(r)}function v0(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!t6(n,i.content,s)?l:null}function t6(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==p&&s.splice(1,0,-f)}let a=s.indexOf(l),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=n6(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(l)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let g=0;g=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),n=i.after(p))}}function kw(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(T.empty,!0))}return e}function o6(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=e6(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new P(T.from(r),0,0))}function i6(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=Ew(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return e.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function Ew(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}var Hc=class e extends Qe{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return at.fromReplace(t,this.pos,this.pos+1,new P(T.from(o),0,n.isLeaf?0:1))}getMap(){return Sr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};Qe.jsonID("attr",Hc);var Vc=class e extends Qe{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return at.ok(r)}getMap(){return Sr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};Qe.jsonID("docAttr",Vc);var Es=class extends Error{};Es=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Es.prototype=Object.create(Error.prototype);Es.prototype.constructor=Es;Es.prototype.name="TransformError";var xo=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new ia}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Es(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=P.empty){let o=aa(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new P(T.from(r),0,0))}delete(t,n){return this.replace(t,n,P.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return r6(this,t,n,r),this}replaceRangeWith(t,n,r){return o6(this,t,n,r),this}deleteRange(t,n){return i6(this,t,n),this}lift(t,n){return qD(this,t,n),this}join(t,n=1){return QD(this,t,n),this}wrap(t,n){return KD(this,t,n),this}setBlockType(t,n=t,r,o=null){return GD(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return JD(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Hc(t,n,r)),this}setDocAttribute(t,n){return this.step(new Vc(t,n)),this}addNodeMark(t,n){return this.step(new la(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ce)n.isInSet(r.marks)&&this.step(new ks(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new ks(t,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(t,n=1,r){return ZD(this,t,n,r),this}addMark(t,n,r){return $D(this,t,n,r),this}removeMark(t,n,r){return HD(this,t,n,r),this}clearIncompatible(t,n,r){return _0(this,t,n,r),this}};var S0=Object.create(null),W=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Ss(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?_s(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):_s(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Rt(t.node(0))}static atStart(t){return _s(t,t,0,0,1)||new Rt(t)}static atEnd(t){return _s(t,t,t.content.size,t.childCount,-1)||new Rt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=S0[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in S0)throw new RangeError("Duplicate use of selection JSON ID "+t);return S0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return H.between(this.$anchor,this.$head).getBookmark()}};W.prototype.visible=!0;var Ss=class{constructor(t,n){this.$from=t,this.$to=n}},ww=!1;function _w(e){!ww&&!e.parent.inlineContent&&(ww=!0)}var H=class e extends W{constructor(t,n=t){_w(t),_w(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return W.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=P.empty){if(super.replace(t,n),n==P.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new jc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=W.findFrom(n,r,!0)||W.findFrom(n,-r,!0);if(i)n=i.$head;else return W.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(W.findFrom(t,-r,!0)||W.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let l=t.child(s);if(l.isAtom){if(!i&&$.isSelectable(l))return $.create(e,n-(o<0?l.nodeSize:0))}else{let a=_s(e,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function Sw(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var Cw=1,Wc=2,Aw=4,T0=class extends xo{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Wc,this}ensureMarks(t){return ce.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Wc)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Wc,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ce.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(W.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Aw,this}get scrolledIntoView(){return(this.updated&Aw)>0}};function Tw(e,t){return!t||!e?e:e.bind(t)}var ci=class{constructor(t,n,r){this.name=t,this.init=Tw(n.init,r),this.apply=Tw(n.apply,r)}},l6=[new ci("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new ci("selection",{init(e,t){return e.selection||W.atStart(t.doc)},apply(e){return e.selection}}),new ci("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ci("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],ua=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=l6.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ci(r.key,r.spec.state,r))})}},Kc=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new ua(t.schema,t.plugins),i=new e(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ht.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=W.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,t,n[l],i);return}}i[s.name]=s.init(t,i)}}),i}};function Nw(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Nw(o,t,{})),n[r]=o}return n}var V=class{constructor(t){this.spec=t,this.props={},t.props&&Nw(t.props,this,this.props),this.key=t.key?t.key.key:Mw("plugin")}getState(t){return t[this.key]}},C0=Object.create(null);function Mw(e){return e in C0?e+"$"+ ++C0[e]:(C0[e]=0,e+"$")}var J=class{constructor(t="key"){this.key=Mw(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var Gc=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Rw(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var M0=(e,t,n)=>{let r=Rw(e,n);if(!r)return!1;let o=R0(r);if(!o){let s=r.blockRange(),l=s&&Ar(s);return l==null?!1:(t&&t(e.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if($w(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Cs(i,"end")||$.isSelectable(i)))for(let s=r.depth;;s--){let l=aa(e.doc,r.before(s),r.after(s),P.empty);if(l&&l.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},Dw=(e,t,n)=>{let r=Rw(e,n);if(!r)return!1;let o=R0(r);return o?Lw(e,o,t):!1},Iw=(e,t,n)=>{let r=Pw(e,n);if(!r)return!1;let o=L0(r);return o?Lw(e,o,t):!1};function Lw(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let s=t.nodeAfter,l=s,a=t.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=aa(e.doc,i,a,P.empty);if(!u||u.from!=i||u instanceof Et&&u.slice.size>=a-i)return!1;if(n){let c=e.tr.step(u);c.setSelection(H.create(c.doc,i)),n(c.scrollIntoView())}return!0}function Cs(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var O0=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=R0(r)}let s=i&&i.nodeBefore;return!s||!$.isSelectable(s)?!1:(t&&t(e.tr.setSelection($.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function R0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Pw(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=Pw(e,n);if(!r)return!1;let o=L0(r);if(!o)return!1;let i=o.nodeAfter;if($w(e,o,t,1))return!0;if(r.parent.content.size==0&&(Cs(i,"start")||$.isSelectable(i))){let s=aa(e.doc,r.before(),r.after(),P.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof $,o;if(r){if(n.node.isTextblock||!pn(e.doc,n.from))return!1;o=n.from}else if(o=ui(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection($.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},Fw=(e,t)=>{let n=e.selection,r;if(n instanceof $){if(n.node.isTextblock||!pn(e.doc,n.to))return!1;r=n.to}else if(r=ui(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},zw=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Ar(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},P0=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function B0(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=B0(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,s.createAndFill());a.setSelection(W.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},z0=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Rt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=B0(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Qt(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ar(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function a6(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof $&&t.selection.node.isBlock)return!r.parentOffset||!Qt(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){a=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),l=B0(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let g=e&&e(o.parent,a,r);i.unshift(g||(a&&l?{type:l}:null)),s=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof H||t.selection instanceof Rt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Qt(c.doc,d,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Qt(c.doc,d,i.length,i)),!f)return!1;if(c.split(d,i.length,i),!a&&u&&r.node(s).type!=l){let p=c.mapping.map(r.before(s)),h=c.doc.resolve(p);l&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,l)&&c.setNodeMarkup(c.mapping.map(r.before(s)),l)}return n&&n(c.scrollIntoView()),!0}}var u6=a6();var Uw=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection($.create(e.doc,o))),!0)},c6=(e,t)=>(t&&t(e.tr.setSelection(new Rt(e.doc))),!0);function d6(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||pn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function $w(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&d6(e,t,n))return!0;let u=!a&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,h=T.empty;for(let m=s.length-1;m>=0;m--)h=T.from(s[m].create(null,h));h=T.from(o.copy(h));let g=e.tr.step(new je(t.pos-1,p,t.pos,p,new P(h,1,0),s.length,!0)),b=g.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&pn(g.doc,b.pos)&&g.join(b.pos),n(g.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&a?null:W.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Ar(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&Cs(i,"start",!0)&&Cs(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let g=i,b=1;for(;!g.isTextblock;g=g.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let m=T.empty;for(let x=h.length-1;x>=0;x--)m=T.from(h[x].copy(m));let y=e.tr.step(new je(t.pos-h.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new P(m,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function Hw(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(H.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}var $0=Hw(-1),H0=Hw(1);function Vw(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&ws(s,e,t);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function V0(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let a=s.resolve(t.start-2);i=new li(a,a,t.depth),t.endIndex=0;c--)i=T.from(n[c].type.create(n[c].attrs,i));e.step(new je(t.start-(r?2:0),t.end,t.start,t.end,new P(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?m6(t,n,e,i):g6(t,n,i):!0:!1}}function m6(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);ig;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?T.empty:T.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new je(d-(l?1:0),f+(a?1:0),d+1,f-1,new P((l?T.empty:T.from(o.copy(T.empty))).append(a?T.empty:T.from(o.copy(T.empty))),l?0:1,a?0:1),l?0:1)),t(r.scrollIntoView()),!0}function jw(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=e)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=T.from(u?e.create():null),d=new P(T.from(e.create(null,T.from(l.type.create(null,c)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new je(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var ut=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Os=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},J0=null,Nr=function(e,t,n){let r=J0||(J0=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},b6=function(){J0=null},bi=function(e,t,n,r){return n&&(Kw(e,t,n,r,-1)||Kw(e,t,n,r,1))},y6=/^(img|br|input|textarea|hr)$/i;function Kw(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:mn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||ba(e)||y6.test(e.nodeName)||e.contentEditable=="false")return!1;t=ut(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?mn(e):0}else return!1}}function mn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function x6(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=mn(e)}else if(e.parentNode&&!ba(e))t=ut(e),e=e.parentNode;else return null}}function v6(e,t){for(;;){if(e.nodeType==3&&t2),hn=Rs||(Gn?/Mac/.test(Gn.platform):!1),T2=Gn?/Win/.test(Gn.platform):!1,Mr=/Android \d/.test(Co),ya=!!Gw&&"webkitFontSmoothing"in Gw.documentElement.style,_6=ya?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function S6(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Tr(e,t){return typeof e=="number"?e:e[t]}function C6(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Yw(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Os(s);continue}let l=s,a=l==i.body,u=a?S6(i):C6(l),c=0,d=0;if(t.topu.bottom-Tr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Tr(o,"top")-u.top:t.bottom-u.bottom+Tr(o,"bottom")),t.leftu.right-Tr(r,"right")&&(c=t.right-u.right+Tr(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let p=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let g=l.scrollLeft-p,b=l.scrollTop-h;t={left:t.left-g,top:t.top-b,right:t.right-g,bottom:t.bottom-b}}let f=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:Os(s)}}function A6(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:N2(e.dom)}}function N2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Os(r));return t}function T6({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;M2(n,r==0?0:r-t)}function M2(e,t){for(let n=0;n=l){s=Math.max(h.bottom,s),l=Math.min(h.top,l);let g=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!a&&h.left<=t.left&&h.right>=t.left&&(a=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?M6(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:O2(n,o)}function M6(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let i=0;i=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function hg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function O6(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function D6(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let l=e.docView.nearestDesc(i,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&a.left>r.left||a.top>r.top?o=l.posBefore:(!s&&a.right-1?o:e.docView.posFromDOM(t,n,-1)}function R2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;ya&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=D6(e,r,o,t))}l==null&&(l=R6(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Jw(e){return e.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,ca(ko(Nr(r,a,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return W0(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Nr(a,mn(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return ca(ko(u,1),!1)}if(i==null&&o=0)}function ca(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function W0(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function I2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function P6(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return I2(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=D2(e,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Nr(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var B6=/[\u0590-\u08ac]/;function F6(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=e.domSelection();return l?!B6.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:I2(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:g}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var Zw=null,Xw=null,Qw=!1;function z6(e,t,n){return Zw==t&&Xw==n?Qw:(Zw=t,Xw=n,Qw=n=="up"||n=="down"?P6(e,t,n):F6(e,t,n))}var bn=0,e2=1,fi=2,Yn=3,yi=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=bn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nut(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof Zc){o=t-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Yc&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?ut(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=ut(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;ch&&sn){let h=l;l=a,a=h}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let l=r+i.border,a=s-i.border;if(t>=l&&n<=a){this.dirty=t==r||n==s?fi:e2,t==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Yn:i.markDirty(t-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?fi:Yn}r=s}this.dirty=fi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?fi:e2;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==bn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},eg=class extends yi{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},Ds=class e extends yi{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=_r.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Yn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Yn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=bn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=og(i,0,t,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=_r.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=B2(c,r,n),u?a=new tg(t,n,r,o,c,d||null,f,u,i,s+1):n.isText?new Jc(t,n,r,o,c,f,i):new e(t,n,r,o,c,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>T.empty)}return t}matchesNode(t,n,r){return this.dirty==bn&&t.eq(this.node)&&Xc(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new rg(this,s&&s.node,t);V6(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?ce.none:this.node.child(c).marks,r,t),a.placeWidget(u,t,o)},(u,c,d,f)=>{a.syncToMarks(u.marks,r,t);let p;a.findNodeMatch(u,c,d,f)||l&&t.state.selection.from>o&&t.state.selection.to-1&&a.updateNodeAt(u,c,d,p,t)||a.updateNextNode(u,c,d,t,f,o)||a.addNode(u,c,d,t,o),o+=u.nodeSize}),a.syncToMarks([],r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==fi)&&(s&&this.protectLocalComposition(t,s),L2(this.contentDOM,this.children,t),Rs&&q6(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof H)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,l=W6(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new eg(this,i,n,o);t.input.compositionNodes.push(s),this.children=og(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Yn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=bn}updateOuterDeco(t){if(Xc(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=P2(this.dom,this.nodeDOM,ng(this.outerDeco,this.node,n),ng(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function t2(e,t,n,r,o){B2(r,t,e);let i=new So(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}var Jc=class e extends So{constructor(t,n,r,o,i,s,l){super(t,n,r,o,i,null,s,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Yn||this.dirty!=bn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=bn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=bn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Yn)}get domAtom(){return!1}isText(t){return this.node.text==t}},Zc=class extends yi{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==bn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},tg=class extends So{constructor(t,n,r,o,i,s,l,a,u,c){super(t,n,r,o,i,s,l,u,c),this.spec=a}update(t,n,r,o){if(this.dirty==Yn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function L2(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Ds.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Ds)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function H6(e,t){return e.type.side-t.type.side}function V6(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):l.slice();r(f,g,t.forChild(i,f),p),i=h}}function q6(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function W6(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let u=l=0&&u+t.length+l>=n)return l+u;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return-1}function og(e,t,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=t?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function mg(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(id(n)){for(a=s;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&$.isSelectable(d)&&o.parent&&!(d.isInline&&k6(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new $(s==f?l:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!F2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function K6(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,ut(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Vt&&_o<=11&&(n.disabled=!0,n.disabled=!1)}function z2(e,t){if(t instanceof $){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(s2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else s2(e)}function s2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function gg(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||H.between(t,n,r)}function l2(e){return e.editable&&!e.hasFocus()?!1:U2(e)}function U2(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function G6(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return bi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function ig(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&W.findFrom(i,t)}function Eo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function a2(e,t,n){let r=e.state.selection;if(r instanceof H)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Eo(e,new H(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=ig(e.state,t);return o&&o instanceof $?Eo(e,o):!1}else if(!(hn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(l))&&!s.contentDOM?$.isSelectable(i)?Eo(e,new $(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):ya?Eo(e,new H(e.state.doc.resolve(t<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $&&r.node.isInline)return Eo(e,new H(t>0?r.$to:r.$from));{let o=ig(e.state,t);return o?Eo(e,o):!1}}}function Qc(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function fa(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Ts(e,t){return t<0?Y6(e):J6(e)}function Y6(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(gn&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(fa(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if($2(n))break;{let l=n.previousSibling;for(;l&&fa(l,-1);)o=n.parentNode,i=ut(l),l=l.previousSibling;if(l)n=l,r=Qc(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?sg(e,n,r):o&&sg(e,o,i)}function J6(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Qc(n),i,s;for(;;)if(r{e.state==o&&Or(e)},50)}function u2(e,t){let n=e.state.doc.resolve(t);if(!(et||T2)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function c2(e,t,n){let r=e.state.selection;if(r instanceof H&&!r.empty||n.indexOf("s")>-1||hn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=ig(e.state,t);if(s&&s instanceof $)return Eo(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,l=r instanceof Rt?W.near(s,t):W.findFrom(s,t);return l?Eo(e,l):!1}return!1}function d2(e,t){if(!(e.state.selection instanceof H))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function f2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Q6(e){if(!_t||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;f2(e,r,"true"),setTimeout(()=>f2(e,r,"false"),20)}return!1}function e4(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function t4(e,t){let n=t.keyCode,r=e4(t);if(n==8||hn&&n==72&&r=="c")return d2(e,-1)||Ts(e,-1);if(n==46&&!t.shiftKey||hn&&n==68&&r=="c")return d2(e,1)||Ts(e,1);if(n==13||n==27)return!0;if(n==37||hn&&n==66&&r=="c"){let o=n==37?u2(e,e.state.selection.from)=="ltr"?-1:1:-1;return a2(e,o,r)||Ts(e,o)}else if(n==39||hn&&n==70&&r=="c"){let o=n==39?u2(e,e.state.selection.from)=="ltr"?1:-1:1;return a2(e,o,r)||Ts(e,o)}else{if(n==38||hn&&n==80&&r=="c")return c2(e,-1,r)||Ts(e,-1);if(n==40||hn&&n==78&&r=="c")return Q6(e)||c2(e,1,r)||Ts(e,1);if(r==(hn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function bg(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||_r.fromSchema(e.state.schema),l=K2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=j2[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` -`);return{dom:a,text:f,slice:t}}function U2(e,t,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!t)return null;let a=!!t&&(r||i||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return l=new P(A.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)l=d;else{let f=o.marks(),{schema:p}=e.state,h=_r.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=s4(n),ya&&l4(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||fn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!r4.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=a4(d2(l,+c[1],+c[2]),c[4]);else if(l=P.maxOpen(o4(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d{l=d(l,e,a)}),l}var r4=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function o4(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&H2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=q2(s[s.length-1],i.length));let c=$2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return A.from(s)}return e}function $2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,A.from(e));return e}function H2(e,t,n,r,o){if(o1&&(i=0),o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(A.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function d2(e,t,n){return tn})),j0.createHTML(e)):e}function s4(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=W2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&V2[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=i4(e),o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=A.from(a.create(r[l+1],o)),i++,s++}return new P(o,i,s)}var Dt={},It={},u4={touchstart:!0,touchmove:!0},lg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function c4(e){for(let t in Dt){let n=Dt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{f4(e,r)&&!bg(e,r)&&(e.editable||!(r.type in It))&&n(e,r)},u4[t]?{passive:!0}:void 0)}_t&&e.dom.addEventListener("input",()=>null),ag(e)}function wo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function d4(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function ag(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>bg(e,r))})}function bg(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function f4(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function p4(e,t){!bg(e,t)&&Dt[t.type]&&(e.editable||!(t.type in It))&&Dt[t.type](e,t)}It.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!K2(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Mr&&et&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Rs&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,di(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||n4(e,n)?n.preventDefault():wo(e,"key")};It.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};It.keypress=(e,t)=>{let n=t;if(K2(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||hn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof H)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function sd(e){return{left:e.clientX,top:e.clientY}}function h4(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function yg(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,l=>s>i.depth?l(e,n,i.nodeAfter,i.before(s),o,!0):l(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Ms(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function m4(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(Ms(e,new $(n),"pointer"),!0):!1}function g4(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof $&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if($.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Ms(e,$.create(e.state.doc,o),"pointer"),!0):!1}function b4(e,t,n,r,o){return yg(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?g4(e,n):m4(e,n))}function y4(e,t,n,r){return yg(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function x4(e,t,n,r){return yg(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||v4(e,n,r)}function v4(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Ms(e,H.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)Ms(e,H.create(r,l+1,l+1+s.content.size),"pointer");else if($.isSelectable(s))Ms(e,$.create(r,l),"pointer");else continue;return!0}}function xg(e){return ed(e)}var j2=hn?"metaKey":"ctrlKey";Dt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=xg(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&h4(n,e.input.lastClick)&&!n[j2]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(sd(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new ug(e,s,n,!!r)):(i=="doubleClick"?y4:x4)(e,s.pos,s.inside,n)?n.preventDefault():wo(e,"pointer"))};var ug=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[j2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}let l=o?null:r.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof $&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),wo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Or(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(sd(t))),this.updateAllowDefault(t),this.allowDefault||!n?wo(this.view,"pointer"):b4(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||_t&&this.mightDrag&&!this.mightDrag.node.isAtom||et&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Ms(this.view,W.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):wo(this.view,"pointer")}move(t){this.updateAllowDefault(t),wo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Dt.touchstart=e=>{e.input.lastTouch=Date.now(),xg(e),wo(e,"pointer")};Dt.touchmove=e=>{e.input.lastTouch=Date.now(),wo(e,"pointer")};Dt.contextmenu=e=>xg(e);function K2(e,t){return e.composing?!0:_t&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var k4=Mr?5e3:-1;It.compositionstart=It.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof H&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||et&&C2&&E4(e)))e.markCursor=e.state.storedMarks||n.marks(),ed(e,!0),e.markCursor=null;else if(ed(e,!t.selection.empty),gn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=e.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}G2(e,k4)};function E4(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}It.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,G2(e,20))};function G2(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ed(e),t))}function J2(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=_4());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function w4(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=v6(t.focusNode,t.focusOffset),r=k6(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function _4(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function ed(e,t=!1){if(!(Mr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),J2(e),t||e.docView&&e.docView.dirty){let n=hg(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function S4(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var pa=qt&&_o<15||Rs&&S6<604;Dt.copy=It.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=pa?null:n.clipboardData,s=r.content(),{dom:l,text:a}=gg(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):S4(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function C4(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function T4(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ha(e,r.value,null,o,t):ha(e,r.textContent,r.innerHTML,o,t)},50)}function ha(e,t,n,r,o){let i=U2(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,o,i||P.empty)))return!0;if(!i)return!1;let s=C4(i),l=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Y2(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}It.paste=(e,t)=>{let n=t;if(e.composing&&!Mr)return;let r=pa?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ha(e,Y2(r),r.getData("text/html"),o,n)?n.preventDefault():T4(e,n)};var td=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},A4=hn?"altKey":"ctrlKey";function Z2(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[A4]}Dt.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(sd(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof $?o.to-1:o.to))){if(r&&r.mightDrag)s=$.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=$.create(e.state.doc,d.posBefore))}}let l=(s||e.state.selection).content(),{dom:a,text:u,slice:c}=gg(e,l);(!n.dataTransfer.files.length||!et||S2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(pa?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",pa||n.dataTransfer.setData("text/plain",u),e.dragging=new td(c,Z2(e,n),s)};Dt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};It.dragover=It.dragenter=(e,t)=>t.preventDefault();It.drop=(e,t)=>{try{N4(e,t,e.dragging)}finally{e.dragging=null}};function N4(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(sd(t));if(!r)return;let o=e.state.doc.resolve(r.pos),i=n&&n.slice;i?e.someProp("transformPasted",p=>{i=p(i,e,!1)}):i=U2(e,Y2(t.dataTransfer),pa?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&Z2(e,t));if(e.someProp("handleDrop",p=>p(e,t,i||P.empty,s))){t.preventDefault();return}if(!i)return;t.preventDefault();let l=i?Vc(e.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let a=e.state.tr;if(s){let{node:p}=n;p?p.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,i.content.firstChild):a.replaceRange(u,u,i),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&$.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new $(f));else{let p=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),a.setSelection(mg(e,f,a.doc.resolve(p)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}Dt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Or(e)},20))};Dt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Dt.beforeinput=(e,t)=>{if(et&&Mr&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,di(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in It)Dt[e]=It[e];function ma(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var nd=class e{constructor(t,n){this.toDOM=t,this.spec=n||mi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Oe(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ma(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},hi=class e{constructor(t,n){this.attrs=t,this.spec=n||mi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Oe(i,s,this)}valid(t,n){return n.from=t&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;st){let l=this.children[s]+1;this.children[s+2].findInner(t-l,n-l,r,o+l,i)}}map(t,n,r){return this==wt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||mi)}mapInner(t,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=Q2(n,l,u)){for(o||(o=this.children.slice());il&&d.to=t){this.children[l]==t&&(r=this.children[l+2]);break}let i=t+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof hi){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(t,n,mi));return e.from(r)}forChild(t,n){if(n.isLeaf)return xe.empty;let r=[];for(let o=0;on instanceof xe)?t:t.reduce((n,r)=>n.concat(r instanceof xe?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-h-(p-f);for(let g=0;gy+c-d)continue;let x=l[g]+c-d;p>=x?l[g+1]=f<=x?-2:-1:f>=c&&b&&(l[g]+=b,l[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=l[u+2].mapInner(n,b,c+1,e[u]+i+1,s);g!=wt?(l[u]=d,l[u+1]=p,l[u+2]=g):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=O4(l,e,t,n,o,i,s),c=od(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=Q2(e,l,a+n);if(u){i=!0;let c=od(u,l,n+a+1,r);c!=wt&&o.push(a,a+l.nodeSize,c)}});let s=X2(i?e_(e):e,-n).sort(gi);for(let l=0;l0;)t++;e.splice(t,0,n)}function K0(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=wt&&t.push(r)}),e.cursorWrapper&&t.push(xe.create(e.state.doc,[e.cursorWrapper.deco])),rd.from(t)}var R4={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},D4=qt&&_o<=11,dg=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},fg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new dg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),D4&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,R4)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(i2(this.view)){if(this.suppressingSelectionUpdates)return Or(this.view);if(qt&&_o<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&bi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Os(i))n.add(i);for(let i=t.anchorNode;i;i=Os(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&i2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||P4(t,d)!=p)&&f.remove()}}}else if((et||_t)&&a.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of a)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),I4(t)),this.handleDOMChange(i,s,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Or(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let g=r.childNodes[b-1],y=g.pmViewDesc;if(g.nodeName=="BR"&&!y){i=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||fn.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:F4,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+s,head:g+s}}return{doc:m,sel:h,from:s,to:l}}function F4(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(_t&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||_t&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var z4=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function U4(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let w=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,_=hg(e,w);if(_&&!e.state.selection.eq(_)){if(et&&Mr&&e.input.lastKeyCode===13&&Date.now()-100C(e,di(13,"Enter"))))return;let T=e.state.tr.setSelection(_);w=="pointer"?T.setMeta("pointer",!0):w=="key"&&T.scrollIntoView(),i&&T.setMeta("composition",i),e.dispatch(T)}return}let s=e.state.doc.resolve(t),l=s.sharedDepth(n);t=s.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=B4(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Mr)&&o.some(w=>w.nodeType==1&&!z4.test(w.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",w=>w(e,di(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&a instanceof H&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let w=b2(e,e.state.doc,u.sel);if(w&&!w.eq(e.state.selection)){let _=e.state.tr.setSelection(w);i&&_.setMeta("composition",i),e.dispatch(_)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),qt&&_o<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),y=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if((Rs&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!y&&m.posw(e,di(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&H4(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",w=>w(e,di(8,"Backspace")))){Mr&&et&&e.domObserver.suppressSelectionUpdates();return}et&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),Mr&&!y&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(w){return w(e,di(13,"Enter"))})},20));let x=h.start,v=h.endA,k=w=>{let _=w||e.state.tr.replace(x,v,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let T=b2(e,_.doc,u.sel);T&&!(et&&e.composing&&T.empty&&(h.start!=h.endB||e.input.lastChromeDeleteOr(e),20));let w=k(e.state.tr.delete(x,v)),_=c.resolve(h.start).marksAcross(c.resolve(h.endA));_&&w.ensureMarks(_),e.dispatch(w)}else if(h.endA==h.endB&&(E=$4(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let w=k(e.state.tr);E.type=="add"?w.addMark(x,v,E.mark):w.removeMark(x,v,E.mark),e.dispatch(w)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let w=m.parent.textBetween(m.parentOffset,b.parentOffset),_=()=>k(e.state.tr.insertText(w,x,v));e.someProp("handleTextInput",T=>T(e,x,v,w,_))||e.dispatch(_())}else e.dispatch(k());else e.dispatch(k())}function b2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:mg(e,t.resolve(n.anchor),t.resolve(n.head))}function $4(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||G0(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function q4(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,i&&i=l?i-r:0;i-=a,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}var ga=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new lg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(w2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=k2(this),v2(this),this.nodeViews=E2(this),this.docView=Qw(this.state.doc,x2(this),K0(this),this.dom,this),this.domObserver=new fg(this,(r,o,i,s)=>U4(this,r,o,i,s)),this.domObserver.start(),c4(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&ag(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(w2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(J2(this),s=!0),this.state=t;let l=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=E2(this);W4(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&ag(this),this.editable=k2(this),v2(this);let a=K0(this),u=x2(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,u,a);(d||!t.selection.eq(o.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&A6(this);if(s){this.domObserver.stop();let p=d&&(qt||et)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&V4(o.selection,t.selection);if(d){let h=et?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=w4(this)),(i||!this.docView.update(t.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Qw(t.doc,u,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&J6(this))?Or(this,p):(B2(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&N6(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof $){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Kw(this,n.getBoundingClientRect(),t)}else Kw(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new td(t.slice,t.move,o<0?void 0:$.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return L6(this,t)}coordsAtPos(t,n=1){return O2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return U6(this,n||this.state,t)}pasteHTML(t,n){return ha(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ha(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return gg(this,t)}destroy(){this.docView&&(d4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],K0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,y6())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return p4(this,t)}domSelectionRange(){let t=this.domSelection();return t?_t&&this.root.nodeType===11&&w6(this.dom.ownerDocument)==this.dom&&L4(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};ga.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function x2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Oe.node(0,e.state.doc.content.size,t)]}function v2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Oe.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function k2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function V4(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function E2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function W4(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function w2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Rr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ad={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},j4=typeof navigator<"u"&&/Mac/.test(navigator.platform),K4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ke=0;Ke<10;Ke++)Rr[48+Ke]=Rr[96+Ke]=String(Ke);var Ke;for(Ke=1;Ke<=24;Ke++)Rr[Ke+111]="F"+Ke;var Ke;for(Ke=65;Ke<=90;Ke++)Rr[Ke]=String.fromCharCode(Ke+32),ad[Ke]=String.fromCharCode(Ke);var Ke;for(ld in Rr)ad.hasOwnProperty(ld)||(ad[ld]=Rr[ld]);var ld;function t_(e){var t=j4&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||K4&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ad:Rr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var G4=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),J4=typeof navigator<"u"&&/Win/.test(navigator.platform);function Y4(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l{for(var n in t)X4(e,n,{get:t[n],enumerable:!0})};function md(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var gd=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...u)=>{let c=l(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!e,a=e||o.tr,u=()=>(!l&&t&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(a,t),b=f(...h)(m);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...u)=>a(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:md({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,a])=>[l,(...u)=>a(...u)(s)]))}};return s}},d_={};Tg(d_,{blur:()=>Q4,clearContent:()=>eI,clearNodes:()=>tI,command:()=>nI,createParagraphNear:()=>rI,cut:()=>oI,deleteCurrentNode:()=>iI,deleteNode:()=>sI,deleteRange:()=>lI,deleteSelection:()=>aI,enter:()=>uI,exitCode:()=>cI,extendMarkRange:()=>dI,first:()=>fI,focus:()=>pI,forEach:()=>hI,insertContent:()=>mI,insertContentAt:()=>yI,joinBackward:()=>kI,joinDown:()=>vI,joinForward:()=>EI,joinItemBackward:()=>wI,joinItemForward:()=>_I,joinTextblockBackward:()=>SI,joinTextblockForward:()=>CI,joinUp:()=>xI,keyboardShortcut:()=>AI,lift:()=>NI,liftEmptyBlock:()=>MI,liftListItem:()=>OI,newlineInCode:()=>RI,resetAttributes:()=>DI,scrollIntoView:()=>II,selectAll:()=>LI,selectNodeBackward:()=>PI,selectNodeForward:()=>BI,selectParentNode:()=>FI,selectTextblockEnd:()=>zI,selectTextblockStart:()=>UI,setContent:()=>$I,setMark:()=>tL,setMeta:()=>nL,setNode:()=>rL,setNodeSelection:()=>oL,setTextDirection:()=>iL,setTextSelection:()=>sL,sinkListItem:()=>lL,splitBlock:()=>aL,splitListItem:()=>uL,toggleList:()=>cL,toggleMark:()=>dL,toggleNode:()=>fL,toggleWrap:()=>pL,undoInputRule:()=>hL,unsetAllMarks:()=>mL,unsetMark:()=>gL,unsetTextDirection:()=>bL,updateAttributes:()=>yL,wrapIn:()=>xL,wrapInList:()=>vL});var Q4=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),eI=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),tI=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(a)),f=u.resolve(c.map(a+l.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Tr(p);if(l.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},nI=e=>t=>e(t),rI=()=>({state:e,dispatch:t})=>F0(e,t),oI=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new H(r.doc.resolve(Math.max(s-1,0)))),!0},iI=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){let l=o.before(i),a=o.after(i);e.delete(l,a).scrollIntoView()}return!0}return!1};function ze(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var sI=e=>({tr:t,state:n,dispatch:r})=>{let o=ze(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let a=i.before(s),u=i.after(s);t.delete(a,u).scrollIntoView()}return!0}return!1},lI=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},aI=()=>({state:e,dispatch:t})=>Gc(e,t),uI=()=>({commands:e})=>e.keyboardShortcut("Enter"),cI=()=>({state:e,dispatch:t})=>B0(e,t);function Ag(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function hd(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:Ag(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function f_(e,t,n={}){return e.find(r=>r.type===t&&hd(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function r_(e,t,n={}){return!!f_(e,t,n)}function Ng(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!f_([...o.node.marks],t,n)))return;let s=o.index,l=e.start()+o.offset,a=s+1,u=l+o.node.nodeSize;for(;s>0&&r_([...e.parent.child(s-1).marks],t,n);)s-=1,l-=e.parent.child(s).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{let i=Ir(e,r.schema),{doc:s,selection:l}=n,{$from:a,from:u,to:c}=l;if(o){let d=Ng(a,i,t);if(d&&d.from<=u&&d.to>=c){let f=H.create(s,d.from,d.to);n.setSelection(f)}}return!0},fI=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};let s=()=>{(yd()||h_())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!bd(n.state.selection))return s(),!0;let l=p_(o.doc,e)||n.state.selection,a=n.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},hI=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),mI=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),m_=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&m_(r)}return e};function ud(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return m_(n)}function va(e,t,n){if(e instanceof Ht||e instanceof A)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return A.fromArray(e.map(l=>t.nodeFromJSON(l)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return va("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="",a=new yo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?fn.fromSchema(a).parseSlice(ud(e),n.parseOptions):fn.fromSchema(a).parse(ud(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let i=fn.fromSchema(t);return n.slice?i.parseSlice(ud(e),n.parseOptions).content:i.parse(ud(e),n.parseOptions)}return va("",t,n)}function gI(e,t,n){let r=e.steps.length-1;if(r{s===0&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var bI=e=>!("type"in e),yI=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l,a=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{va(t,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){a(b)}try{l=va(t,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return a(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((bI(l)?l:[l]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof A){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else{m=l;let b=r.doc.resolve(c),g=b.node(),y=b.parentOffset===0,x=g.isText||g.isTextblock,v=g.content.size>0;y&&x&&v&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&gI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},xI=()=>({state:e,dispatch:t})=>Lw(e,t),vI=()=>({state:e,dispatch:t})=>Pw(e,t),kI=()=>({state:e,dispatch:t})=>N0(e,t),EI=()=>({state:e,dispatch:t})=>R0(e,t),wI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=ui(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},_I=()=>({state:e,dispatch:t,tr:n})=>{try{let r=ui(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},SI=()=>({state:e,dispatch:t})=>Ow(e,t),CI=()=>({state:e,dispatch:t})=>Rw(e,t);function g_(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function TI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l({editor:t,view:n,tr:r,dispatch:o})=>{let i=TI(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function Yn(e,t,n={}){let{from:r,to:o,empty:i}=e.selection,s=t?ze(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);l.push({node:d,from:p,to:h})});let a=o-r,u=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>hd(d.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=a}var NI=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Yn(n,o,t)?Bw(n,r):!1},MI=()=>({state:e,dispatch:t})=>z0(e,t),OI=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return qw(r)(t,n)},RI=()=>({state:e,dispatch:t})=>L0(e,t);function xd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function o_(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var DI=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=xd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Ir(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{i&&i===c.type&&(a=!0,o&&n.setNodeMarkup(d,void 0,o_(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(a=!0,o&&n.addMark(d,d+c.nodeSize,s.create(o_(f.attrs,t))))})})}),a},II=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),LI=()=>({tr:e,dispatch:t})=>{if(t){let n=new Rt(e.doc);e.setSelection(n)}return!0},PI=()=>({state:e,dispatch:t})=>M0(e,t),BI=()=>({state:e,dispatch:t})=>D0(e,t),FI=()=>({state:e,dispatch:t})=>Fw(e,t),zI=()=>({state:e,dispatch:t})=>$0(e,t),UI=()=>({state:e,dispatch:t})=>U0(e,t);function Sg(e,t,n={},r={}){return va(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var $I=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{let{doc:a}=i;if(r.preserveWhitespace!=="full"){let u=Sg(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:a.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function b_(e,t){let n=Ir(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function Mg(e,t){let n=new xo(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function HI(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function y_(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Og(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function kd(e){return t=>Og(t.$from,e)}function K(e,t,n){return e.config[t]===void 0&&e.parent?K(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?K(e.parent,t,n):null}):e.config[t]}function Rg(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=K(t,"addExtensions",n);return r?[t,...Rg(r())]:t}).flat(10)}function Bs(e,t){let n=_r.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function x_(e){return typeof e=="function"}function he(e,t=void 0,...n){return x_(e)?t?e.bind(t)(...n):e(...n):e}function qI(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Ls(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function v_(e){let t=[],{nodeExtensions:n,markExtensions:r}=Ls(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage,extensions:o},a=K(s,"addGlobalAttributes",l);if(!a)return;a().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage},a=K(s,"addAttributes",l);if(!a)return;let u=a();Object.entries(u).forEach(([c,d])=>{let f={...i,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:s.name,name:c,attribute:f})})}),t}function te(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let l=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(c=>!a.includes(c));r[o]=[...a,...u].join(" ")}else if(o==="style"){let l=i?i.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;a.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function Ps(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>te(n,r),{})}function VI(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function i_(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((i,s)=>{let l=s.attribute.parseHTML?s.attribute.parseHTML(n):VI(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function s_(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&qI(n)?!1:n!=null))}function l_(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function WI(e,t){var n;let r=v_(e),{nodeExtensions:o,markExtensions:i}=Ls(e),s=(n=o.find(u=>K(u,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,y)=>{let x=K(y,"extendNodeSchema",d);return{...g,...x?x(u):{}}},{}),p=s_({...f,content:he(K(u,"content",d)),marks:he(K(u,"marks",d)),group:he(K(u,"group",d)),inline:he(K(u,"inline",d)),atom:he(K(u,"atom",d)),selectable:he(K(u,"selectable",d)),draggable:he(K(u,"draggable",d)),code:he(K(u,"code",d)),whitespace:he(K(u,"whitespace",d)),linebreakReplacement:he(K(u,"linebreakReplacement",d)),defining:he(K(u,"defining",d)),isolating:he(K(u,"isolating",d)),attrs:Object.fromEntries(c.map(l_))}),h=he(K(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>i_(g,c)));let m=K(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:Ps(g,c)}));let b=K(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),a=Object.fromEntries(i.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let y=K(g,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=s_({...f,inclusive:he(K(u,"inclusive",d)),excludes:he(K(u,"excludes",d)),group:he(K(u,"group",d)),spanning:he(K(u,"spanning",d)),code:he(K(u,"code",d)),attrs:Object.fromEntries(c.map(l_))}),h=he(K(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>i_(b,c)));let m=K(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:Ps(b,c)})),[u.name,p]}));return new yo({topNode:s,nodes:l,marks:a})}function jI(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Dg(e){return e.sort((n,r)=>{let o=K(n,"priority")||100,i=K(r,"priority")||100;return o>i?-1:or.name)).length,t}function E_(e,t,n){let{from:r,to:o}=t,{blockSeparator:i=` +`);return{dom:a,text:f,slice:t}}function H2(e,t,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!t)return null;let a=!!t&&(r||i||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return l=new P(T.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)l=d;else{let f=o.marks(),{schema:p}=e.state,h=_r.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(g=>{let b=s.appendChild(document.createElement("p"));g&&b.appendChild(h.serializeNode(p.text(g,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=i4(n),ya&&s4(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||fn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!n4.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=l4(p2(l,+c[1],+c[2]),c[4]);else if(l=P.maxOpen(r4(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d{l=d(l,e,a)}),l}var n4=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function r4(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&q2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=W2(s[s.length-1],i.length));let c=V2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return T.from(s)}return e}function V2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,T.from(e));return e}function q2(e,t,n,r,o){if(o1&&(i=0),o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(T.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function p2(e,t,n){return tn})),K0.createHTML(e)):e}function i4(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=K2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&j2[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=o4(e),o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=T.from(a.create(r[l+1],o)),i++,s++}return new P(o,i,s)}var Dt={},It={},a4={touchstart:!0,touchmove:!0},ag=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function u4(e){for(let t in Dt){let n=Dt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{d4(e,r)&&!yg(e,r)&&(e.editable||!(r.type in It))&&n(e,r)},a4[t]?{passive:!0}:void 0)}_t&&e.dom.addEventListener("input",()=>null),ug(e)}function wo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function c4(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function ug(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>yg(e,r))})}function yg(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function d4(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function f4(e,t){!yg(e,t)&&Dt[t.type]&&(e.editable||!(t.type in It))&&Dt[t.type](e,t)}It.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Y2(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Mr&&et&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Rs&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,di(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||t4(e,n)?n.preventDefault():wo(e,"key")};It.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};It.keypress=(e,t)=>{let n=t;if(Y2(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||hn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof H)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function sd(e){return{left:e.clientX,top:e.clientY}}function p4(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function xg(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,l=>s>i.depth?l(e,n,i.nodeAfter,i.before(s),o,!0):l(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Ms(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function h4(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(Ms(e,new $(n),"pointer"),!0):!1}function m4(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof $&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if($.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Ms(e,$.create(e.state.doc,o),"pointer"),!0):!1}function g4(e,t,n,r,o){return xg(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?m4(e,n):h4(e,n))}function b4(e,t,n,r){return xg(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function y4(e,t,n,r){return xg(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||x4(e,n,r)}function x4(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Ms(e,H.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)Ms(e,H.create(r,l+1,l+1+s.content.size),"pointer");else if($.isSelectable(s))Ms(e,$.create(r,l),"pointer");else continue;return!0}}function vg(e){return ed(e)}var G2=hn?"metaKey":"ctrlKey";Dt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=vg(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&p4(n,e.input.lastClick)&&!n[G2]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(sd(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new cg(e,s,n,!!r)):(i=="doubleClick"?b4:y4)(e,s.pos,s.inside,n)?n.preventDefault():wo(e,"pointer"))};var cg=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[G2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}let l=o?null:r.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof $&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),wo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Or(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(sd(t))),this.updateAllowDefault(t),this.allowDefault||!n?wo(this.view,"pointer"):g4(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||_t&&this.mightDrag&&!this.mightDrag.node.isAtom||et&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Ms(this.view,W.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):wo(this.view,"pointer")}move(t){this.updateAllowDefault(t),wo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Dt.touchstart=e=>{e.input.lastTouch=Date.now(),vg(e),wo(e,"pointer")};Dt.touchmove=e=>{e.input.lastTouch=Date.now(),wo(e,"pointer")};Dt.contextmenu=e=>vg(e);function Y2(e,t){return e.composing?!0:_t&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var v4=Mr?5e3:-1;It.compositionstart=It.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof H&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||et&&T2&&k4(e)))e.markCursor=e.state.storedMarks||n.marks(),ed(e,!0),e.markCursor=null;else if(ed(e,!t.selection.empty),gn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=e.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}J2(e,v4)};function k4(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}It.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,J2(e,20))};function J2(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ed(e),t))}function Z2(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=w4());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function E4(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=x6(t.focusNode,t.focusOffset),r=v6(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function w4(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function ed(e,t=!1){if(!(Mr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Z2(e),t||e.docView&&e.docView.dirty){let n=mg(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function _4(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var pa=Vt&&_o<15||Rs&&_6<604;Dt.copy=It.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=pa?null:n.clipboardData,s=r.content(),{dom:l,text:a}=bg(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):_4(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function S4(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function C4(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ha(e,r.value,null,o,t):ha(e,r.textContent,r.innerHTML,o,t)},50)}function ha(e,t,n,r,o){let i=H2(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,o,i||P.empty)))return!0;if(!i)return!1;let s=S4(i),l=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function X2(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}It.paste=(e,t)=>{let n=t;if(e.composing&&!Mr)return;let r=pa?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ha(e,X2(r),r.getData("text/html"),o,n)?n.preventDefault():C4(e,n)};var td=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},A4=hn?"altKey":"ctrlKey";function Q2(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[A4]}Dt.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(sd(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof $?o.to-1:o.to))){if(r&&r.mightDrag)s=$.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=$.create(e.state.doc,d.posBefore))}}let l=(s||e.state.selection).content(),{dom:a,text:u,slice:c}=bg(e,l);(!n.dataTransfer.files.length||!et||A2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(pa?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",pa||n.dataTransfer.setData("text/plain",u),e.dragging=new td(c,Q2(e,n),s)};Dt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};It.dragover=It.dragenter=(e,t)=>t.preventDefault();It.drop=(e,t)=>{try{T4(e,t,e.dragging)}finally{e.dragging=null}};function T4(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(sd(t));if(!r)return;let o=e.state.doc.resolve(r.pos),i=n&&n.slice;i?e.someProp("transformPasted",p=>{i=p(i,e,!1)}):i=H2(e,X2(t.dataTransfer),pa?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&Q2(e,t));if(e.someProp("handleDrop",p=>p(e,t,i||P.empty,s))){t.preventDefault();return}if(!i)return;t.preventDefault();let l=i?qc(e.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let a=e.state.tr;if(s){let{node:p}=n;p?p.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,i.content.firstChild):a.replaceRange(u,u,i),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&$.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new $(f));else{let p=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((h,g,b,m)=>p=m),a.setSelection(gg(e,f,a.doc.resolve(p)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}Dt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Or(e)},20))};Dt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Dt.beforeinput=(e,t)=>{if(et&&Mr&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,di(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in It)Dt[e]=It[e];function ma(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var nd=class e{constructor(t,n){this.toDOM=t,this.spec=n||mi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Oe(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ma(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},hi=class e{constructor(t,n){this.attrs=t,this.spec=n||mi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Oe(i,s,this)}valid(t,n){return n.from=t&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;st){let l=this.children[s]+1;this.children[s+2].findInner(t-l,n-l,r,o+l,i)}}map(t,n,r){return this==wt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||mi)}mapInner(t,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=t_(n,l,u)){for(o||(o=this.children.slice());il&&d.to=t){this.children[l]==t&&(r=this.children[l+2]);break}let i=t+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof hi){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(t,n,mi));return e.from(r)}forChild(t,n){if(n.isLeaf)return xe.empty;let r=[];for(let o=0;on instanceof xe)?t:t.reduce((n,r)=>n.concat(r instanceof xe?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=g-h-(p-f);for(let m=0;my+c-d)continue;let x=l[m]+c-d;p>=x?l[m+1]=f<=x?-2:-1:f>=c&&b&&(l[m]+=b,l[m+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-o,{index:h,offset:g}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&g==d&&g+b.nodeSize==p){let m=l[u+2].mapInner(n,b,c+1,e[u]+i+1,s);m!=wt?(l[u]=d,l[u+1]=p,l[u+2]=m):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=M4(l,e,t,n,o,i,s),c=od(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=t_(e,l,a+n);if(u){i=!0;let c=od(u,l,n+a+1,r);c!=wt&&o.push(a,a+l.nodeSize,c)}});let s=e_(i?n_(e):e,-n).sort(gi);for(let l=0;l0;)t++;e.splice(t,0,n)}function G0(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=wt&&t.push(r)}),e.cursorWrapper&&t.push(xe.create(e.state.doc,[e.cursorWrapper.deco])),rd.from(t)}var O4={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},R4=Vt&&_o<=11,fg=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},pg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new fg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),R4&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,O4)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(l2(this.view)){if(this.suppressingSelectionUpdates)return Or(this.view);if(Vt&&_o<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&bi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Os(i))n.add(i);for(let i=t.anchorNode;i;i=Os(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&l2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||L4(t,d)!=p)&&f.remove()}}}else if((et||_t)&&a.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of a)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),D4(t)),this.handleDOMChange(i,s,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Or(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let m=r.childNodes[b-1],y=m.pmViewDesc;if(m.nodeName=="BR"&&!y){i=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||fn.fromSchema(e.state.schema),p=d.resolve(s),h=null,g=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:B4,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,m=u[1]&&u[1].pos;m==null&&(m=b),h={anchor:b+s,head:m+s}}return{doc:g,sel:h,from:s,to:l}}function B4(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(_t&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||_t&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var F4=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function z4(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let w=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,_=mg(e,w);if(_&&!e.state.selection.eq(_)){if(et&&Mr&&e.input.lastKeyCode===13&&Date.now()-100C(e,di(13,"Enter"))))return;let A=e.state.tr.setSelection(_);w=="pointer"?A.setMeta("pointer",!0):w=="key"&&A.scrollIntoView(),i&&A.setMeta("composition",i),e.dispatch(A)}return}let s=e.state.doc.resolve(t),l=s.sharedDepth(n);t=s.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=P4(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Mr)&&o.some(w=>w.nodeType==1&&!F4.test(w.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",w=>w(e,di(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&a instanceof H&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let w=x2(e,e.state.doc,u.sel);if(w&&!w.eq(e.state.selection)){let _=e.state.tr.setSelection(w);i&&_.setMeta("composition",i),e.dispatch(_)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Vt&&_o<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let g=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),m=c.resolve(h.start),y=g.sameParent(b)&&g.parent.inlineContent&&m.end()>=h.endA;if((Rs&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!y&&g.posw(e,di(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&$4(c,h.start,h.endA,g,b)&&e.someProp("handleKeyDown",w=>w(e,di(8,"Backspace")))){Mr&&et&&e.domObserver.suppressSelectionUpdates();return}et&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),Mr&&!y&&g.start()!=b.start()&&b.parentOffset==0&&g.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(w){return w(e,di(13,"Enter"))})},20));let x=h.start,v=h.endA,k=w=>{let _=w||e.state.tr.replace(x,v,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let A=x2(e,_.doc,u.sel);A&&!(et&&e.composing&&A.empty&&(h.start!=h.endB||e.input.lastChromeDeleteOr(e),20));let w=k(e.state.tr.delete(x,v)),_=c.resolve(h.start).marksAcross(c.resolve(h.endA));_&&w.ensureMarks(_),e.dispatch(w)}else if(h.endA==h.endB&&(E=U4(g.parent.content.cut(g.parentOffset,b.parentOffset),m.parent.content.cut(m.parentOffset,h.endA-m.start())))){let w=k(e.state.tr);E.type=="add"?w.addMark(x,v,E.mark):w.removeMark(x,v,E.mark),e.dispatch(w)}else if(g.parent.child(g.index()).isText&&g.index()==b.index()-(b.textOffset?0:1)){let w=g.parent.textBetween(g.parentOffset,b.parentOffset),_=()=>k(e.state.tr.insertText(w,x,v));e.someProp("handleTextInput",A=>A(e,x,v,w,_))||e.dispatch(_())}else e.dispatch(k());else e.dispatch(k())}function x2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:gg(e,t.resolve(n.anchor),t.resolve(n.head))}function U4(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||Y0(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function H4(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,i&&i=l?i-r:0;i-=a,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}var ga=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ag,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(S2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=w2(this),E2(this),this.nodeViews=_2(this),this.docView=t2(this.state.doc,k2(this),G0(this),this.dom,this),this.domObserver=new pg(this,(r,o,i,s)=>z4(this,r,o,i,s)),this.domObserver.start(),u4(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&ug(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(S2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(Z2(this),s=!0),this.state=t;let l=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=_2(this);q4(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&ug(this),this.editable=w2(this),E2(this);let a=G0(this),u=k2(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,u,a);(d||!t.selection.eq(o.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&A6(this);if(s){this.domObserver.stop();let p=d&&(Vt||et)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&V4(o.selection,t.selection);if(d){let h=et?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=E4(this)),(i||!this.docView.update(t.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=t2(t.doc,u,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&G6(this))?Or(this,p):(z2(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&T6(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof $){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Yw(this,n.getBoundingClientRect(),t)}else Yw(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new td(t.slice,t.move,o<0?void 0:$.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return I6(this,t)}coordsAtPos(t,n=1){return D2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return z6(this,n||this.state,t)}pasteHTML(t,n){return ha(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ha(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return bg(this,t)}destroy(){this.docView&&(c4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],G0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,b6())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return f4(this,t)}domSelectionRange(){let t=this.domSelection();return t?_t&&this.root.nodeType===11&&E6(this.dom.ownerDocument)==this.dom&&I4(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};ga.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function k2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Oe.node(0,e.state.doc.content.size,t)]}function E2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Oe.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function w2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function V4(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function _2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function q4(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function S2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Rr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ad={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},W4=typeof navigator<"u"&&/Mac/.test(navigator.platform),j4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ke=0;Ke<10;Ke++)Rr[48+Ke]=Rr[96+Ke]=String(Ke);var Ke;for(Ke=1;Ke<=24;Ke++)Rr[Ke+111]="F"+Ke;var Ke;for(Ke=65;Ke<=90;Ke++)Rr[Ke]=String.fromCharCode(Ke+32),ad[Ke]=String.fromCharCode(Ke);var Ke;for(ld in Rr)ad.hasOwnProperty(ld)||(ad[ld]=Rr[ld]);var ld;function r_(e){var t=W4&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||j4&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ad:Rr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var K4=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),G4=typeof navigator<"u"&&/Win/.test(navigator.platform);function Y4(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l{for(var n in t)Z4(e,n,{get:t[n],enumerable:!0})};function md(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var gd=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...u)=>{let c=l(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!e,a=e||o.tr,u=()=>(!l&&t&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let g=this.buildProps(a,t),b=f(...h)(g);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...u)=>a(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:md({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,a])=>[l,(...u)=>a(...u)(s)]))}};return s}},p_={};Tg(p_,{blur:()=>X4,clearContent:()=>Q4,clearNodes:()=>eI,command:()=>tI,createParagraphNear:()=>nI,cut:()=>rI,deleteCurrentNode:()=>oI,deleteNode:()=>iI,deleteRange:()=>sI,deleteSelection:()=>lI,enter:()=>aI,exitCode:()=>uI,extendMarkRange:()=>cI,first:()=>dI,focus:()=>fI,forEach:()=>pI,insertContent:()=>hI,insertContentAt:()=>bI,joinBackward:()=>vI,joinDown:()=>xI,joinForward:()=>kI,joinItemBackward:()=>EI,joinItemForward:()=>wI,joinTextblockBackward:()=>_I,joinTextblockForward:()=>SI,joinUp:()=>yI,keyboardShortcut:()=>AI,lift:()=>TI,liftEmptyBlock:()=>NI,liftListItem:()=>MI,newlineInCode:()=>OI,resetAttributes:()=>RI,scrollIntoView:()=>DI,selectAll:()=>II,selectNodeBackward:()=>LI,selectNodeForward:()=>PI,selectParentNode:()=>BI,selectTextblockEnd:()=>FI,selectTextblockStart:()=>zI,setContent:()=>UI,setMark:()=>eL,setMeta:()=>tL,setNode:()=>nL,setNodeSelection:()=>rL,setTextDirection:()=>oL,setTextSelection:()=>iL,sinkListItem:()=>sL,splitBlock:()=>lL,splitListItem:()=>aL,toggleList:()=>uL,toggleMark:()=>cL,toggleNode:()=>dL,toggleWrap:()=>fL,undoInputRule:()=>pL,unsetAllMarks:()=>hL,unsetMark:()=>mL,unsetTextDirection:()=>gL,updateAttributes:()=>bL,wrapIn:()=>yL,wrapInList:()=>xL});var X4=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),Q4=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),eI=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(a)),f=u.resolve(c.map(a+l.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Ar(p);if(l.type.isTextblock){let{defaultType:g}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,g)}(h||h===0)&&t.lift(p,h)})}),!0},tI=e=>t=>e(t),nI=()=>({state:e,dispatch:t})=>z0(e,t),rI=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new H(r.doc.resolve(Math.max(s-1,0)))),!0},oI=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){let l=o.before(i),a=o.after(i);e.delete(l,a).scrollIntoView()}return!0}return!1};function ze(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var iI=e=>({tr:t,state:n,dispatch:r})=>{let o=ze(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let a=i.before(s),u=i.after(s);t.delete(a,u).scrollIntoView()}return!0}return!1},sI=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},lI=()=>({state:e,dispatch:t})=>Gc(e,t),aI=()=>({commands:e})=>e.keyboardShortcut("Enter"),uI=()=>({state:e,dispatch:t})=>F0(e,t);function Ng(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function hd(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:Ng(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function h_(e,t,n={}){return e.find(r=>r.type===t&&hd(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function i_(e,t,n={}){return!!h_(e,t,n)}function Mg(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!h_([...o.node.marks],t,n)))return;let s=o.index,l=e.start()+o.offset,a=s+1,u=l+o.node.nodeSize;for(;s>0&&i_([...e.parent.child(s-1).marks],t,n);)s-=1,l-=e.parent.child(s).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{let i=Ir(e,r.schema),{doc:s,selection:l}=n,{$from:a,from:u,to:c}=l;if(o){let d=Mg(a,i,t);if(d&&d.from<=u&&d.to>=c){let f=H.create(s,d.from,d.to);n.setSelection(f)}}return!0},dI=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};let s=()=>{(yd()||g_())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!bd(n.state.selection))return s(),!0;let l=m_(o.doc,e)||n.state.selection,a=n.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},pI=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),hI=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),b_=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&b_(r)}return e};function ud(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return b_(n)}function va(e,t,n){if(e instanceof Ht||e instanceof T)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return T.fromArray(e.map(l=>t.nodeFromJSON(l)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return va("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="",a=new yo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?fn.fromSchema(a).parseSlice(ud(e),n.parseOptions):fn.fromSchema(a).parse(ud(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let i=fn.fromSchema(t);return n.slice?i.parseSlice(ud(e),n.parseOptions).content:i.parse(ud(e),n.parseOptions)}return va("",t,n)}function mI(e,t,n){let r=e.steps.length-1;if(r{s===0&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var gI=e=>!("type"in e),bI=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l,a=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{va(t,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){a(b)}try{l=va(t,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return a(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((gI(l)?l:[l]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let g;if(f){if(Array.isArray(t))g=t.map(b=>b.text||"").join("");else if(t instanceof T){let b="";t.forEach(m=>{m.text&&(b+=m.text)}),g=b}else typeof t=="object"&&t&&t.text?g=t.text:g=t;r.insertText(g,c,d)}else{g=l;let b=r.doc.resolve(c),m=b.node(),y=b.parentOffset===0,x=m.isText||m.isTextblock,v=m.content.size>0;y&&x&&v&&(c=Math.max(0,c-1)),r.replaceWith(c,d,g)}n.updateSelection&&mI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:g})}return!0},yI=()=>({state:e,dispatch:t})=>Bw(e,t),xI=()=>({state:e,dispatch:t})=>Fw(e,t),vI=()=>({state:e,dispatch:t})=>M0(e,t),kI=()=>({state:e,dispatch:t})=>D0(e,t),EI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=ui(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},wI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=ui(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},_I=()=>({state:e,dispatch:t})=>Dw(e,t),SI=()=>({state:e,dispatch:t})=>Iw(e,t);function y_(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function CI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l({editor:t,view:n,tr:r,dispatch:o})=>{let i=CI(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function Jn(e,t,n={}){let{from:r,to:o,empty:i}=e.selection,s=t?ze(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);l.push({node:d,from:p,to:h})});let a=o-r,u=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>hd(d.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=a}var TI=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Jn(n,o,t)?zw(n,r):!1},NI=()=>({state:e,dispatch:t})=>U0(e,t),MI=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return Ww(r)(t,n)},OI=()=>({state:e,dispatch:t})=>P0(e,t);function xd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function s_(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var RI=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=xd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Ir(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{i&&i===c.type&&(a=!0,o&&n.setNodeMarkup(d,void 0,s_(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(a=!0,o&&n.addMark(d,d+c.nodeSize,s.create(s_(f.attrs,t))))})})}),a},DI=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),II=()=>({tr:e,dispatch:t})=>{if(t){let n=new Rt(e.doc);e.setSelection(n)}return!0},LI=()=>({state:e,dispatch:t})=>O0(e,t),PI=()=>({state:e,dispatch:t})=>I0(e,t),BI=()=>({state:e,dispatch:t})=>Uw(e,t),FI=()=>({state:e,dispatch:t})=>H0(e,t),zI=()=>({state:e,dispatch:t})=>$0(e,t);function Cg(e,t,n={},r={}){return va(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var UI=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{let{doc:a}=i;if(r.preserveWhitespace!=="full"){let u=Cg(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:a.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function x_(e,t){let n=Ir(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function Og(e,t){let n=new xo(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function $I(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function v_(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Rg(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function kd(e){return t=>Rg(t.$from,e)}function K(e,t,n){return e.config[t]===void 0&&e.parent?K(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?K(e.parent,t,n):null}):e.config[t]}function Dg(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=K(t,"addExtensions",n);return r?[t,...Dg(r())]:t}).flat(10)}function Bs(e,t){let n=_r.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function k_(e){return typeof e=="function"}function he(e,t=void 0,...n){return k_(e)?t?e.bind(t)(...n):e(...n):e}function HI(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Ls(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function E_(e){let t=[],{nodeExtensions:n,markExtensions:r}=Ls(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage,extensions:o},a=K(s,"addGlobalAttributes",l);if(!a)return;a().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage},a=K(s,"addAttributes",l);if(!a)return;let u=a();Object.entries(u).forEach(([c,d])=>{let f={...i,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:s.name,name:c,attribute:f})})}),t}function te(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let l=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(c=>!a.includes(c));r[o]=[...a,...u].join(" ")}else if(o==="style"){let l=i?i.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;a.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function Ps(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>te(n,r),{})}function VI(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function l_(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((i,s)=>{let l=s.attribute.parseHTML?s.attribute.parseHTML(n):VI(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function a_(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&HI(n)?!1:n!=null))}function u_(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function qI(e,t){var n;let r=E_(e),{nodeExtensions:o,markExtensions:i}=Ls(e),s=(n=o.find(u=>K(u,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(u=>{let c=r.filter(m=>m.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((m,y)=>{let x=K(y,"extendNodeSchema",d);return{...m,...x?x(u):{}}},{}),p=a_({...f,content:he(K(u,"content",d)),marks:he(K(u,"marks",d)),group:he(K(u,"group",d)),inline:he(K(u,"inline",d)),atom:he(K(u,"atom",d)),selectable:he(K(u,"selectable",d)),draggable:he(K(u,"draggable",d)),code:he(K(u,"code",d)),whitespace:he(K(u,"whitespace",d)),linebreakReplacement:he(K(u,"linebreakReplacement",d)),defining:he(K(u,"defining",d)),isolating:he(K(u,"isolating",d)),attrs:Object.fromEntries(c.map(u_))}),h=he(K(u,"parseHTML",d));h&&(p.parseDOM=h.map(m=>l_(m,c)));let g=K(u,"renderHTML",d);g&&(p.toDOM=m=>g({node:m,HTMLAttributes:Ps(m,c)}));let b=K(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),a=Object.fromEntries(i.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,m)=>{let y=K(m,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=a_({...f,inclusive:he(K(u,"inclusive",d)),excludes:he(K(u,"excludes",d)),group:he(K(u,"group",d)),spanning:he(K(u,"spanning",d)),code:he(K(u,"code",d)),attrs:Object.fromEntries(c.map(u_))}),h=he(K(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>l_(b,c)));let g=K(u,"renderHTML",d);return g&&(p.toDOM=b=>g({mark:b,HTMLAttributes:Ps(b,c)})),[u.name,p]}));return new yo({topNode:s,nodes:l,marks:a})}function WI(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Ig(e){return e.sort((n,r)=>{let o=K(n,"priority")||100,i=K(r,"priority")||100;return o>i?-1:or.name)).length,t}function __(e,t,n){let{from:r,to:o}=t,{blockSeparator:i=` -`,textSerializers:s={}}=n||{},l="";return e.nodesBetween(r,o,(a,u,c,d)=>{var f;a.isBlock&&u>r&&(l+=i);let p=s?.[a.type.name];if(p)return c&&(l+=p({node:a,pos:u,parent:c,index:d,range:t})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),l}function Ig(e,t){let n={from:0,to:e.content.size};return E_(e,n,t)}function Ed(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function KI(e,t){let n=ze(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Lg(e,t){let n=xd(typeof t=="string"?t:t.name,e.schema);return n==="node"?KI(e,t):n==="mark"?b_(e,t):{}}function GI(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function JI(e){let t=GI(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Pg(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let u=t.slice(i).map(l,-1),c=t.slice(i).map(a),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),JI(r)}function wd(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let i=n.resolve(e),s=Ng(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var w_=(e,t,n,r=20)=>{let o=e.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===t?s=l:i-=1}return[s,i]};function Eg(e,t){return t.nodes[e]||t.marks[e]||null}function pd(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var YI=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,l)=>{var a,u;let c=((u=(a=o.type.spec).toText)==null?void 0:u.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-i))}),n};function Cg(e,t,n={}){let{empty:r,ranges:o}=e.selection,i=t?Ir(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>hd(d.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),y=Math.min(h,b+m.nodeSize),x=y-g;s+=x,l.push(...m.marks.map(v=>({mark:v,from:g,to:y})))})}),s===0)return!1;let a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>hd(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+u:a)>=s}function ZI(e,t,n={}){if(!t)return Yn(e,null,n)||Cg(e,null,n);let r=xd(t,e.schema);return r==="node"?Yn(e,t,n):r==="mark"?Cg(e,t,n):!1}var __=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let i=kd(l=>l.type.name===t)(e.selection);if(!i)return!1;let s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function a_(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function u_(e,t){let{nodeExtensions:n}=Ls(t),r=n.find(s=>s.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=he(K(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ka(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(ka(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function _d(e){return e instanceof $}var C_=class T_{constructor(t){this.position=t}static fromJSON(t){return new T_(t.position)}toJSON(){return{position:this.position}}};function XI(e,t){let n=t.mapping.mapResult(e.position);return{position:new C_(n.pos),mapResult:n}}function QI(e){return new C_(e)}function Sd(e,t,n){let o=e.state.doc.content.size,i=Dr(t,0,o),s=Dr(n,0,o),l=e.coordsAtPos(i),a=e.coordsAtPos(s,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function eL(e,t,n){var r;let{selection:o}=t,i=null;if(bd(o)&&(i=o.$cursor),i){let l=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(u=>u.type.excludes(n)))}let{ranges:s}=o;return s.some(({$from:l,$to:a})=>{let u=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(l.pos,a.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var tL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=n,{empty:s,ranges:l}=i,a=Ir(e,r.schema);if(o)if(s){let u=b_(r,a);n.addStoredMark(a.create({...u,...t}))}else l.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===a)?f.marks.forEach(g=>{a===g.type&&n.addMark(h,m,a.create({...g.attrs,...t}))}):n.addMark(h,m,a.create(t))})});return eL(r,n,a)},nL=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),rL=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let i=ze(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>H0(i,{...s,...t})(n)?!0:l.clearNodes()).command(({state:l})=>H0(i,{...s,...t})(l,r)).run():!1},oL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=Dr(e,0,r.content.size),i=$.create(r,o);t.setSelection(i)}return!0},iL=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=r,s,l;return typeof t=="number"?(s=t,l=t):t&&"from"in t&&"to"in t?(s=t.from,l=t.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(a,u)=>{a.isText||n.setNodeMarkup(u,void 0,{...a.attrs,dir:e})}),!0},sL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=H.atStart(r).from,l=H.atEnd(r).to,a=Dr(o,s,l),u=Dr(i,s,l),c=H.create(r,a,u);t.setSelection(c)}return!0},lL=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return Vw(r)(t,n)};function c_(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var aL=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:i,doc:s}=t,{$from:l,$to:a}=i,u=o.extensionManager.attributes,c=pd(u,l.node().type.name,l.node().attrs);if(i instanceof $&&i.node.isBlock)return!l.parentOffset||!Qt(s,l.pos)?!1:(r&&(e&&c_(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:HI(l.node(-1).contentMatchAt(l.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=Qt(t.doc,t.mapping.map(l.pos),1,p);if(!p&&!h&&Qt(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(i instanceof H&&t.deleteSelection(),t.split(t.mapping.map(l.pos),1,p),f&&!d&&!l.parentOffset&&l.parent.type!==f)){let m=t.mapping.map(l.before()),b=t.doc.resolve(m);l.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}e&&c_(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},uL=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;let l=ze(e,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;let d=a.node(-1);if(d.type!==l)return!1;let f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let g=A.empty,y=a.index(-1)?1:a.index(-2)?2:3;for(let _=a.depth-y;_>=a.depth-3;_-=1)g=A.from(a.node(_).copy(g));let x=a.indexAfter(-1){if(w>-1)return!1;_.isTextblock&&_.content.size===0&&(w=T+1)}),w>-1&&n.setSelection(H.near(n.doc.resolve(w))),n.scrollIntoView()}return!0}let p=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...pd(f,d.type.name,d.attrs),...t},m={...pd(f,a.node().type.name,a.node().attrs),...t};n.delete(a.pos,u.pos);let b=p?[{type:l,attrs:h},{type:p,attrs:m}]:[{type:l,attrs:h}];if(!Qt(n.doc,a.pos,2))return!1;if(o){let{selection:g,storedMarks:y}=r,{splittableMarks:x}=i.extensionManager,v=y||g.$to.parentOffset&&g.$from.marks();if(n.split(a.pos,2,b).scrollIntoView(),!v||!o)return!0;let k=v.filter(E=>x.includes(E.type.name));n.ensureMarks(k)}return!0},wg=(e,t)=>{let n=kd(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,n.pos)&&e.join(n.pos),!0},_g=(e,t)=>{let n=kd(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,r)&&e.join(r),!0},cL=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=ze(e,s.schema),h=ze(t,s.schema),{selection:m,storedMarks:b}=s,{$from:g,$to:y}=m,x=g.blockRange(y),v=b||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;let k=kd(E=>u_(E.type.name,d))(m);if(x.depth>=1&&k&&x.depth-k.depth<=1){if(k.node.type===p)return u.liftListItem(h);if(u_(k.node.type.name,d)&&p.validContent(k.node.content)&&l)return a().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>wg(i,p)).command(()=>_g(i,p)).run()}return!n||!v||!l?a().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>wg(i,p)).command(()=>_g(i,p)).run():a().command(()=>{let E=c().wrapInList(p,r),w=v.filter(_=>f.includes(_.type.name));return i.ensureMarks(w),E?!0:u.clearNodes()}).wrapInList(p,r).command(()=>wg(i,p)).command(()=>_g(i,p)).run()},dL=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:i=!1}=n,s=Ir(e,r.schema);return Cg(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},fL=(e,t,n={})=>({state:r,commands:o})=>{let i=ze(e,r.schema),s=ze(t,r.schema),l=Yn(r,i,n),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(s,a):o.setNode(i,{...a,...n})},pL=(e,t={})=>({state:n,commands:r})=>{let o=ze(e,n.schema);return Yn(n,o,t)?r.lift(o):r.wrapIn(o,t)},hL=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},mL=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},gL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;let{extendEmptyMarkRange:s=!1}=t,{selection:l}=n,a=Ir(e,r.schema),{$from:u,empty:c,ranges:d}=l;if(!o)return!0;if(c&&s){let{from:f,to:p}=l,h=(i=u.marks().find(b=>b.type===a))==null?void 0:i.attrs,m=Ng(u,a,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,a)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},bL=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,i,s;return typeof e=="number"?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,(l,a)=>{if(l.isText)return;let u={...l.attrs};delete u.dir,t.setNodeMarkup(a,void 0,u)}),!0},yL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=xd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Ir(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?r.doc.nodesBetween(c,d,(b,g)=>{i&&i===b.type&&(a=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):r.doc.nodesBetween(c,d,(b,g)=>{g=c&&g<=d&&(i&&i===b.type&&(a=!0,o&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(y=>{if(s===y.type&&(a=!0,o)){let x=Math.max(g,c),v=Math.min(g+b.nodeSize,d);n.addMark(x,v,s.create({...y.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&o&&n.addMark(h,m,s.create({...b.attrs,...t}))}))}),a},xL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return $w(o,t)(n,r)},vL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Hw(o,t)(n,r)},kL=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Cd=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},EL=(e,t)=>{if(Ag(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function cd(e){var t;let{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=e,{view:a}=n;if(a.composing)return!1;let u=a.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=YI(u)+i;return s.forEach(f=>{if(c)return;let p=EL(d,f.find);if(!p)return;let h=a.state.tr,m=md({state:a.state,transaction:h}),b={from:r-(p[0].length-i.length),to:o},{commands:g,chain:y,can:x}=new gd({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:y,can:x})===null||!h.steps.length||(f.undoable&&h.setMeta(l,{transform:h,from:r,to:o,text:i}),a.dispatch(h),c=!0)}),c}function wL(e){let{editor:t,rules:n}=e,r=new q({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=Bs(A.from(c),s.schema);let{from:d}=a,f=d+c.length;cd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return cd({editor:t,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&cd({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?cd({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function _L(e){return Object.prototype.toString.call(e).slice(8,-1)}function dd(e){return _L(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function A_(e,t){let n={...e};return dd(e)&&dd(t)&&Object.keys(t).forEach(r=>{dd(t[r])&&dd(e[r])?n[r]=A_(e[r],t[r]):n[r]=t[r]}),n}var Bg=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...he(K(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...he(K(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>A_(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Ge=class N_ extends Bg{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new N_(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let a=s.find(u=>u?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function SL(e){return typeof e=="number"}var CL=class{constructor(e){this.find=e.find,this.handler=e.handler}},TL=(e,t,n)=>{if(Ag(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),i.push(o.replaceWith)),i}):[]};function AL(e){let{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=e,{commands:a,chain:u,can:c}=new gd({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var m,b,g,y,x;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let v=(x=(y=(g=p.content)==null?void 0:g.size)!=null?y:p.nodeSize)!=null?x:0,k=Math.max(r,h),E=Math.min(o,h+v);if(k>=E)return;let w=p.isText?p.text||"":p.textBetween(k-h,E-h,void 0,"\uFFFC");TL(w,i.find,s).forEach(T=>{if(T.index===void 0)return;let C=k+T.index+1,F=C+T[0].length,N={from:n.tr.mapping.map(C),to:n.tr.mapping.map(F)},X=i.handler({state:n,range:N,match:T,commands:a,chain:u,can:c,pasteEvent:s,dropEvent:l});d.push(X)})}),d.every(p=>p!==null)}var fd=null,NL=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function ML(e){let{editor:t,rules:n}=e,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=md({state:c,transaction:m});if(!(!AL({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new q({view(d){let f=h=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,r&&(fd=t)},p=()=>{fd&&(fd=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,l=f,!i){let p=fd;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!i,g=h.getMeta("applyPasteRules"),y=!!g;if(!m&&!b&&!y)return;if(y){let{text:k}=g;typeof k=="string"?k=k:k=Bs(A.from(k),p.schema);let{from:E}=g,w=E+k.length,_=NL(k);return a({rule:c,state:p,from:E,to:{b:w},pasteEvt:_})}let x=f.doc.content.findDiffStart(p.doc.content),v=f.doc.content.findDiffEnd(p.doc.content);if(!(!SL(x)||!v||x===v.b))return a({rule:c,state:p,from:x,to:v,pasteEvt:s})}}))}var Td=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=k_(e),this.schema=WI(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Eg(t.name,this.schema)},r=K(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Dg([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:Eg(r.name,this.schema)},i=[],s=K(r,"addKeyboardShortcuts",o),l={};if(r.type==="mark"&&K(r,"exitable",o)&&(l.ArrowRight=()=>Ge.handleExit({editor:e,mark:r})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));l={...l,...f}}let a=n_(l);i.push(a);let u=K(r,"addInputRules",o);if(a_(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=wL({editor:e,rules:f}),h=Array.isArray(p)?p:[p];i.push(...h)}}let c=K(r,"addPasteRules",o);if(a_(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=ML({editor:e,rules:f});i.push(...p)}}let d=K(r,"addProseMirrorPlugins",o);if(d){let f=d();i.push(...f)}return i})}get attributes(){return v_(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Ls(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addNodeView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ze(n.name,this.schema)},i=K(n,"addNodeView",o);if(!i)return[];let s=i();if(!s)return[];let l=(a,u,c,d,f)=>{let p=Ps(a,r);return s({node:a,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,l]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=Ls(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addMarkView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Ir(n.name,this.schema)},i=K(n,"addMarkView",o);if(!i)return[];let s=(l,a,u)=>{let c=Ps(l,r);return i()({mark:l,view:a,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{UL(l,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Eg(t.name,this.schema)};t.type==="mark"&&((n=he(K(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=K(t,"onBeforeCreate",r),i=K(t,"onCreate",r),s=K(t,"onUpdate",r),l=K(t,"onSelectionUpdate",r),a=K(t,"onTransaction",r),u=K(t,"onFocus",r),c=K(t,"onBlur",r),d=K(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};Td.resolve=k_;Td.sort=Dg;Td.flatten=Rg;var Fg={};Tg(Fg,{ClipboardTextSerializer:()=>O_,Commands:()=>R_,Delete:()=>D_,Drop:()=>I_,Editable:()=>L_,FocusEvents:()=>B_,Keymap:()=>F_,Paste:()=>z_,Tabindex:()=>U_,TextDirection:()=>$_,focusEventsPluginKey:()=>P_});var ne=class M_ extends Bg{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new M_(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},O_=ne.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new q({key:new Y("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(c=>c.$from.pos)),l=Math.max(...i.map(c=>c.$to.pos)),a=Ed(n);return E_(r,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),R_=ne.create({name:"commands",addCommands(){return{...d_}}}),D_=ne.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let i=()=>{var s,l,a,u;if((u=(a=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,e))!=null?u:e.getMeta("y-sync$"))return;let c=Mg(e.before,[e,...t]);Pg(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof Cr){let g=f.slice(h).map(p.from,-1),y=f.slice(h).map(p.to),x=f.invert().map(g,-1),v=f.invert().map(y),k=(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(w=>w.eq(p.mark)),E=(b=c.doc.nodeAt(y))==null?void 0:b.marks.some(w=>w.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:v},newRange:{from:g,to:y},partial:!!(E||k),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),I_=ne.create({name:"drop",addProseMirrorPlugins(){return[new q({key:new Y("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),L_=ne.create({name:"editable",addProseMirrorPlugins(){return[new q({key:new Y("editable"),props:{editable:()=>this.editor.options.editable}})]}}),P_=new Y("focusEvents"),B_=ne.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new q({key:P_,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),F_=ne.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{let{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:W.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return yd()||g_()?i:o},addProseMirrorPlugins(){return[new q({key:new Y("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:l}=t.selection,a=W.atStart(t.doc).from,u=W.atEnd(t.doc).to;if(i||!(s===a&&l===u)||!ka(n.doc))return;let f=n.tr,p=md({state:n,transaction:f}),{commands:h}=new gd({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),z_=ne.create({name:"paste",addProseMirrorPlugins(){return[new q({key:new Y("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),U_=ne.create({name:"tabindex",addProseMirrorPlugins(){return[new q({key:new Y("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),$_=ne.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Ls(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new q({key:new Y("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),OL=class Is{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Is(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Is(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Is(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(s);if(!o&&l.depth<=this.depth)return;let a=new Is(l,this.editor,o,o?n:null);o&&(a.actualDepth=this.depth+1),t.push(new Is(l,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let i=o.node.attrs,s=Object.keys(n);for(let l=0;l{r&&o.length>0||(s.node.type.name===t&&i.every(a=>n[a]===s.node.attrs[a])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},RL=`.ProseMirror { +`,textSerializers:s={}}=n||{},l="";return e.nodesBetween(r,o,(a,u,c,d)=>{var f;a.isBlock&&u>r&&(l+=i);let p=s?.[a.type.name];if(p)return c&&(l+=p({node:a,pos:u,parent:c,index:d,range:t})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),l}function Lg(e,t){let n={from:0,to:e.content.size};return __(e,n,t)}function Ed(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function jI(e,t){let n=ze(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Pg(e,t){let n=xd(typeof t=="string"?t:t.name,e.schema);return n==="node"?jI(e,t):n==="mark"?x_(e,t):{}}function KI(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function GI(e){let t=KI(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Bg(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let u=t.slice(i).map(l,-1),c=t.slice(i).map(a),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),GI(r)}function wd(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let i=n.resolve(e),s=Mg(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var S_=(e,t,n,r=20)=>{let o=e.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===t?s=l:i-=1}return[s,i]};function wg(e,t){return t.nodes[e]||t.marks[e]||null}function pd(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var YI=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,l)=>{var a,u;let c=((u=(a=o.type.spec).toText)==null?void 0:u.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-i))}),n};function Ag(e,t,n={}){let{empty:r,ranges:o}=e.selection,i=t?Ir(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>hd(d.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(g,b)=>{if(!g.isText&&!g.marks.length)return;let m=Math.max(p,b),y=Math.min(h,b+g.nodeSize),x=y-m;s+=x,l.push(...g.marks.map(v=>({mark:v,from:m,to:y})))})}),s===0)return!1;let a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>hd(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+u:a)>=s}function JI(e,t,n={}){if(!t)return Jn(e,null,n)||Ag(e,null,n);let r=xd(t,e.schema);return r==="node"?Jn(e,t,n):r==="mark"?Ag(e,t,n):!1}var C_=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let i=kd(l=>l.type.name===t)(e.selection);if(!i)return!1;let s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function c_(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function d_(e,t){let{nodeExtensions:n}=Ls(t),r=n.find(s=>s.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=he(K(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ka(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(ka(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function _d(e){return e instanceof $}var T_=class N_{constructor(t){this.position=t}static fromJSON(t){return new N_(t.position)}toJSON(){return{position:this.position}}};function ZI(e,t){let n=t.mapping.mapResult(e.position);return{position:new T_(n.pos),mapResult:n}}function XI(e){return new T_(e)}function Sd(e,t,n){let o=e.state.doc.content.size,i=Dr(t,0,o),s=Dr(n,0,o),l=e.coordsAtPos(i),a=e.coordsAtPos(s,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),p=f-d,h=c-u,m={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...m,toJSON:()=>m}}function QI(e,t,n){var r;let{selection:o}=t,i=null;if(bd(o)&&(i=o.$cursor),i){let l=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(u=>u.type.excludes(n)))}let{ranges:s}=o;return s.some(({$from:l,$to:a})=>{let u=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(l.pos,a.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(g=>g.type.excludes(n));u=p&&h}return!u}),u})}var eL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=n,{empty:s,ranges:l}=i,a=Ir(e,r.schema);if(o)if(s){let u=x_(r,a);n.addStoredMark(a.create({...u,...t}))}else l.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),g=Math.min(p+f.nodeSize,d);f.marks.find(m=>m.type===a)?f.marks.forEach(m=>{a===m.type&&n.addMark(h,g,a.create({...m.attrs,...t}))}):n.addMark(h,g,a.create(t))})});return QI(r,n,a)},tL=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),nL=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let i=ze(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>V0(i,{...s,...t})(n)?!0:l.clearNodes()).command(({state:l})=>V0(i,{...s,...t})(l,r)).run():!1},rL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=Dr(e,0,r.content.size),i=$.create(r,o);t.setSelection(i)}return!0},oL=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=r,s,l;return typeof t=="number"?(s=t,l=t):t&&"from"in t&&"to"in t?(s=t.from,l=t.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(a,u)=>{a.isText||n.setNodeMarkup(u,void 0,{...a.attrs,dir:e})}),!0},iL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=H.atStart(r).from,l=H.atEnd(r).to,a=Dr(o,s,l),u=Dr(i,s,l),c=H.create(r,a,u);t.setSelection(c)}return!0},sL=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return jw(r)(t,n)};function f_(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var lL=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:i,doc:s}=t,{$from:l,$to:a}=i,u=o.extensionManager.attributes,c=pd(u,l.node().type.name,l.node().attrs);if(i instanceof $&&i.node.isBlock)return!l.parentOffset||!Qt(s,l.pos)?!1:(r&&(e&&f_(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:$I(l.node(-1).contentMatchAt(l.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=Qt(t.doc,t.mapping.map(l.pos),1,p);if(!p&&!h&&Qt(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(i instanceof H&&t.deleteSelection(),t.split(t.mapping.map(l.pos),1,p),f&&!d&&!l.parentOffset&&l.parent.type!==f)){let g=t.mapping.map(l.before()),b=t.doc.resolve(g);l.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}e&&f_(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},aL=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;let l=ze(e,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;let d=a.node(-1);if(d.type!==l)return!1;let f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let m=T.empty,y=a.index(-1)?1:a.index(-2)?2:3;for(let _=a.depth-y;_>=a.depth-3;_-=1)m=T.from(a.node(_).copy(m));let x=a.indexAfter(-1){if(w>-1)return!1;_.isTextblock&&_.content.size===0&&(w=A+1)}),w>-1&&n.setSelection(H.near(n.doc.resolve(w))),n.scrollIntoView()}return!0}let p=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...pd(f,d.type.name,d.attrs),...t},g={...pd(f,a.node().type.name,a.node().attrs),...t};n.delete(a.pos,u.pos);let b=p?[{type:l,attrs:h},{type:p,attrs:g}]:[{type:l,attrs:h}];if(!Qt(n.doc,a.pos,2))return!1;if(o){let{selection:m,storedMarks:y}=r,{splittableMarks:x}=i.extensionManager,v=y||m.$to.parentOffset&&m.$from.marks();if(n.split(a.pos,2,b).scrollIntoView(),!v||!o)return!0;let k=v.filter(E=>x.includes(E.type.name));n.ensureMarks(k)}return!0},_g=(e,t)=>{let n=kd(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,n.pos)&&e.join(n.pos),!0},Sg=(e,t)=>{let n=kd(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,r)&&e.join(r),!0},uL=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=ze(e,s.schema),h=ze(t,s.schema),{selection:g,storedMarks:b}=s,{$from:m,$to:y}=g,x=m.blockRange(y),v=b||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;let k=kd(E=>d_(E.type.name,d))(g);if(x.depth>=1&&k&&x.depth-k.depth<=1){if(k.node.type===p)return u.liftListItem(h);if(d_(k.node.type.name,d)&&p.validContent(k.node.content)&&l)return a().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>_g(i,p)).command(()=>Sg(i,p)).run()}return!n||!v||!l?a().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>_g(i,p)).command(()=>Sg(i,p)).run():a().command(()=>{let E=c().wrapInList(p,r),w=v.filter(_=>f.includes(_.type.name));return i.ensureMarks(w),E?!0:u.clearNodes()}).wrapInList(p,r).command(()=>_g(i,p)).command(()=>Sg(i,p)).run()},cL=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:i=!1}=n,s=Ir(e,r.schema);return Ag(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},dL=(e,t,n={})=>({state:r,commands:o})=>{let i=ze(e,r.schema),s=ze(t,r.schema),l=Jn(r,i,n),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(s,a):o.setNode(i,{...a,...n})},fL=(e,t={})=>({state:n,commands:r})=>{let o=ze(e,n.schema);return Jn(n,o,t)?r.lift(o):r.wrapIn(o,t)},pL=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},hL=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},mL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;let{extendEmptyMarkRange:s=!1}=t,{selection:l}=n,a=Ir(e,r.schema),{$from:u,empty:c,ranges:d}=l;if(!o)return!0;if(c&&s){let{from:f,to:p}=l,h=(i=u.marks().find(b=>b.type===a))==null?void 0:i.attrs,g=Mg(u,a,h);g&&(f=g.from,p=g.to),n.removeMark(f,p,a)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},gL=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,i,s;return typeof e=="number"?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,(l,a)=>{if(l.isText)return;let u={...l.attrs};delete u.dir,t.setNodeMarkup(a,void 0,u)}),!0},bL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=xd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Ir(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,g;n.selection.empty?r.doc.nodesBetween(c,d,(b,m)=>{i&&i===b.type&&(a=!0,h=Math.max(m,c),g=Math.min(m+b.nodeSize,d),f=m,p=b)}):r.doc.nodesBetween(c,d,(b,m)=>{m=c&&m<=d&&(i&&i===b.type&&(a=!0,o&&n.setNodeMarkup(m,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(y=>{if(s===y.type&&(a=!0,o)){let x=Math.max(m,c),v=Math.min(m+b.nodeSize,d);n.addMark(x,v,s.create({...y.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&o&&n.addMark(h,g,s.create({...b.attrs,...t}))}))}),a},yL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Vw(o,t)(n,r)},xL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return qw(o,t)(n,r)},vL=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Cd=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},kL=(e,t)=>{if(Ng(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function cd(e){var t;let{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=e,{view:a}=n;if(a.composing)return!1;let u=a.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=YI(u)+i;return s.forEach(f=>{if(c)return;let p=kL(d,f.find);if(!p)return;let h=a.state.tr,g=md({state:a.state,transaction:h}),b={from:r-(p[0].length-i.length),to:o},{commands:m,chain:y,can:x}=new gd({editor:n,state:g});f.handler({state:g,range:b,match:p,commands:m,chain:y,can:x})===null||!h.steps.length||(f.undoable&&h.setMeta(l,{transform:h,from:r,to:o,text:i}),a.dispatch(h),c=!0)}),c}function EL(e){let{editor:t,rules:n}=e,r=new V({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=Bs(T.from(c),s.schema);let{from:d}=a,f=d+c.length;cd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return cd({editor:t,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&cd({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?cd({editor:t,from:s.pos,to:s.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function wL(e){return Object.prototype.toString.call(e).slice(8,-1)}function dd(e){return wL(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function M_(e,t){let n={...e};return dd(e)&&dd(t)&&Object.keys(t).forEach(r=>{dd(t[r])&&dd(e[r])?n[r]=M_(e[r],t[r]):n[r]=t[r]}),n}var Fg=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...he(K(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...he(K(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>M_(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Ge=class O_ extends Fg{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new O_(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let a=s.find(u=>u?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function _L(e){return typeof e=="number"}var SL=class{constructor(e){this.find=e.find,this.handler=e.handler}},CL=(e,t,n)=>{if(Ng(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),i.push(o.replaceWith)),i}):[]};function AL(e){let{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=e,{commands:a,chain:u,can:c}=new gd({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var g,b,m,y,x;if((b=(g=p.type)==null?void 0:g.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let v=(x=(y=(m=p.content)==null?void 0:m.size)!=null?y:p.nodeSize)!=null?x:0,k=Math.max(r,h),E=Math.min(o,h+v);if(k>=E)return;let w=p.isText?p.text||"":p.textBetween(k-h,E-h,void 0,"\uFFFC");CL(w,i.find,s).forEach(A=>{if(A.index===void 0)return;let C=k+A.index+1,F=C+A[0].length,N={from:n.tr.mapping.map(C),to:n.tr.mapping.map(F)},X=i.handler({state:n,range:N,match:A,commands:a,chain:u,can:c,pasteEvent:s,dropEvent:l});d.push(X)})}),d.every(p=>p!==null)}var fd=null,TL=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function NL(e){let{editor:t,rules:n}=e,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let g=c.tr,b=md({state:c,transaction:g});if(!(!AL({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:l})||!g.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(c=>new V({view(d){let f=h=>{var g;r=(g=d.dom.parentElement)!=null&&g.contains(h.target)?d.dom.parentElement:null,r&&(fd=t)},p=()=>{fd&&(fd=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,l=f,!i){let p=fd;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],g=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!i,m=h.getMeta("applyPasteRules"),y=!!m;if(!g&&!b&&!y)return;if(y){let{text:k}=m;typeof k=="string"?k=k:k=Bs(T.from(k),p.schema);let{from:E}=m,w=E+k.length,_=TL(k);return a({rule:c,state:p,from:E,to:{b:w},pasteEvt:_})}let x=f.doc.content.findDiffStart(p.doc.content),v=f.doc.content.findDiffEnd(p.doc.content);if(!(!_L(x)||!v||x===v.b))return a({rule:c,state:p,from:x,to:v,pasteEvt:s})}}))}var Ad=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=w_(e),this.schema=qI(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:wg(t.name,this.schema)},r=K(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Ig([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:wg(r.name,this.schema)},i=[],s=K(r,"addKeyboardShortcuts",o),l={};if(r.type==="mark"&&K(r,"exitable",o)&&(l.ArrowRight=()=>Ge.handleExit({editor:e,mark:r})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));l={...l,...f}}let a=o_(l);i.push(a);let u=K(r,"addInputRules",o);if(c_(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=EL({editor:e,rules:f}),h=Array.isArray(p)?p:[p];i.push(...h)}}let c=K(r,"addPasteRules",o);if(c_(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=NL({editor:e,rules:f});i.push(...p)}}let d=K(r,"addProseMirrorPlugins",o);if(d){let f=d();i.push(...f)}return i})}get attributes(){return E_(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Ls(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addNodeView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ze(n.name,this.schema)},i=K(n,"addNodeView",o);if(!i)return[];let s=i();if(!s)return[];let l=(a,u,c,d,f)=>{let p=Ps(a,r);return s({node:a,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,l]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=Ls(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addMarkView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Ir(n.name,this.schema)},i=K(n,"addMarkView",o);if(!i)return[];let s=(l,a,u)=>{let c=Ps(l,r);return i()({mark:l,view:a,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{zL(l,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:wg(t.name,this.schema)};t.type==="mark"&&((n=he(K(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=K(t,"onBeforeCreate",r),i=K(t,"onCreate",r),s=K(t,"onUpdate",r),l=K(t,"onSelectionUpdate",r),a=K(t,"onTransaction",r),u=K(t,"onFocus",r),c=K(t,"onBlur",r),d=K(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};Ad.resolve=w_;Ad.sort=Ig;Ad.flatten=Dg;var zg={};Tg(zg,{ClipboardTextSerializer:()=>D_,Commands:()=>I_,Delete:()=>L_,Drop:()=>P_,Editable:()=>B_,FocusEvents:()=>z_,Keymap:()=>U_,Paste:()=>$_,Tabindex:()=>H_,TextDirection:()=>V_,focusEventsPluginKey:()=>F_});var ne=class R_ extends Fg{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new R_(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},D_=ne.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new V({key:new J("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(c=>c.$from.pos)),l=Math.max(...i.map(c=>c.$to.pos)),a=Ed(n);return __(r,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),I_=ne.create({name:"commands",addCommands(){return{...p_}}}),L_=ne.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let i=()=>{var s,l,a,u;if((u=(a=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,e))!=null?u:e.getMeta("y-sync$"))return;let c=Og(e.before,[e,...t]);Bg(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,g)=>{let b=g+h.nodeSize-2,m=p.oldRange.from<=g&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:g,to:b,newFrom:c.mapping.map(g),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!m,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var g,b;if(p instanceof Cr){let m=f.slice(h).map(p.from,-1),y=f.slice(h).map(p.to),x=f.invert().map(m,-1),v=f.invert().map(y),k=(g=c.doc.nodeAt(m-1))==null?void 0:g.marks.some(w=>w.eq(p.mark)),E=(b=c.doc.nodeAt(y))==null?void 0:b.marks.some(w=>w.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:v},newRange:{from:m,to:y},partial:!!(E||k),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),P_=ne.create({name:"drop",addProseMirrorPlugins(){return[new V({key:new J("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),B_=ne.create({name:"editable",addProseMirrorPlugins(){return[new V({key:new J("editable"),props:{editable:()=>this.editor.options.editable}})]}}),F_=new J("focusEvents"),z_=ne.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new V({key:F_,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),U_=ne.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{let{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,g=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,m=g&&h.parent.childCount===1?b===d.pos:W.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!m||m&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return yd()||y_()?i:o},addProseMirrorPlugins(){return[new V({key:new J("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(g=>g.getMeta("composition")))return;let r=e.some(g=>g.docChanged)&&!t.doc.eq(n.doc),o=e.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:l}=t.selection,a=W.atStart(t.doc).from,u=W.atEnd(t.doc).to;if(i||!(s===a&&l===u)||!ka(n.doc))return;let f=n.tr,p=md({state:n,transaction:f}),{commands:h}=new gd({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),$_=ne.create({name:"paste",addProseMirrorPlugins(){return[new V({key:new J("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),H_=ne.create({name:"tabindex",addProseMirrorPlugins(){return[new V({key:new J("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),V_=ne.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Ls(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new V({key:new J("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),ML=class Is{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Is(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Is(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Is(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(s);if(!o&&l.depth<=this.depth)return;let a=new Is(l,this.editor,o,o?n:null);o&&(a.actualDepth=this.depth+1),t.push(new Is(l,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let i=o.node.attrs,s=Object.keys(n);for(let l=0;l{r&&o.length>0||(s.node.type.name===t&&i.every(a=>n[a]===s.node.attrs[a])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},OL=`.ProseMirror { position: relative; } @@ -282,71 +282,71 @@ img.ProseMirror-separator { .ProseMirror-focused .ProseMirror-gapcursor { display: block; -}`;function DL(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var H_=class extends kL{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:XI,createMappablePosition:QI},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=p_(t,this.options.autofocus);this.editorState=Kc.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=DL(RL,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=x_(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[L_,O_.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),R_,B_,F_,U_,I_,z_,D_,$_.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new Td(r,this)}createCommandManager(){this.commandManager=new gd({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Sg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=Sg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new ga(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=s?.getMeta("focus"),a=s?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Lg(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return ZI(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Bs(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` +}`;function RL(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var q_=class extends vL{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:ZI,createMappablePosition:XI},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=m_(t,this.options.autofocus);this.editorState=Kc.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=RL(OL,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=k_(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[B_,D_.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),I_,z_,U_,H_,P_,$_,L_,V_.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new Ad(r,this)}createCommandManager(){this.commandManager=new gd({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Cg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=Cg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new ga(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=s?.getMeta("focus"),a=s?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Pg(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return JI(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Bs(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` -`,textSerializers:n={}}=e||{};return Ig(this.state.doc,{blockSeparator:t,textSerializers:{...Ed(this.schema),...n}})}get isEmpty(){return ka(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new OL(t,this)}get $doc(){return this.$pos(0)}};function Zn(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),u=n.from+l.indexOf(s),c=u+s.length;if(wd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&i.delete(n.from+a,u);let f=n.from+a+s.length;i.addMark(n.from+a,f,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function q_(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from,l=n.to,a=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=s+u;c>l?c=l:l=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,l,a)}else if(r[0]){let u=e.type.isInline?s:s-1;i.insert(u,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:e.undoable})}function Ea(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),i=he(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function Xn(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let i=he(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),u=a&&ws(a,e.type,i);if(!u)return null;if(s.wrap(a,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));s.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&pn(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}function V_(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof $){let i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(t))return!0;o-=1}return!1}function W_(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var IL={};Tg(IL,{createAtomBlockMarkdownSpec:()=>LL,createBlockMarkdownSpec:()=>PL,createInlineMarkdownSpec:()=>zL,parseAttributes:()=>zg,parseIndentedBlocks:()=>Ad,renderNestedMarkdownContent:()=>wa,serializeAttributes:()=>Ug});function zg(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function Ug(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function LL(e){let{nodeName:t,name:n,parseAttributes:r=zg,serializeAttributes:o=Ug,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=e,a=n||t,u=c=>{if(!l)return c;let d={};return l.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...i,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=r(m);if(!s.find(y=>!(y in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${a}${p} :::`}}}function PL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=zg,serializeAttributes:i=Ug,defaultAttributes:s={},content:l="block",allowedAttributes:a}=e,u=n||t,c=d=>{if(!a)return d;let f={};return a.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else l==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,y=""]=b,x=o(y),v=1,k=g.length,E="",w=/^:::([\w-]*)(\s.*)?/gm,_=d.slice(k);for(w.lastIndex=0;;){let T=w.exec(_);if(T===null)break;let C=T.index,F=T[1];if(!((h=T[2])!=null&&h.endsWith(":::"))){if(F)v+=1;else if(v-=1,v===0){let N=_.slice(0,C);E=N.trim();let X=d.slice(0,k+C+T[0].length),z=[];if(E)if(l==="block")for(z=p.blockTokens(N),z.forEach(I=>{I.text&&(!I.tokens||I.tokens.length===0)&&(I.tokens=p.inlineTokens(I.text))});z.length>0;){let I=z[z.length-1];if(I.type==="paragraph"&&(!I.text||I.text.trim()===""))z.pop();else break}else z=p.inlineTokens(E);return{type:t,raw:X,attributes:x,content:E,tokens:z}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=i(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` +`,textSerializers:n={}}=e||{};return Lg(this.state.doc,{blockSeparator:t,textSerializers:{...Ed(this.schema),...n}})}get isEmpty(){return ka(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new ML(t,this)}get $doc(){return this.$pos(0)}};function Zn(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),u=n.from+l.indexOf(s),c=u+s.length;if(wd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(g=>g===e.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&i.delete(n.from+a,u);let f=n.from+a+s.length;i.addMark(n.from+a,f,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function W_(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from,l=n.to,a=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=s+u;c>l?c=l:l=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,l,a)}else if(r[0]){let u=e.type.isInline?s:s-1;i.insert(u,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:e.undoable})}function Ea(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),i=he(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function Xn(e){return new Cd({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let i=he(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),u=a&&ws(a,e.type,i);if(!u)return null;if(s.wrap(a,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let g=h.filter(b=>p.includes(b.type.name));s.ensureMarks(g)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&pn(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}function j_(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof $){let i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(t))return!0;o-=1}return!1}function K_(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var DL={};Tg(DL,{createAtomBlockMarkdownSpec:()=>IL,createBlockMarkdownSpec:()=>LL,createInlineMarkdownSpec:()=>FL,parseAttributes:()=>Ug,parseIndentedBlocks:()=>Td,renderNestedMarkdownContent:()=>wa,serializeAttributes:()=>$g});function Ug(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function $g(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function IL(e){let{nodeName:t,name:n,parseAttributes:r=Ug,serializeAttributes:o=$g,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=e,a=n||t,u=c=>{if(!l)return c;let d={};return l.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...i,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let g=h[1]||"",b=r(g);if(!s.find(y=>!(y in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${a}${p} :::`}}}function LL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=Ug,serializeAttributes:i=$g,defaultAttributes:s={},content:l="block",allowedAttributes:a}=e,u=n||t,c=d=>{if(!a)return d;let f={};return a.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let g=r(d);p=typeof g=="string"?[{type:"text",text:g}]:g}else l==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let g=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(g);if(!b)return;let[m,y=""]=b,x=o(y),v=1,k=m.length,E="",w=/^:::([\w-]*)(\s.*)?/gm,_=d.slice(k);for(w.lastIndex=0;;){let A=w.exec(_);if(A===null)break;let C=A.index,F=A[1];if(!((h=A[2])!=null&&h.endsWith(":::"))){if(F)v+=1;else if(v-=1,v===0){let N=_.slice(0,C);E=N.trim();let X=d.slice(0,k+C+A[0].length),z=[];if(E)if(l==="block")for(z=p.blockTokens(N),z.forEach(I=>{I.text&&(!I.tokens||I.tokens.length===0)&&(I.tokens=p.inlineTokens(I.text))});z.length>0;){let I=z[z.length-1];if(I.type==="paragraph"&&(!I.text||I.text.trim()===""))z.pop();else break}else z=p.inlineTokens(E);return{type:t,raw:X,attributes:x,content:E,tokens:z}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=i(p),g=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` -`);return`:::${u}${m} +`);return`:::${u}${g} ${b} -:::`}}}function BL(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function FL(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function zL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=BL,serializeAttributes:i=FL,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=e,u=n||t,c=f=>{if(!a)return f;let p={};return a.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(l)return p.createNode(t,h);let m=r?r(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",y="";if(l){let[,v]=b;y=v}else{let[,v,k]=b;y=v,g=k||""}let x=o(y.trim());return{type:t,raw:b[0],content:g.trim(),attributes:x}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=i(h),b=m?` ${m}`:"";return l?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function Ad(e,t,n){var r,o,i,s;let l=e.split(` +:::`}}}function PL(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function BL(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function FL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=PL,serializeAttributes:i=BL,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=e,u=n||t,c=f=>{if(!a)return f;let p={};return a.forEach(h=>{let g=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(g in f){let m=f[g];if(b!==void 0&&m===b)return;p[g]=m}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(l)return p.createNode(t,h);let g=r?r(f):f.content||"";return g?p.createNode(t,h,[p.createTextNode(g)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),g=h?.index;return g!==void 0?g:-1},tokenize(f,p,h){let g=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(g);if(!b)return;let m="",y="";if(l){let[,v]=b;y=v}else{let[,v,k]=b;y=v,m=k||""}let x=o(y.trim());return{type:t,raw:b[0],content:m.trim(),attributes:x}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(m=>m.type==="text").map(m=>m.text).join(""));let h=c(f.attrs||{}),g=i(h),b=g?` ${g}`:"";return l?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function Td(e,t,n){var r,o,i,s;let l=e.split(` `),a=[],u="",c=0,d=t.baseIndentSize||2;for(;c0)break;if(f.trim()===""){c+=1,u=`${u}${f} -`;continue}else return}let h=t.extractItemData(p),{indentLevel:m,mainContent:b}=h;u=`${u}${f} -`;let g=[b];for(c+=1;cC.trim()!=="");if(w===-1)break;if((((o=(r=l[c+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){g.push(k),u=`${u}${k} -`,c+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>m)g.push(k),u=`${u}${k} -`,c+=1;else break}let y,x=g.slice(1);if(x.length>0){let k=x.map(E=>E.slice(m+d)).join(` +`;continue}else return}let h=t.extractItemData(p),{indentLevel:g,mainContent:b}=h;u=`${u}${f} +`;let m=[b];for(c+=1;cC.trim()!=="");if(w===-1)break;if((((o=(r=l[c+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>g){m.push(k),u=`${u}${k} +`,c+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>g)m.push(k),u=`${u}${k} +`,c+=1;else break}let y,x=m.slice(1);if(x.length>0){let k=x.map(E=>E.slice(g+d)).join(` `);k.trim()&&(t.customNestedParser?y=t.customNestedParser(k):y=n.blockTokens(k))}let v=t.createToken(h,y);a.push(v)}if(a.length!==0)return{items:a,raw:u}}function wa(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=e.content,l=t.renderChildren([i]),a=[`${o}${l}`];return s&&s.length>0&&s.forEach(u=>{let c=t.renderChildren([u]);if(c){let d=c.split(` `).map(f=>f?t.indent(f):"").join(` `);a.push(d)}}),a.join(` -`)}function UL(e,t,n={}){let{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((l,a)=>{let u=i.mapping.map(a),c=i.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var Q=class j_ extends Bg{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new j_(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},K_=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,i,s,l;let{view:a}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let y=this.dom.getBoundingClientRect(),x=c.getBoundingClientRect(),v=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,k=(s=e.offsetY)!=null?s:(i=e.nativeEvent)==null?void 0:i.offsetY;d=x.x-y.x+v,f=x.y-y.y+k}let p=this.dom.cloneNode(!0);try{let y=this.dom.getBoundingClientRect();p.style.width=`${Math.round(y.width)}px`,p.style.height=`${Math.round(y.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(l=e.dataTransfer)==null||l.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let b=$.create(a.state.doc,m),g=a.state.tr.setSelection(b);a.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),i=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:a}=this,u=!!this.node.type.spec.draggable,c=$.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(u&&l&&!a&&h){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(yd()||h_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function yn(e){return new CL({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let i=he(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=t,l=r[r.length-1],a=r[0],u=n.to;if(l){let c=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(wd(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+c,d),u=n.from+c+l.length,s.addMark(n.from+c,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var No=j(Be(),1),hS=j(Dc(),1);var $L=Object.getOwnPropertyNames,HL=Object.getOwnPropertySymbols,qL=Object.prototype.hasOwnProperty;function G_(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function Nd(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var i=o.cache,s=i.get(n),l=i.get(r);if(s&&l)return s===r&&l===n;i.set(n,r),i.set(r,n);var a=e(n,r,o);return i.delete(n),i.delete(r),a}}function VL(e){return e?.[Symbol.toStringTag]}function J_(e){return $L(e).concat(HL(e))}var WL=Object.hasOwn||(function(e,t){return qL.call(e,t)});function xi(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var jL="__v",KL="__o",GL="_owner",Y_=Object.getOwnPropertyDescriptor,Z_=Object.keys;function JL(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function YL(e,t){return xi(e.getTime(),t.getTime())}function ZL(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function XL(e,t){return e===t}function X_(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),s,l,a=0;(s=i.next())&&!s.done;){for(var u=t.entries(),c=!1,d=0;(l=u.next())&&!l.done;){if(o[d]){d++;continue}var f=s.value,p=l.value;if(n.equals(f[0],p[0],a,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;a++}return!0}var QL=xi;function e8(e,t,n){var r=Z_(e),o=r.length;if(Z_(t).length!==o)return!1;for(;o-- >0;)if(!nS(e,t,n,r[o]))return!1;return!0}function _a(e,t,n){var r=J_(e),o=r.length;if(J_(t).length!==o)return!1;for(var i,s,l;o-- >0;)if(i=r[o],!nS(e,t,n,i)||(s=Y_(e,i),l=Y_(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function t8(e,t){return xi(e.valueOf(),t.valueOf())}function n8(e,t){return e.source===t.source&&e.flags===t.flags}function Q_(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),s,l;(s=i.next())&&!s.done;){for(var a=t.values(),u=!1,c=0;(l=a.next())&&!l.done;){if(!o[c]&&n.equals(s.value,l.value,s.value,l.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function r8(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function o8(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function nS(e,t,n,r){return(r===GL||r===KL||r===jL)&&(e.$$typeof||t.$$typeof)?!0:WL(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var i8="[object Arguments]",s8="[object Boolean]",l8="[object Date]",a8="[object Error]",u8="[object Map]",c8="[object Number]",d8="[object Object]",f8="[object RegExp]",p8="[object Set]",h8="[object String]",m8="[object URL]",g8=Array.isArray,eS=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,tS=Object.assign,b8=Object.prototype.toString.call.bind(Object.prototype.toString);function y8(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,l=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual,p=e.unknownTagComparators;return function(m,b,g){if(m===b)return!0;if(m==null||b==null)return!1;var y=typeof m;if(y!==typeof b)return!1;if(y!=="object")return y==="number"?s(m,b,g):y==="function"?o(m,b,g):!1;var x=m.constructor;if(x!==b.constructor)return!1;if(x===Object)return l(m,b,g);if(g8(m))return t(m,b,g);if(eS!=null&&eS(m))return d(m,b,g);if(x===Date)return n(m,b,g);if(x===RegExp)return u(m,b,g);if(x===Map)return i(m,b,g);if(x===Set)return c(m,b,g);var v=b8(m);if(v===l8)return n(m,b,g);if(v===f8)return u(m,b,g);if(v===u8)return i(m,b,g);if(v===p8)return c(m,b,g);if(v===d8)return typeof m.then!="function"&&typeof b.then!="function"&&l(m,b,g);if(v===m8)return f(m,b,g);if(v===a8)return r(m,b,g);if(v===i8)return l(m,b,g);if(v===s8||v===c8||v===h8)return a(m,b,g);if(p){var k=p[v];if(!k){var E=VL(m);E&&(k=p[E])}if(k)return k(m,b,g)}return!1}}function x8(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?_a:JL,areDatesEqual:YL,areErrorsEqual:ZL,areFunctionsEqual:XL,areMapsEqual:r?G_(X_,_a):X_,areNumbersEqual:QL,areObjectsEqual:r?_a:e8,arePrimitiveWrappersEqual:t8,areRegExpsEqual:n8,areSetsEqual:r?G_(Q_,_a):Q_,areTypedArraysEqual:r?_a:r8,areUrlsEqual:o8,unknownTagComparators:void 0};if(n&&(o=tS({},o,n(o))),t){var i=Nd(o.areArraysEqual),s=Nd(o.areMapsEqual),l=Nd(o.areObjectsEqual),a=Nd(o.areSetsEqual);o=tS({},o,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:l,areSetsEqual:a})}return o}function v8(e){return function(t,n,r,o,i,s,l){return e(t,n,l)}}function k8(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(a,u){var c=r(),d=c.cache,f=d===void 0?t?new WeakMap:void 0:d,p=c.meta;return n(a,u,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(a,u){return n(a,u,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var s={cache:void 0,equals:o,meta:void 0,strict:i};return function(a,u){return n(a,u,s)}}var rS=To(),rV=To({strict:!0}),oV=To({circular:!0}),iV=To({circular:!0,strict:!0}),sV=To({createInternalComparator:function(){return xi}}),lV=To({strict:!0,createInternalComparator:function(){return xi}}),aV=To({circular:!0,createInternalComparator:function(){return xi}}),uV=To({circular:!0,createInternalComparator:function(){return xi},strict:!0});function To(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,s=i===void 0?!1:i,l=x8(e),a=y8(l),u=r?r(a):v8(a);return k8({circular:n,comparator:a,createState:o,equals:u,strict:s})}var Mo=j(Be(),1),mS=j(lS(),1),yS=j(pe(),1),Ca=j(Be(),1),ES=j(pe(),1),_S=j(Be(),1),SS=j(pe(),1);var TS=j(Be(),1),Hg=j(Be(),1),AS=j(ys(),1),NS=j(pe(),1),H8=j(pe(),1);var Fs=j(Be(),1),MS=j(pe(),1),M8=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},O8=({contentComponent:e})=>{let t=(0,fS.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Lr.jsx)(Lr.Fragment,{children:Object.values(t)})};function R8(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:dS.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var D8=class extends Ao.default.Component{constructor(e){var t;super(e),this.editorContentRef=Ao.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(e.view.dom),e.setOptions({element:t}),e.contentComponent=R8(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.firstChild))return;let n=document.createElement("div");n.append(t.view.dom),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Lr.jsxs)(Lr.Fragment,{children:[(0,Lr.jsx)("div",{ref:M8(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Lr.jsx)(O8,{contentComponent:e.contentComponent})]})}},I8=(0,Ao.forwardRef)((e,t)=>{let n=Ao.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Ao.default.createElement(D8,{key:n,innerRef:t,...e})}),pS=Ao.default.memo(I8),L8=typeof window<"u"?Mo.useLayoutEffect:Mo.useEffect,P8=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function qg(e){var t;let[n]=(0,Mo.useState)(()=>new P8(e.editor)),r=(0,mS.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:rS);return L8(()=>n.watch(e.editor),[e.editor,n]),(0,Mo.useDebugValue)(r),r}var aS=!1,$g=typeof window>"u",B8=$g||!!(typeof window<"u"&&window.next),F8=class gS{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if($g||B8){if(aS)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&$g&&aS)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new H_(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?gS.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function bS(e={},t=[]){let n=(0,No.useRef)(e);n.current=e;let[r]=(0,No.useState)(()=>new F8(n)),o=(0,hS.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,No.useDebugValue)(o),(0,No.useEffect)(r.onRender(t)),qg({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),o}var xS=(0,Sa.createContext)({editor:null}),mV=xS.Consumer,Od=()=>(0,Sa.useContext)(xS);var vS=(0,Ca.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var kS=()=>(0,Ca.useContext)(vS);function wS({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=kS();return(0,ES.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var CS=_S.default.forwardRef((e,t)=>{let{onDragStart:n}=kS(),r=e.as||"div";return(0,SS.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function uS(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function cS(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function z8(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function U8(e){if(uS(e)||cS(e))return!0;if(z8(e)){let t=e.type;if(t)return uS(t)||cS(t)}return!1}function $8(){try{if(Hg.version)return parseInt(Hg.version.split(".")[0],10)>=19}catch{}return!1}var Vg=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,AS.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=$8(),i=U8(t),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=l=>{this.ref=l}),this.reactElement=(0,NS.jsx)(t,{...s}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},gV=TS.default.createContext({markViewContentRef:()=>{}});var q8=class extends K_{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(a={})=>this.updateAttributes(a),deleteNode:()=>this.deleteNode(),ref:(0,Fs.createRef)()};if(!this.component.displayName){let a=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=a(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:a=>{a&&this.contentDOMElement&&a.firstChild!==this.contentDOMElement&&(a.hasAttribute("data-node-view-wrapper")&&a.removeAttribute("data-node-view-wrapper"),a.appendChild(this.contentDOMElement))}},o=this.component,i=(0,Fs.memo)(a=>(0,MS.jsx)(vS.Provider,{value:r,children:(0,Fs.createElement)(o,a)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Vg(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=Ps(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function OS(e,t){return n=>n.editor.contentComponent?new q8(e,n,t):{}}var zs=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var V8=/^\s*>\s$/,RS=Q.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return zs("blockquote",{...te(this.options.HTMLAttributes,e),children:zs("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let l=t.renderChildren([o]).split(` +`)}function zL(e,t,n={}){let{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((l,a)=>{let u=i.mapping.map(a),c=i.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var Q=class G_ extends Fg{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new G_(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},Y_=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,i,s,l;let{view:a}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let y=this.dom.getBoundingClientRect(),x=c.getBoundingClientRect(),v=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,k=(s=e.offsetY)!=null?s:(i=e.nativeEvent)==null?void 0:i.offsetY;d=x.x-y.x+v,f=x.y-y.y+k}let p=this.dom.cloneNode(!0);try{let y=this.dom.getBoundingClientRect();p.style.width=`${Math.round(y.width)}px`,p.style.height=`${Math.round(y.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(l=e.dataTransfer)==null||l.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let g=this.getPos();if(typeof g!="number")return;let b=$.create(a.state.doc,g),m=a.state.tr.setSelection(b);a.dispatch(m)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),i=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:a}=this,u=!!this.node.type.spec.draggable,c=$.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(u&&l&&!a&&h){let g=n.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(yd()||g_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function yn(e){return new SL({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let i=he(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=t,l=r[r.length-1],a=r[0],u=n.to;if(l){let c=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(wd(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+c,d),u=n.from+c+l.length,s.addMark(n.from+c,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var No=j(Be(),1),pS=j(Dc(),1);var{getOwnPropertyNames:UL,getOwnPropertySymbols:$L}=Object,{hasOwnProperty:HL}=Object.prototype;function Hg(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function Nd(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);let{cache:i}=o,s=i.get(n),l=i.get(r);if(s&&l)return s===r&&l===n;i.set(n,r),i.set(r,n);let a=e(n,r,o);return i.delete(n),i.delete(r),a}}function VL(e){return e?.[Symbol.toStringTag]}function J_(e){return UL(e).concat($L(e))}var qL=Object.hasOwn||((e,t)=>HL.call(e,t));function xi(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var WL="__v",jL="__o",KL="_owner",{getOwnPropertyDescriptor:Z_,keys:X_}=Object;function GL(e,t){return e.byteLength===t.byteLength&&Md(new Uint8Array(e),new Uint8Array(t))}function YL(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function JL(e,t){return e.byteLength===t.byteLength&&Md(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ZL(e,t){return xi(e.getTime(),t.getTime())}function XL(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function QL(e,t){return e===t}function Q_(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),i=e.entries(),s,l,a=0;for(;(s=i.next())&&!s.done;){let u=t.entries(),c=!1,d=0;for(;(l=u.next())&&!l.done;){if(o[d]){d++;continue}let f=s.value,p=l.value;if(n.equals(f[0],p[0],a,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;a++}return!0}var e8=xi;function t8(e,t,n){let r=X_(e),o=r.length;if(X_(t).length!==o)return!1;for(;o-- >0;)if(!tS(e,t,n,r[o]))return!1;return!0}function _a(e,t,n){let r=J_(e),o=r.length;if(J_(t).length!==o)return!1;let i,s,l;for(;o-- >0;)if(i=r[o],!tS(e,t,n,i)||(s=Z_(e,i),l=Z_(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function n8(e,t){return xi(e.valueOf(),t.valueOf())}function r8(e,t){return e.source===t.source&&e.flags===t.flags}function eS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),i=e.values(),s,l;for(;(s=i.next())&&!s.done;){let a=t.values(),u=!1,c=0;for(;(l=a.next())&&!l.done;){if(!o[c]&&n.equals(s.value,l.value,s.value,l.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function Md(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function o8(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function tS(e,t,n,r){return(r===KL||r===jL||r===WL)&&(e.$$typeof||t.$$typeof)?!0:qL(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var i8="[object ArrayBuffer]",s8="[object Arguments]",l8="[object Boolean]",a8="[object DataView]",u8="[object Date]",c8="[object Error]",d8="[object Map]",f8="[object Number]",p8="[object Object]",h8="[object RegExp]",m8="[object Set]",g8="[object String]",b8={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},y8="[object URL]",x8=Object.prototype.toString;function v8({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:h}){return function(b,m,y){if(b===m)return!0;if(b==null||m==null)return!1;let x=typeof b;if(x!==typeof m)return!1;if(x!=="object")return x==="number"?l(b,m,y):x==="function"?i(b,m,y):!1;let v=b.constructor;if(v!==m.constructor)return!1;if(v===Object)return a(b,m,y);if(Array.isArray(b))return t(b,m,y);if(v===Date)return r(b,m,y);if(v===RegExp)return c(b,m,y);if(v===Map)return s(b,m,y);if(v===Set)return d(b,m,y);let k=x8.call(b);if(k===u8)return r(b,m,y);if(k===h8)return c(b,m,y);if(k===d8)return s(b,m,y);if(k===m8)return d(b,m,y);if(k===p8)return typeof b.then!="function"&&typeof m.then!="function"&&a(b,m,y);if(k===y8)return p(b,m,y);if(k===c8)return o(b,m,y);if(k===s8)return a(b,m,y);if(b8[k])return f(b,m,y);if(k===i8)return e(b,m,y);if(k===a8)return n(b,m,y);if(k===l8||k===f8||k===g8)return u(b,m,y);if(h){let E=h[k];if(!E){let w=VL(b);w&&(E=h[w])}if(E)return E(b,m,y)}return!1}}function k8({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:GL,areArraysEqual:n?_a:YL,areDataViewsEqual:JL,areDatesEqual:ZL,areErrorsEqual:XL,areFunctionsEqual:QL,areMapsEqual:n?Hg(Q_,_a):Q_,areNumbersEqual:e8,areObjectsEqual:n?_a:t8,arePrimitiveWrappersEqual:n8,areRegExpsEqual:r8,areSetsEqual:n?Hg(eS,_a):eS,areTypedArraysEqual:n?Hg(Md,_a):Md,areUrlsEqual:o8,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let o=Nd(r.areArraysEqual),i=Nd(r.areMapsEqual),s=Nd(r.areObjectsEqual),l=Nd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return r}function E8(e){return function(t,n,r,o,i,s,l){return e(t,n,l)}}function w8({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(l,a){let{cache:u=e?new WeakMap:void 0,meta:c}=n();return t(l,a,{cache:u,equals:r,meta:c,strict:o})};if(e)return function(l,a){return t(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};let i={cache:void 0,equals:r,meta:void 0,strict:o};return function(l,a){return t(l,a,i)}}var nS=Ao(),iq=Ao({strict:!0}),sq=Ao({circular:!0}),lq=Ao({circular:!0,strict:!0}),aq=Ao({createInternalComparator:()=>xi}),uq=Ao({strict:!0,createInternalComparator:()=>xi}),cq=Ao({circular:!0,createInternalComparator:()=>xi}),dq=Ao({circular:!0,createInternalComparator:()=>xi,strict:!0});function Ao(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,i=k8(e),s=v8(i),l=n?n(s):E8(s);return w8({circular:t,comparator:s,createState:r,equals:l,strict:o})}var Mo=j(Be(),1),hS=j(sS(),1),bS=j(pe(),1),Ca=j(Be(),1),kS=j(pe(),1),wS=j(Be(),1),_S=j(pe(),1);var CS=j(Be(),1),qg=j(Be(),1),AS=j(ys(),1),TS=j(pe(),1),q8=j(pe(),1);var Fs=j(Be(),1),NS=j(pe(),1),R8=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},D8=({contentComponent:e})=>{let t=(0,dS.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Lr.jsx)(Lr.Fragment,{children:Object.values(t)})};function I8(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:cS.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var L8=class extends To.default.Component{constructor(e){var t;super(e),this.editorContentRef=To.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=I8(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Lr.jsxs)(Lr.Fragment,{children:[(0,Lr.jsx)("div",{ref:R8(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Lr.jsx)(D8,{contentComponent:e.contentComponent})]})}},P8=(0,To.forwardRef)((e,t)=>{let n=To.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return To.default.createElement(L8,{key:n,innerRef:t,...e})}),fS=To.default.memo(P8),B8=typeof window<"u"?Mo.useLayoutEffect:Mo.useEffect,F8=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function Wg(e){var t;let[n]=(0,Mo.useState)(()=>new F8(e.editor)),r=(0,hS.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:nS);return B8(()=>n.watch(e.editor),[e.editor,n]),(0,Mo.useDebugValue)(r),r}var lS=!1,Vg=typeof window>"u",z8=Vg||!!(typeof window<"u"&&window.next),U8=class mS{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Vg||z8){if(lS)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Vg&&lS)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new q_(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?mS.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function gS(e={},t=[]){let n=(0,No.useRef)(e);n.current=e;let[r]=(0,No.useState)(()=>new U8(n)),o=(0,pS.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,No.useDebugValue)(o),(0,No.useEffect)(r.onRender(t)),Wg({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),o}var yS=(0,Sa.createContext)({editor:null}),bq=yS.Consumer,Rd=()=>(0,Sa.useContext)(yS);var xS=(0,Ca.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var vS=()=>(0,Ca.useContext)(xS);function ES({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=vS();return(0,kS.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var SS=wS.default.forwardRef((e,t)=>{let{onDragStart:n}=vS(),r=e.as||"div";return(0,_S.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function aS(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function uS(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function $8(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function H8(e){if(aS(e)||uS(e))return!0;if($8(e)){let t=e.type;if(t)return aS(t)||uS(t)}return!1}function V8(){try{if(qg.version)return parseInt(qg.version.split(".")[0],10)>=19}catch{}return!1}var jg=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,AS.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=V8(),i=H8(t),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=l=>{this.ref=l}),this.reactElement=(0,TS.jsx)(t,{...s}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},yq=CS.default.createContext({markViewContentRef:()=>{}});var W8=class extends Y_{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(a={})=>this.updateAttributes(a),deleteNode:()=>this.deleteNode(),ref:(0,Fs.createRef)()};if(!this.component.displayName){let a=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=a(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:a=>{a&&this.contentDOMElement&&a.firstChild!==this.contentDOMElement&&(a.hasAttribute("data-node-view-wrapper")&&a.removeAttribute("data-node-view-wrapper"),a.appendChild(this.contentDOMElement))}},o=this.component,i=(0,Fs.memo)(a=>(0,NS.jsx)(xS.Provider,{value:r,children:(0,Fs.createElement)(o,a)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new jg(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=Ps(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function MS(e,t){return n=>n.editor.contentComponent?new W8(e,n,t):{}}var zs=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var j8=/^\s*>\s$/,OS=Q.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return zs("blockquote",{...te(this.options.HTMLAttributes,e),children:zs("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let l=t.renderChildren([o]).split(` `).map(a=>a.trim()===""?n:`${n} ${a}`);r.push(l.join(` `))}),r.join(` ${n} -`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Xn({find:V8,type:this.type})]}});var W8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,j8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,K8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,G8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,DS=Ge.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return zs("strong",{...te(this.options.HTMLAttributes,e),children:zs("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Zn({find:W8,type:this.type}),Zn({find:K8,type:this.type})]},addPasteRules(){return[yn({find:j8,type:this.type}),yn({find:G8,type:this.type})]}});var J8=/(^|[^`])`([^`]+)`(?!`)$/,Y8=/(^|[^`])`([^`]+)`(?!`)/g,IS=Ge.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Zn({find:J8,type:this.type})]},addPasteRules(){return[yn({find:Y8,type:this.type})]}});var Wg=4,Z8=/^```([a-z]+)?[\s\n]$/,X8=/^~~~([a-z]+)?[\s\n]$/,jg=Q.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Wg,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",te(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` +`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Xn({find:j8,type:this.type})]}});var K8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,G8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Y8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,J8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,RS=Ge.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return zs("strong",{...te(this.options.HTMLAttributes,e),children:zs("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Zn({find:K8,type:this.type}),Zn({find:Y8,type:this.type})]},addPasteRules(){return[yn({find:G8,type:this.type}),yn({find:J8,type:this.type})]}});var Z8=/(^|[^`])`([^`]+)`(?!`)$/,X8=/(^|[^`])`([^`]+)`(?!`)/g,DS=Ge.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Zn({find:Z8,type:this.type})]},addPasteRules(){return[yn({find:X8,type:this.type})]}});var Kg=4,Q8=/^```([a-z]+)?[\s\n]$/,eP=/^~~~([a-z]+)?[\s\n]$/,Gg=Q.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Kg,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",te(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` `):r=`\`\`\`${o} -\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Wg,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?e.commands.insertContent(l):e.commands.command(({tr:a})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` +\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Kg,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?e.commands.insertContent(l):e.commands.command(({tr:a})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` `,` `).split(` `).map(h=>l+h).join(` -`);return a.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Wg,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?e.commands.command(({tr:l})=>{var a;let{pos:u}=i,c=i.start(),d=i.end(),p=r.doc.textBetween(c,d,` +`);return a.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Kg,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?e.commands.command(({tr:l})=>{var a;let{pos:u}=i,c=i.start(),d=i.end(),p=r.doc.textBetween(c,d,` `,` `).split(` -`),h=0,m=0,b=u-c;for(let E=0;E=b){h=E;break}m+=p[E].length+1}let y=((a=p[h].match(/^ */))==null?void 0:a[0])||"",x=Math.min(y.length,n);if(x===0)return!0;let v=c;for(let E=0;E{let{from:a,to:u}=o,f=r.doc.textBetween(a,u,` +`),h=0,g=0,b=u-c;for(let E=0;E=b){h=E;break}g+=p[E].length+1}let y=((a=p[h].match(/^ */))==null?void 0:a[0])||"",x=Math.min(y.length,n);if(x===0)return!0;let v=c;for(let E=0;E{let{from:a,to:u}=o,f=r.doc.textBetween(a,u,` `,` `).split(` -`).map(p=>{var h;let m=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(m.length,n);return p.slice(b)}).join(` +`).map(p=>{var h;let g=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(g.length,n);return p.slice(b)}).join(` `);return l.replaceWith(a,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` -`);return!i||!s?!1:e.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?e.commands.command(({tr:u})=>(u.setSelection(W.near(r.resolve(l))),!0)):e.commands.exitCode()}}},addInputRules(){return[Ea({find:Z8,type:this.type,getAttributes:e=>({language:e[1]})}),Ea({find:X8,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new q({key:new Y("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=e.state,a=l.text(n.replace(/\r\n?/g,` -`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(H.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),LS=jg;var PS=Q.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`);return!i||!s?!1:e.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?e.commands.command(({tr:u})=>(u.setSelection(W.near(r.resolve(l))),!0)):e.commands.exitCode()}}},addInputRules(){return[Ea({find:Q8,type:this.type,getAttributes:e=>({language:e[1]})}),Ea({find:eP,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new V({key:new J("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=e.state,a=l.text(n.replace(/\r\n?/g,` +`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(H.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),IS=Gg;var LS=Q.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):""});var BS=Q.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",te(this.options.HTMLAttributes,e)]},renderText(){return` +`):""});var PS=Q.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",te(this.options.HTMLAttributes,e)]},renderText(){return` `},renderMarkdown:()=>` -`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&s){let d=a.filter(f=>l.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var FS=Q.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,te(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Ea({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var zS=Q.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",te(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!V_(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return _d(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,u=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(H.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection($.create(s.doc,a.pos)):s.setSelection(H.create(s.doc,a.pos));else{let c=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(H.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[q_({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var Q8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,eP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,tP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,nP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,US=Ge.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",te(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Zn({find:Q8,type:this.type}),Zn({find:tP,type:this.type})]},addPasteRules(){return[yn({find:eP,type:this.type}),yn({find:nP,type:this.type})]}});var rP="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",oP="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Qg="numeric",e1="ascii",t1="alpha",Na="asciinumeric",Aa="alphanumeric",n1="domain",KS="emoji",iP="scheme",sP="slashscheme",Kg="whitespace";function lP(e,t){return e in t||(t[e]=[]),t[e]}function vi(e,t,n){t[Qg]&&(t[Na]=!0,t[Aa]=!0),t[e1]&&(t[Na]=!0,t[t1]=!0),t[Na]&&(t[Aa]=!0),t[t1]&&(t[Aa]=!0),t[Aa]&&(t[n1]=!0),t[KS]&&(t[n1]=!0);for(let r in t){let o=lP(r,n);o.indexOf(e)<0&&o.push(e)}}function aP(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Vt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Vt.groups={};Vt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Ue=(e,t,n,r,o)=>e.tr(t,n,r,o),$S=(e,t,n,r,o)=>e.ts(t,n,r,o),D=(e,t,n,r,o)=>e.tt(t,n,r,o),Fr="WORD",r1="UWORD",GS="ASCIINUMERICAL",JS="ALPHANUMERICAL",La="LOCALHOST",o1="TLD",i1="UTLD",Ld="SCHEME",Us="SLASH_SCHEME",l1="NUM",s1="WS",a1="NL",Ma="OPENBRACE",Oa="CLOSEBRACE",Pd="OPENBRACKET",Bd="CLOSEBRACKET",Fd="OPENPAREN",zd="CLOSEPAREN",Ud="OPENANGLEBRACKET",$d="CLOSEANGLEBRACKET",Hd="FULLWIDTHLEFTPAREN",qd="FULLWIDTHRIGHTPAREN",Vd="LEFTCORNERBRACKET",Wd="RIGHTCORNERBRACKET",jd="LEFTWHITECORNERBRACKET",Kd="RIGHTWHITECORNERBRACKET",Gd="FULLWIDTHLESSTHAN",Jd="FULLWIDTHGREATERTHAN",Yd="AMPERSAND",Zd="APOSTROPHE",Xd="ASTERISK",Ro="AT",Qd="BACKSLASH",ef="BACKTICK",tf="CARET",Do="COLON",u1="COMMA",nf="DOLLAR",Qn="DOT",rf="EQUALS",c1="EXCLAMATION",vn="HYPHEN",Ra="PERCENT",of="PIPE",sf="PLUS",lf="POUND",Da="QUERY",d1="QUOTE",YS="FULLWIDTHMIDDLEDOT",f1="SEMI",er="SLASH",Ia="TILDE",af="UNDERSCORE",ZS="EMOJI",uf="SYM",XS=Object.freeze({__proto__:null,ALPHANUMERICAL:JS,AMPERSAND:Yd,APOSTROPHE:Zd,ASCIINUMERICAL:GS,ASTERISK:Xd,AT:Ro,BACKSLASH:Qd,BACKTICK:ef,CARET:tf,CLOSEANGLEBRACKET:$d,CLOSEBRACE:Oa,CLOSEBRACKET:Bd,CLOSEPAREN:zd,COLON:Do,COMMA:u1,DOLLAR:nf,DOT:Qn,EMOJI:ZS,EQUALS:rf,EXCLAMATION:c1,FULLWIDTHGREATERTHAN:Jd,FULLWIDTHLEFTPAREN:Hd,FULLWIDTHLESSTHAN:Gd,FULLWIDTHMIDDLEDOT:YS,FULLWIDTHRIGHTPAREN:qd,HYPHEN:vn,LEFTCORNERBRACKET:Vd,LEFTWHITECORNERBRACKET:jd,LOCALHOST:La,NL:a1,NUM:l1,OPENANGLEBRACKET:Ud,OPENBRACE:Ma,OPENBRACKET:Pd,OPENPAREN:Fd,PERCENT:Ra,PIPE:of,PLUS:sf,POUND:lf,QUERY:Da,QUOTE:d1,RIGHTCORNERBRACKET:Wd,RIGHTWHITECORNERBRACKET:Kd,SCHEME:Ld,SEMI:f1,SLASH:er,SLASH_SCHEME:Us,SYM:uf,TILDE:Ia,TLD:o1,UNDERSCORE:af,UTLD:i1,UWORD:r1,WORD:Fr,WS:s1}),Pr=/[a-z]/,Ta=/\p{L}/u,Gg=/\p{Emoji}/u;var Br=/\d/,Jg=/\s/;var HS="\r",Yg=` -`,uP="\uFE0F",cP="\u200D",Zg="\uFFFC",Rd=null,Dd=null;function dP(e=[]){let t={};Vt.groups=t;let n=new Vt;Rd==null&&(Rd=qS(rP)),Dd==null&&(Dd=qS(oP)),D(n,"'",Zd),D(n,"{",Ma),D(n,"}",Oa),D(n,"[",Pd),D(n,"]",Bd),D(n,"(",Fd),D(n,")",zd),D(n,"<",Ud),D(n,">",$d),D(n,"\uFF08",Hd),D(n,"\uFF09",qd),D(n,"\u300C",Vd),D(n,"\u300D",Wd),D(n,"\u300E",jd),D(n,"\u300F",Kd),D(n,"\uFF1C",Gd),D(n,"\uFF1E",Jd),D(n,"&",Yd),D(n,"*",Xd),D(n,"@",Ro),D(n,"`",ef),D(n,"^",tf),D(n,":",Do),D(n,",",u1),D(n,"$",nf),D(n,".",Qn),D(n,"=",rf),D(n,"!",c1),D(n,"-",vn),D(n,"%",Ra),D(n,"|",of),D(n,"+",sf),D(n,"#",lf),D(n,"?",Da),D(n,'"',d1),D(n,"/",er),D(n,";",f1),D(n,"~",Ia),D(n,"_",af),D(n,"\\",Qd),D(n,"\u30FB",YS);let r=Ue(n,Br,l1,{[Qg]:!0});Ue(r,Br,r);let o=Ue(r,Pr,GS,{[Na]:!0}),i=Ue(r,Ta,JS,{[Aa]:!0}),s=Ue(n,Pr,Fr,{[e1]:!0});Ue(s,Br,o),Ue(s,Pr,s),Ue(o,Br,o),Ue(o,Pr,o);let l=Ue(n,Ta,r1,{[t1]:!0});Ue(l,Pr),Ue(l,Br,i),Ue(l,Ta,l),Ue(i,Br,i),Ue(i,Pr),Ue(i,Ta,i);let a=D(n,Yg,a1,{[Kg]:!0}),u=D(n,HS,s1,{[Kg]:!0}),c=Ue(n,Jg,s1,{[Kg]:!0});D(n,Zg,c),D(u,Yg,a),D(u,Zg,c),Ue(u,Jg,c),D(c,HS),D(c,Yg),Ue(c,Jg,c),D(c,Zg,c);let d=Ue(n,Gg,ZS,{[KS]:!0});D(d,"#"),Ue(d,Gg,d),D(d,uP,d);let f=D(d,cP);D(f,"#"),Ue(f,Gg,d);let p=[[Pr,s],[Br,o]],h=[[Pr,null],[Ta,l],[Br,i]];for(let m=0;mm[0]>b[0]?1:-1);for(let m=0;m=0?y[n1]=!0:Pr.test(b)?Br.test(b)?y[Na]=!0:y[e1]=!0:y[Qg]=!0,$S(n,b,b,y)}return $S(n,"localhost",La,{ascii:!0}),n.jd=new Vt(uf),{start:n,tokens:Object.assign({groups:t},XS)}}function QS(e,t){let n=fP(t.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s=0&&(d+=n[s].length,f++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=f,u-=d,o.push({t:c.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function fP(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Oo(e,t,n,r,o){let i,s=t.length;for(let l=0;l=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Pa={defaultProtocol:"http",events:null,format:VS,formatHref:VS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function p1(e,t=null){let n=Object.assign({},Pa);e&&(n=Object.assign(n,e instanceof p1?e.o:e));let r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Pa.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},l=e.get("className",n,t),a=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=r,l&&(s.class=l),a&&(s.target=a),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:o,attributes:s,content:i,eventListeners:d}}};function cf(e,t){class n extends eC{constructor(o,i){super(o,i),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var WS=cf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),jS=cf("text"),pP=cf("nl"),Id=cf("url",{isLink:!0,toHref(e=Pa.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==La&&e[1].t===Do}});var xn=e=>new Vt(e);function hP({groups:e}){let t=e.domain.concat([Yd,Xd,Ro,Qd,ef,tf,nf,rf,vn,l1,Ra,of,sf,lf,er,uf,Ia,af]),n=[Zd,Do,u1,Qn,c1,Ra,Da,d1,f1,Ud,$d,Ma,Oa,Bd,Pd,Fd,zd,Hd,qd,Vd,Wd,jd,Kd,Gd,Jd],r=[Yd,Zd,Xd,Qd,ef,tf,nf,rf,vn,Ma,Oa,Ra,of,sf,lf,Da,er,uf,Ia,af],o=xn(),i=D(o,Ia);ie(i,r,i),ie(i,e.domain,i);let s=xn(),l=xn(),a=xn();ie(o,e.domain,s),ie(o,e.scheme,l),ie(o,e.slashscheme,a),ie(s,r,i),ie(s,e.domain,s);let u=D(s,Ro);D(i,Ro,u),D(l,Ro,u),D(a,Ro,u);let c=D(i,Qn);ie(c,r,i),ie(c,e.domain,i);let d=xn();ie(u,e.domain,d),ie(d,e.domain,d);let f=D(d,Qn);ie(f,e.domain,d);let p=xn(WS);ie(f,e.tld,p),ie(f,e.utld,p),D(u,La,p);let h=D(d,vn);D(h,vn,h),ie(h,e.domain,d),ie(p,e.domain,d),D(p,Qn,f),D(p,vn,h);let m=D(p,Do);ie(m,e.numeric,WS);let b=D(s,vn),g=D(s,Qn);D(b,vn,b),ie(b,e.domain,s),ie(g,r,i),ie(g,e.domain,s);let y=xn(Id);ie(g,e.tld,y),ie(g,e.utld,y),ie(y,e.domain,s),ie(y,r,i),D(y,Qn,g),D(y,vn,b),D(y,Ro,u);let x=D(y,Do),v=xn(Id);ie(x,e.numeric,v);let k=xn(Id),E=xn();ie(k,t,k),ie(k,n,E),ie(E,t,k),ie(E,n,E),D(y,er,k),D(v,er,k);let w=D(l,Do),_=D(a,Do),T=D(_,er),C=D(T,er);ie(l,e.domain,s),D(l,Qn,g),D(l,vn,b),ie(a,e.domain,s),D(a,Qn,g),D(a,vn,b),ie(w,e.domain,k),D(w,er,k),D(w,Da,k),ie(C,e.domain,k),ie(C,t,k),D(C,er,k);let F=[[Ma,Oa],[Pd,Bd],[Fd,zd],[Ud,$d],[Hd,qd],[Vd,Wd],[jd,Kd],[Gd,Jd]];for(let N=0;N=0&&f++,o++,c++;if(f<0)o-=c,o0&&(i.push(Xg(jS,t,s)),s=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);i.push(Xg(p,t,h))}}return s.length>0&&i.push(Xg(jS,t,s)),i}function Xg(e,t,n){let r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}var gP=typeof console<"u"&&console&&console.warn||(()=>{}),bP="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ne={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function tC(){return Vt.groups={},Ne.scanner=null,Ne.parser=null,Ne.tokenQueue=[],Ne.pluginQueue=[],Ne.customSchemes=[],Ne.initialized=!1,Ne}function h1(e,t=!1){if(Ne.initialized&&gP(`linkifyjs: already initialized - will not register custom scheme "${e}" ${bP}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. +`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&s){let d=a.filter(f=>l.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var BS=Q.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,te(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Ea({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var FS=Q.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",te(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!j_(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return _d(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,u=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(H.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection($.create(s.doc,a.pos)):s.setSelection(H.create(s.doc,a.pos));else{let c=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(H.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[W_({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var tP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,nP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,rP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,oP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,zS=Ge.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",te(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Zn({find:tP,type:this.type}),Zn({find:rP,type:this.type})]},addPasteRules(){return[yn({find:nP,type:this.type}),yn({find:oP,type:this.type})]}});var iP="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",sP="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",t1="numeric",n1="ascii",r1="alpha",Na="asciinumeric",Ta="alphanumeric",o1="domain",jS="emoji",lP="scheme",aP="slashscheme",Yg="whitespace";function uP(e,t){return e in t||(t[e]=[]),t[e]}function vi(e,t,n){t[t1]&&(t[Na]=!0,t[Ta]=!0),t[n1]&&(t[Na]=!0,t[r1]=!0),t[Na]&&(t[Ta]=!0),t[r1]&&(t[Ta]=!0),t[Ta]&&(t[o1]=!0),t[jS]&&(t[o1]=!0);for(let r in t){let o=uP(r,n);o.indexOf(e)<0&&o.push(e)}}function cP(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function qt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}qt.groups={};qt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Ue=(e,t,n,r,o)=>e.tr(t,n,r,o),US=(e,t,n,r,o)=>e.ts(t,n,r,o),D=(e,t,n,r,o)=>e.tt(t,n,r,o),Fr="WORD",i1="UWORD",KS="ASCIINUMERICAL",GS="ALPHANUMERICAL",La="LOCALHOST",s1="TLD",l1="UTLD",Pd="SCHEME",Us="SLASH_SCHEME",u1="NUM",a1="WS",c1="NL",Ma="OPENBRACE",Oa="CLOSEBRACE",Bd="OPENBRACKET",Fd="CLOSEBRACKET",zd="OPENPAREN",Ud="CLOSEPAREN",$d="OPENANGLEBRACKET",Hd="CLOSEANGLEBRACKET",Vd="FULLWIDTHLEFTPAREN",qd="FULLWIDTHRIGHTPAREN",Wd="LEFTCORNERBRACKET",jd="RIGHTCORNERBRACKET",Kd="LEFTWHITECORNERBRACKET",Gd="RIGHTWHITECORNERBRACKET",Yd="FULLWIDTHLESSTHAN",Jd="FULLWIDTHGREATERTHAN",Zd="AMPERSAND",Xd="APOSTROPHE",Qd="ASTERISK",Ro="AT",ef="BACKSLASH",tf="BACKTICK",nf="CARET",Do="COLON",d1="COMMA",rf="DOLLAR",Qn="DOT",of="EQUALS",f1="EXCLAMATION",vn="HYPHEN",Ra="PERCENT",sf="PIPE",lf="PLUS",af="POUND",Da="QUERY",p1="QUOTE",YS="FULLWIDTHMIDDLEDOT",h1="SEMI",er="SLASH",Ia="TILDE",uf="UNDERSCORE",JS="EMOJI",cf="SYM",ZS=Object.freeze({__proto__:null,ALPHANUMERICAL:GS,AMPERSAND:Zd,APOSTROPHE:Xd,ASCIINUMERICAL:KS,ASTERISK:Qd,AT:Ro,BACKSLASH:ef,BACKTICK:tf,CARET:nf,CLOSEANGLEBRACKET:Hd,CLOSEBRACE:Oa,CLOSEBRACKET:Fd,CLOSEPAREN:Ud,COLON:Do,COMMA:d1,DOLLAR:rf,DOT:Qn,EMOJI:JS,EQUALS:of,EXCLAMATION:f1,FULLWIDTHGREATERTHAN:Jd,FULLWIDTHLEFTPAREN:Vd,FULLWIDTHLESSTHAN:Yd,FULLWIDTHMIDDLEDOT:YS,FULLWIDTHRIGHTPAREN:qd,HYPHEN:vn,LEFTCORNERBRACKET:Wd,LEFTWHITECORNERBRACKET:Kd,LOCALHOST:La,NL:c1,NUM:u1,OPENANGLEBRACKET:$d,OPENBRACE:Ma,OPENBRACKET:Bd,OPENPAREN:zd,PERCENT:Ra,PIPE:sf,PLUS:lf,POUND:af,QUERY:Da,QUOTE:p1,RIGHTCORNERBRACKET:jd,RIGHTWHITECORNERBRACKET:Gd,SCHEME:Pd,SEMI:h1,SLASH:er,SLASH_SCHEME:Us,SYM:cf,TILDE:Ia,TLD:s1,UNDERSCORE:uf,UTLD:l1,UWORD:i1,WORD:Fr,WS:a1}),Pr=/[a-z]/,Aa=/\p{L}/u,Jg=/\p{Emoji}/u;var Br=/\d/,Zg=/\s/;var $S="\r",Xg=` +`,dP="\uFE0F",fP="\u200D",Qg="\uFFFC",Dd=null,Id=null;function pP(e=[]){let t={};qt.groups=t;let n=new qt;Dd==null&&(Dd=HS(iP)),Id==null&&(Id=HS(sP)),D(n,"'",Xd),D(n,"{",Ma),D(n,"}",Oa),D(n,"[",Bd),D(n,"]",Fd),D(n,"(",zd),D(n,")",Ud),D(n,"<",$d),D(n,">",Hd),D(n,"\uFF08",Vd),D(n,"\uFF09",qd),D(n,"\u300C",Wd),D(n,"\u300D",jd),D(n,"\u300E",Kd),D(n,"\u300F",Gd),D(n,"\uFF1C",Yd),D(n,"\uFF1E",Jd),D(n,"&",Zd),D(n,"*",Qd),D(n,"@",Ro),D(n,"`",tf),D(n,"^",nf),D(n,":",Do),D(n,",",d1),D(n,"$",rf),D(n,".",Qn),D(n,"=",of),D(n,"!",f1),D(n,"-",vn),D(n,"%",Ra),D(n,"|",sf),D(n,"+",lf),D(n,"#",af),D(n,"?",Da),D(n,'"',p1),D(n,"/",er),D(n,";",h1),D(n,"~",Ia),D(n,"_",uf),D(n,"\\",ef),D(n,"\u30FB",YS);let r=Ue(n,Br,u1,{[t1]:!0});Ue(r,Br,r);let o=Ue(r,Pr,KS,{[Na]:!0}),i=Ue(r,Aa,GS,{[Ta]:!0}),s=Ue(n,Pr,Fr,{[n1]:!0});Ue(s,Br,o),Ue(s,Pr,s),Ue(o,Br,o),Ue(o,Pr,o);let l=Ue(n,Aa,i1,{[r1]:!0});Ue(l,Pr),Ue(l,Br,i),Ue(l,Aa,l),Ue(i,Br,i),Ue(i,Pr),Ue(i,Aa,i);let a=D(n,Xg,c1,{[Yg]:!0}),u=D(n,$S,a1,{[Yg]:!0}),c=Ue(n,Zg,a1,{[Yg]:!0});D(n,Qg,c),D(u,Xg,a),D(u,Qg,c),Ue(u,Zg,c),D(c,$S),D(c,Xg),Ue(c,Zg,c),D(c,Qg,c);let d=Ue(n,Jg,JS,{[jS]:!0});D(d,"#"),Ue(d,Jg,d),D(d,dP,d);let f=D(d,fP);D(f,"#"),Ue(f,Jg,d);let p=[[Pr,s],[Br,o]],h=[[Pr,null],[Aa,l],[Br,i]];for(let g=0;gg[0]>b[0]?1:-1);for(let g=0;g=0?y[o1]=!0:Pr.test(b)?Br.test(b)?y[Na]=!0:y[n1]=!0:y[t1]=!0,US(n,b,b,y)}return US(n,"localhost",La,{ascii:!0}),n.jd=new qt(cf),{start:n,tokens:Object.assign({groups:t},ZS)}}function XS(e,t){let n=hP(t.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s=0&&(d+=n[s].length,f++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=f,u-=d,o.push({t:c.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function hP(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Oo(e,t,n,r,o){let i,s=t.length;for(let l=0;l=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Pa={defaultProtocol:"http",events:null,format:VS,formatHref:VS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function m1(e,t=null){let n=Object.assign({},Pa);e&&(n=Object.assign(n,e instanceof m1?e.o:e));let r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Pa.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},l=e.get("className",n,t),a=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=r,l&&(s.class=l),a&&(s.target=a),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:o,attributes:s,content:i,eventListeners:d}}};function df(e,t){class n extends QS{constructor(o,i){super(o,i),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var qS=df("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),WS=df("text"),mP=df("nl"),Ld=df("url",{isLink:!0,toHref(e=Pa.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==La&&e[1].t===Do}});var xn=e=>new qt(e);function gP({groups:e}){let t=e.domain.concat([Zd,Qd,Ro,ef,tf,nf,rf,of,vn,u1,Ra,sf,lf,af,er,cf,Ia,uf]),n=[Xd,Do,d1,Qn,f1,Ra,Da,p1,h1,$d,Hd,Ma,Oa,Fd,Bd,zd,Ud,Vd,qd,Wd,jd,Kd,Gd,Yd,Jd],r=[Zd,Xd,Qd,ef,tf,nf,rf,of,vn,Ma,Oa,Ra,sf,lf,af,Da,er,cf,Ia,uf],o=xn(),i=D(o,Ia);ie(i,r,i),ie(i,e.domain,i);let s=xn(),l=xn(),a=xn();ie(o,e.domain,s),ie(o,e.scheme,l),ie(o,e.slashscheme,a),ie(s,r,i),ie(s,e.domain,s);let u=D(s,Ro);D(i,Ro,u),D(l,Ro,u),D(a,Ro,u);let c=D(i,Qn);ie(c,r,i),ie(c,e.domain,i);let d=xn();ie(u,e.domain,d),ie(d,e.domain,d);let f=D(d,Qn);ie(f,e.domain,d);let p=xn(qS);ie(f,e.tld,p),ie(f,e.utld,p),D(u,La,p);let h=D(d,vn);D(h,vn,h),ie(h,e.domain,d),ie(p,e.domain,d),D(p,Qn,f),D(p,vn,h);let g=D(p,Do);ie(g,e.numeric,qS);let b=D(s,vn),m=D(s,Qn);D(b,vn,b),ie(b,e.domain,s),ie(m,r,i),ie(m,e.domain,s);let y=xn(Ld);ie(m,e.tld,y),ie(m,e.utld,y),ie(y,e.domain,s),ie(y,r,i),D(y,Qn,m),D(y,vn,b),D(y,Ro,u);let x=D(y,Do),v=xn(Ld);ie(x,e.numeric,v);let k=xn(Ld),E=xn();ie(k,t,k),ie(k,n,E),ie(E,t,k),ie(E,n,E),D(y,er,k),D(v,er,k);let w=D(l,Do),_=D(a,Do),A=D(_,er),C=D(A,er);ie(l,e.domain,s),D(l,Qn,m),D(l,vn,b),ie(a,e.domain,s),D(a,Qn,m),D(a,vn,b),ie(w,e.domain,k),D(w,er,k),D(w,Da,k),ie(C,e.domain,k),ie(C,t,k),D(C,er,k);let F=[[Ma,Oa],[Bd,Fd],[zd,Ud],[$d,Hd],[Vd,qd],[Wd,jd],[Kd,Gd],[Yd,Jd]];for(let N=0;N=0&&f++,o++,c++;if(f<0)o-=c,o0&&(i.push(e1(WS,t,s)),s=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);i.push(e1(p,t,h))}}return s.length>0&&i.push(e1(WS,t,s)),i}function e1(e,t,n){let r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}var yP=typeof console<"u"&&console&&console.warn||(()=>{}),xP="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ne={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function eC(){return qt.groups={},Ne.scanner=null,Ne.parser=null,Ne.tokenQueue=[],Ne.pluginQueue=[],Ne.customSchemes=[],Ne.initialized=!1,Ne}function g1(e,t=!1){if(Ne.initialized&&yP(`linkifyjs: already initialized - will not register custom scheme "${e}" ${xP}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);Ne.customSchemes.push([e,t])}function yP(){Ne.scanner=dP(Ne.customSchemes);for(let e=0;e{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=Mg(n.doc,[...t]);if(Pg(l).forEach(({newRange:u})=>{let c=y_(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!vP.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(xP).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=df(h).map(g=>g.toObject(e.defaultProtocol));if(!EP(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{wd(g.from,g.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function _P(e){return new q({key:new Y("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let l=null;if(r.target instanceof HTMLAnchorElement)l=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;l=f.find(p=>p.nodeName==="A")}if(!l)return s;let a=Lg(t.state,e.type.name),u=(o=l?.href)!=null?o:a.href,c=(i=l?.target)!=null?i:a.target;l&&u&&(window.open(u,c),s=!0)}return s}}})}function SP(e){return new q({key:new Y("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:i}=t,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});let u=ff(a,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function ki(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(kP,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var g1=Ge.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){h1(e);return}h1(e.scheme,e.optionalSlashes)})},onDestroy(){tC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!ki(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!ki(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!ki(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",te(this.options.HTMLAttributes,e),0]:["a",te(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ki(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!ki(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[yn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=ff(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!ki(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(wP({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ki(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(_P({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(SP({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),nC=g1;var CP=Object.defineProperty,TP=(e,t)=>{for(var n in t)CP(e,n,{get:t[n],enumerable:!0})},AP="listItem",rC="textStyle",oC=/^\s*([-+*])\s$/,x1=Q.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(AP,this.editor.getAttributes(rC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Xn({find:oC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Xn({find:oC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(rC),editor:this.editor})),[e]}}),v1=Q.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=e.tokens.slice(1),l=t.parseChildren(s);n.push(...l)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>wa(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),NP={};TP(NP,{findListItemPos:()=>Ba,getNextListDepth:()=>k1,handleBackspace:()=>b1,handleDelete:()=>y1,hasListBefore:()=>aC,hasListItemAfter:()=>MP,hasListItemBefore:()=>uC,listItemHasSubList:()=>cC,nextListIsDeeper:()=>dC,nextListIsHigher:()=>fC});var Ba=(e,t)=>{let{$from:n}=t.selection,r=ze(e,t.schema),o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:t.doc.resolve(s),depth:l}},k1=(e,t)=>{let n=Ba(e,t);if(!n)return!1;let[,r]=w_(t,e,n.$pos.pos+4);return r},aC=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},uC=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},cC=(e,t,n)=>{if(!n)return!1;let r=ze(e,t.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},b1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Yn(e.state,t)&&aC(e.state,t,n)){let{$anchor:l}=e.state.selection,a=e.state.doc.resolve(l.before()-1),u=[];a.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(a.start()+c.pos+1);return e.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Yn(e.state,t)||!S_(e.state))return!1;let r=Ba(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=cC(t,e.state,i);return uC(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},dC=(e,t)=>{let n=k1(e,t),r=Ba(e,t);return!r||!n?!1:n>r.depth},fC=(e,t)=>{let n=k1(e,t),r=Ba(e,t);return!r||!n?!1:n{if(!Yn(e.state,t)||!__(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:dC(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():fC(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},MP=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},E1=ne.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&y1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&y1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&b1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&b1(e,n,r)&&(t=!0)}),t}}}}),iC=/^(\s*)(\d+)\.\s+(.*)$/,OP=/^\s/;function RP(e){let t=[],n=0,r=0;for(;n{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=Og(n.doc,[...t]);if(Bg(l).forEach(({newRange:u})=>{let c=v_(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!EP.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(kP).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],g=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=ff(h).map(m=>m.toObject(e.defaultProtocol));if(!_P(b))return!1;b.filter(m=>m.isLink).map(m=>({...m,from:g+m.start+1,to:g+m.end+1})).filter(m=>r.schema.marks.code?!r.doc.rangeHasMark(m.from,m.to,r.schema.marks.code):!0).filter(m=>e.validate(m.value)).filter(m=>e.shouldAutoLink(m.value)).forEach(m=>{wd(m.from,m.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(m.from,m.to,e.type.create({href:m.href}))})}}),!!s.steps.length)return s}})}function CP(e){return new V({key:new J("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let l=null;if(r.target instanceof HTMLAnchorElement)l=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;l=f.find(p=>p.nodeName==="A")}if(!l)return s;let a=Pg(t.state,e.type.name),u=(o=l?.href)!=null?o:a.href,c=(i=l?.target)!=null?i:a.target;l&&u&&(window.open(u,c),s=!0)}return s}}})}function AP(e){return new V({key:new J("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:i}=t,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});let u=pf(a,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function ki(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(wP,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var y1=Ge.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){g1(e);return}g1(e.scheme,e.optionalSlashes)})},onDestroy(){eC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!ki(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!ki(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!ki(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",te(this.options.HTMLAttributes,e),0]:["a",te(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ki(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!ki(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[yn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=pf(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!ki(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(SP({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ki(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(CP({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(AP({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),tC=y1;var TP=Object.defineProperty,NP=(e,t)=>{for(var n in t)TP(e,n,{get:t[n],enumerable:!0})},MP="listItem",nC="textStyle",rC=/^\s*([-+*])\s$/,k1=Q.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(MP,this.editor.getAttributes(nC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Xn({find:rC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Xn({find:rC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(nC),editor:this.editor})),[e]}}),E1=Q.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=e.tokens.slice(1),l=t.parseChildren(s);n.push(...l)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>wa(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),OP={};NP(OP,{findListItemPos:()=>Ba,getNextListDepth:()=>w1,handleBackspace:()=>x1,handleDelete:()=>v1,hasListBefore:()=>lC,hasListItemAfter:()=>RP,hasListItemBefore:()=>aC,listItemHasSubList:()=>uC,nextListIsDeeper:()=>cC,nextListIsHigher:()=>dC});var Ba=(e,t)=>{let{$from:n}=t.selection,r=ze(e,t.schema),o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:t.doc.resolve(s),depth:l}},w1=(e,t)=>{let n=Ba(e,t);if(!n)return!1;let[,r]=S_(t,e,n.$pos.pos+4);return r},lC=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},aC=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},uC=(e,t,n)=>{if(!n)return!1;let r=ze(e,t.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},x1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Jn(e.state,t)&&lC(e.state,t,n)){let{$anchor:l}=e.state.selection,a=e.state.doc.resolve(l.before()-1),u=[];a.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(a.start()+c.pos+1);return e.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Jn(e.state,t)||!A_(e.state))return!1;let r=Ba(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=uC(t,e.state,i);return aC(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},cC=(e,t)=>{let n=w1(e,t),r=Ba(e,t);return!r||!n?!1:n>r.depth},dC=(e,t)=>{let n=w1(e,t),r=Ba(e,t);return!r||!n?!1:n{if(!Jn(e.state,t)||!C_(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:cC(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():dC(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},RP=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},_1=ne.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&v1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&v1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&x1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&x1(e,n,r)&&(t=!0)}),t}}}}),oC=/^(\s*)(\d+)\.\s+(.*)$/,DP=/^\s/;function IP(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=pC(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` -`)})}o.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return o}function DP(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=t.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=t.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var IP="listItem",sC="textStyle",lC=/^(\d+)\.\s$/,w1=Q.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",te(this.options.HTMLAttributes,n),0]:["ol",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?DP(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`).trim();if(c){let p=n.blockTokens(c);u.push(...p)}let d=i+1,f=[];for(;dt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(g=>g.indent)),h=fC(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(g=>g.raw).join(` +`)})}o.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return o}function LP(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=t.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=t.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var PP="listItem",iC="textStyle",sC=/^(\d+)\.\s$/,S1=Q.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",te(this.options.HTMLAttributes,n),0]:["ol",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?LP(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` `):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=t?.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;let o=e.split(` -`),[i,s]=RP(o);if(i.length===0)return;let l=pC(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(` -`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(IP,this.editor.getAttributes(sC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Xn({find:lC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Xn({find:lC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(sC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),LP=/^\s*(\[([( |x])?\])\s$/,pf=Q.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",te(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return wa(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),u=c=>{var d,f;l.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,l.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:a,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,l.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[Xn({find:LP,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),hf=Q.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",te(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=i=>{let s=Ad(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Ad(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),gW=ne.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(x1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(v1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(E1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(w1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(pf.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(hf.configure(this.options.taskList)),e}});var hC=Q.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",te(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var PP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,BP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,mC=Ge.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Zn({find:PP,type:this.type})]},addPasteRules(){return[yn({find:BP,type:this.type})]}});var gC=Q.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var bC=Ge.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",te(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function yC(e={}){return new q({view(t){return new _1(t,e)}})}var _1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*l;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!a||a==document.body&&getComputedStyle(a).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,p=d.height/a.offsetHeight;u=d.left-a.scrollLeft*f,c=d.top-a.scrollTop*p}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-c)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Vc(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var St=class e extends W{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):W.near(r)}content(){return P.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new S1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!FP(t)||!zP(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let l=t.node(s);if(n>0?t.indexAfter(s)0){i=l.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let a=t.doc.resolve(o);if(e.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!$.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}return null}}};St.prototype.visible=!1;St.findFrom=St.findGapCursorFrom;W.jsonID("gapcursor",St);var S1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return St.valid(n)?new St(n):W.near(n)}};function xC(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function FP(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||xC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function zP(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||xC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function vC(){return new q({props:{decorations:qP,createSelectionBetween(e,t,n){return t.pos==n.pos&&St.valid(n)?new St(n):null},handleClick:$P,handleKeyDown:UP,handleDOMEvents:{beforeinput:HP}}})}var UP=xa({ArrowLeft:mf("horiz",-1),ArrowRight:mf("horiz",1),ArrowUp:mf("vert",-1),ArrowDown:mf("vert",1)});function mf(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,l=t>0?s.$to:s.$from,a=s.empty;if(s instanceof H){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(t>0?l.after():l.before())}let u=St.findGapCursorFrom(l,t,a);return u?(o&&o(r.tr.setSelection(new St(u))),!0):!1}}function $P(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!St.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&$.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new St(r))),!0)}function HP(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof St))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=A.empty;for(let s=r.length-1;s>=0;s--)o=A.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new P(o,0,0));return i.setSelection(H.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function qP(e){if(!(e.selection instanceof St))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",xe.create(e.doc,[Oe.widget(e.selection.head,t,{key:"gapcursor"})])}var gf=200,ct=function(){};ct.prototype.append=function(t){return t.length?(t=ct.from(t),!this.length&&t||t.length=n?ct.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};ct.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};ct.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};ct.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};ct.from=function(t){return t instanceof ct?t:t&&t.length?new kC(t):ct.empty};var kC=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=gf)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=gf)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(ct);ct.empty=new kC([]);var VP=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(ct),C1=ct;var WP=500,wi=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new tr(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new tr(h,void 0,void 0,u.length+c.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(t,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cKP&&(l=jP(l,u),s-=u),new e(l.append(i),s)}remapping(t,n){let r=new ia;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new tr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},o);let a=n;this.items.forEach(f=>{let p=i.getMirror(--a);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(a+1,p));b&&l++,r.push(new tr(h,m,b))}else r.push(new tr(h))},o);let u=[];for(let f=n;fWP&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=t)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new tr(u.invert(),a,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new e(C1.from(o.reverse()),i)}};wi.empty=new wi(C1.empty,0);function jP(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var tr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},nr=class{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},KP=20;function GP(e,t,n,r){let o=n.getMeta(Ei),i;if(o)return o.historyState;n.getMeta(ZP)&&(e=new nr(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Ei))return s.getMeta(Ei).redo?new nr(e.done.addTransform(n,void 0,r,bf(t)),e.undone,EC(n.mapping.maps),e.prevTime,e.prevComposition):new nr(e.done,e.undone.addTransform(n,void 0,r,bf(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=e.prevTime==0||!s&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!JP(n,e.prevRanges)),u=s?T1(e.prevRanges,n.mapping):EC(n.mapping.maps);return new nr(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,bf(t)),wi.empty,u,n.time,l??e.prevComposition)}else return(i=n.getMeta("rebased"))?new nr(e.done.rebased(n,i),e.undone.rebased(n,i),T1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new nr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),T1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function JP(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function EC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,s)=>t.push(i,s));return t}function T1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=Ei.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=YP(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}var N1=yf(!1,!0),M1=yf(!0,!0),HW=yf(!1,!1),qW=yf(!0,!1);var JW=ne.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new q({key:new Y("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>o){let s=i-o,l=0,a=s,u=r.tr.deleteRange(l,a);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;let l=t.selection.$head.pos,a=i-r,u=l-a,c=l;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),CC=ne.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[yC(this.options)]}}),tj=ne.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new q({key:new Y("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return xe.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((a,u)=>{if(a.isText)return;if(!(o>=u&&o<=u+a.nodeSize-1))return!1;s+=1});let l=0;return e.descendants((a,u)=>{if(a.isText||!(o>=u&&o<=u+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(Oe.node(u,u+a.nodeSize,{class:this.options.className}))}),xe.create(e,i)}}})]}}),TC=ne.create({name:"gapCursor",addProseMirrorPlugins(){return[vC()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=he(K(e,"allowGapCursor",n)))!=null?t:null}}}),O1=ne.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new q({key:new Y("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let i=this.editor.isEmpty;return e.descendants((s,l)=>{let a=r>=l&&r<=l+s.nodeSize,u=!s.isLeaf&&ka(s);if((a||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];i&&c.push(this.options.emptyEditorClass);let d=Oe.node(l,l+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:a}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),xe.create(e,o)}}})]}}),cj=ne.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new q({key:new Y("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||_d(n.selection)||e.view.dragging?null:xe.create(n.doc,[Oe.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function SC({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var AC=ne.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Y(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new q({key:t,appendTransaction:(o,i,s)=>{let{doc:l,tr:a,schema:u}=s,c=t.getState(s),d=l.content.size,f=u.nodes[n];if(c)return a.insert(d,f.create())},state:{init:(o,i)=>{let s=i.tr.doc.lastChild;return!SC({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;let s=o.doc.lastChild;return!SC({node:s,types:r})}}})]}}),NC=ne.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>N1(e,t),redo:()=>({state:e,dispatch:t})=>M1(e,t)}},addProseMirrorPlugins(){return[_C(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var XP=ne.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(DS.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(RS.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(x1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(IS.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(jg.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(PS.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(CC.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(TC.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(BS.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(FS.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(NC.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(zS.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(US.configure(this.options.italic)),this.options.listItem!==!1&&o.push(v1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(E1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(g1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(w1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(hC.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(mC.configure(this.options.strike)),this.options.text!==!1&&o.push(gC.configure(this.options.text)),this.options.underline!==!1&&o.push(bC.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(AC.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),MC=XP;var OC=O1;var RC=hf;var DC=pf;var D1,I1;if(typeof WeakMap<"u"){let e=new WeakMap;D1=t=>e.get(t),I1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;D1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var $e=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:g-x});break}let v=o+x*t;for(let k=0;kr&&(i+=u.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function t5(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function r5(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Pn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function _f(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=$s(t.$head)||o5(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function o5(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function L1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function i5(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function F1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function qC(e,t,n){let r=e.node(-1),o=$e.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return s==null?null:e.node(0).resolve(i+s)}function _i(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function VC(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-i);a.unshift(n.pos-i);let u=a.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=i+c+1;return new Ss(l.resolve(f),l.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(L1(r)&&L1(o)&&F1(r,o)){let i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?zr.rowSelection(r,o):i&&this.isColSelection()?zr.colSelection(r,o):new zr(r,o)}return H.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=$e.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let a=o.top;a0||b>0){let g=h.attrs;if(m>0&&(g=_i(g,0,m)),b>0&&(g=_i(g,g.colspan-b,b)),p.lefto.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.top<=l.top?(s.top>0&&(t=a.resolve(i+o.map[s.left])),l.bottom0&&(n=a.resolve(i+o.map[l.left])),s.bottom0)return!1;let s=o+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(t){return t instanceof zr&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.left<=l.left?(s.left>0&&(t=a.resolve(i+o.map[s.top*o.width])),l.right0&&(n=a.resolve(i+o.map[l.top*o.width])),s.right{t.push(Oe.node(r,r+n.nodeSize,{class:"selectedCell"}))}),xe.create(e.doc,t)}function u5({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function c5({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){let i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function d5(e,t,n){let r=(t||e).selection,o=(t||e).doc,i,s;if(r instanceof $&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=me.create(o,r.from);else if(s=="row"){let l=o.resolve(r.from+1);i=me.rowSelection(l,l)}else if(!n){let l=$e.get(r.node),a=r.from+1,u=a+l.map[l.width*l.height-1];i=me.create(o,a+1,u)}}else r instanceof H&&u5(r)?i=H.create(o,r.from):r instanceof H&&c5(r)&&(i=H.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var f5=new Y("fix-tables");function jC(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let s=0,l=0;s{o.type.spec.tableRole=="table"&&(n=p5(e,o,i,n))};return t?t.doc!=e.doc&&jC(t.doc,e.doc,0,r):e.doc.descendants(r),n}function p5(e,t,n,r){let o=$e.get(t);if(!o.problems)return r;r||(r=e.tr);let i=[];for(let a=0;a0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;s5(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let s=0;s0&&o0&&t.map[l-1]==a||o0?-1:0;m5(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=a+1+u.content.size,d=IC(u)?a+1:c;i.replaceWith(d+r.tableStart,c+r.tableStart,l)}i.setSelection(new me(i.doc.resolve(a+r.tableStart))),t(i)}return!0}function $1(e,t){let n=Ct(e.schema);return y5(({node:r})=>n[r.type.spec.tableRole])(e,t)}function y5(e){return(t,n)=>{let r=t.selection,o,i;if(r instanceof me){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=r5(r.$from),!o)return!1;i=(s=$s(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs,a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let c=rr(t),d=t.tr;for(let p=0;p{s.attrs[e]!==t&&i.setNodeMarkup(l,null,{...s.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function x5(e){return function(t,n){if(!Pn(t))return!1;if(n){let r=Ct(t.schema),o=rr(t),i=t.tr,s=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(a=>o.table.nodeAt(a));for(let a=0;a{let p=f+i.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),r(s)}return!0}}var Gj=Hs("row",{useDeprecatedLogic:!0}),Jj=Hs("column",{useDeprecatedLogic:!0}),nT=Hs("cell",{useDeprecatedLogic:!0});function v5(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let i=e.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function xf(e,t){let n=e.selection;if(!(n instanceof me))return!1;if(t){let r=e.tr,o=Ct(e.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new P(o,0,0))}),r.docChanged&&t(r)}return!0}function k5(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if(i=="row")for(let a=0;a=0;s--){let{rowspan:l,colspan:a}=i.child(s).attrs;for(let u=o;u=t.length&&t.push(A.empty),n[o]r&&(f=f.type.createChecked(_i(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),a.push(d)}i.push(A.from(a))}n=i,t=o}return{width:e,height:t,rows:n}}function _5(e,t,n,r,o,i,s){let l=e.doc.type.schema,a=Ct(l),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==a.header_cell;d.push(b?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}let f=a.row.create(null,A.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let i=n.selection;if(i instanceof me)return Ef(n,r,W.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;let s=oT(o,e,t);if(s==null)return!1;if(e=="horiz")return Ef(n,r,W.near(n.doc.resolve(i.head+t),t));{let l=n.doc.resolve(s),a=qC(l,e,t),u;return a?u=W.near(a,1):t<0?u=W.near(n.doc.resolve(l.before(-1)),-1):u=W.near(n.doc.resolve(l.after(-1)),1),Ef(n,r,u)}}}function kf(e,t){return(n,r,o)=>{if(!o)return!1;let i=n.selection,s;if(i instanceof me)s=i;else{let a=oT(o,e,t);if(a==null)return!1;s=new me(n.doc.resolve(a))}let l=qC(s.$headCell,e,t);return l?Ef(n,r,new me(s.$anchorCell,l)):!1}}function C5(e,t){let n=e.state.doc,r=$s(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new me(r))),!0):!1}function T5(e,t,n){if(!Pn(e.state))return!1;let r=k5(n),o=e.state.selection;if(o instanceof me){r||(r={width:1,height:1,rows:[A.from(P1(Ct(e.state.schema).cell,n))]});let i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=$e.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=w5(r,l.right-l.left,l.bottom-l.top),FC(e.state,e.dispatch,s,l,r),!0}else if(r){let i=_f(e.state),s=i.start(-1);return FC(e.state,e.dispatch,s,$e.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function A5(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=zC(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof me)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=$s(e.state.selection.$anchor))!=null&&((n=R1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(a,u){let c=R1(e,u),d=Io.getState(e.state)==null;if(!c||!F1(a,c))if(d)c=a;else return;let f=new me(a,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Io,a.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",l),Io.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Io,-1))}function l(a){let u=a,c=Io.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(zC(e,u.target)!=r&&(d=R1(e,t),!d))return s();d&&i(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",l)}function oT(e,t,n){if(!(e.state.selection instanceof H))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){let s=r.before(o),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function zC(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function R1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return $s(e.state.doc.resolve(r))}var N5=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),B1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,B1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function B1(e,t,n,r,o,i){let s=0,l=!0,a=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new M5(-1,!1)},apply(s,l){return l.apply(s)}},props:{attributes:s=>{let l=en.getState(s);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,l)=>{O5(s,l,e,o)},mouseleave:s=>{R5(s)},mousedown:(s,l)=>{D5(s,l,t,n)}},decorations:s=>{let l=en.getState(s);if(l&&l.activeHandle>-1)return F5(s,l.activeHandle)},nodeViews:{}}});return i}var M5=class wf{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(en);if(r&&r.setHandle!=null)return new wf(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new wf(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return L1(t.doc.resolve(o))||(o=-1),new wf(o,n.dragging)}return n}};function O5(e,t,n,r){if(!e.editable)return;let o=en.getState(e.state);if(o&&!o.dragging){let i=L5(t.target),s=-1;if(i){let{left:l,right:a}=i.getBoundingClientRect();t.clientX-l<=n?s=UC(e,t,"left",n):a-t.clientX<=n&&(s=UC(e,t,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){let l=e.state.doc.resolve(s),a=l.node(-1),u=$e.get(a),c=l.start(-1);if(u.colCount(l.pos-c)+l.nodeAfter.attrs.colspan-1==u.width-1)return}sT(e,s)}}}function R5(e){if(!e.editable)return;let t=en.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&sT(e,-1)}function D5(e,t,n,r){var o;if(!e.editable)return!1;let i=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=en.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let l=e.state.doc.nodeAt(s.activeHandle),a=I5(e,s.activeHandle,l.attrs);e.dispatch(e.state.tr.setMeta(en,{setDragging:{startX:t.clientX,startWidth:a}}));function u(d){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",c);let f=en.getState(e.state);f?.dragging&&(P5(e,f.activeHandle,$C(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(en,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=en.getState(e.state);if(f&&f.dragging){let p=$C(f.dragging,d,n);HC(e,f.activeHandle,p,r)}}return HC(e,s.activeHandle,a,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",c),t.preventDefault(),!0}function I5(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let a=0;a{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){let i=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&i&&i[s]){let l=i[s].getAttribute("width");return l?[parseInt(l,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",te(this.options.HTMLAttributes,e),0]}}),W1=Q.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",te(this.options.HTMLAttributes,e),0]}}),j1=Q.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",te(this.options.HTMLAttributes,e),0]}});function q1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function aT(e,t,n,r,o,i){var s;let l=0,a=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function H5(e,t,n,r,o){let i=$5(e),s=[],l=[];for(let u=0;u{let{selection:t}=e.state;if(!q5(t))return!1;let n=0,r=Og(t.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},V5="";function W5(e){return(e||"").replace(/\s+/g," ").trim()}function j5(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:V5;if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(b=>{let g="";b.content&&Array.isArray(b.content)&&b.content.length>1?g=b.content.map(k=>t.renderChildren(k)).join(o):g=b.content?t.renderChildren(b.content):"";let y=W5(g),x=b.type==="tableHeader";m.push({text:y,isHeader:x})}),i.push(m)});let s=i.reduce((h,m)=>Math.max(h,m.length),0);if(s===0)return"";let l=new Array(s).fill(0);i.forEach(h=>{var m;for(let b=0;bl[b]&&(l[b]=y),l[b]<3&&(l[b]=3)}});let a=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=i[0],c=u.some(h=>h.isHeader),d=` -`,f=new Array(s).fill(0).map((h,m)=>c&&u[m]&&u[m].text||"");return d+=`| ${f.map((h,m)=>a(h,l[m])).join(" | ")} | +`),[i,s]=IP(o);if(i.length===0)return;let l=fC(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(PP,this.editor.getAttributes(iC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Xn({find:sC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Xn({find:sC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(iC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),BP=/^\s*(\[([( |x])?\])\s$/,hf=Q.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",te(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return wa(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),u=c=>{var d,f;l.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,l.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:a,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,l.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[Xn({find:BP,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),mf=Q.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",te(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=i=>{let s=Td(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Td(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),yW=ne.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(k1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(E1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(_1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(S1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(hf.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(mf.configure(this.options.taskList)),e}});var pC=Q.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",te(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var FP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,zP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,hC=Ge.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",te(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Zn({find:FP,type:this.type})]},addPasteRules(){return[yn({find:zP,type:this.type})]}});var mC=Q.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var gC=Ge.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",te(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function bC(e={}){return new V({view(t){return new C1(t,e)}})}var C1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),g=d?h.bottom:h.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*l;r={left:h.left,right:h.right,top:g-b,bottom:g+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!a||a==document.body&&getComputedStyle(a).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,p=d.height/a.offsetHeight;u=d.left-a.scrollLeft*f,c=d.top-a.scrollTop*p}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-c)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=qc(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var St=class e extends W{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):W.near(r)}content(){return P.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new A1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!UP(t)||!$P(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let l=t.node(s);if(n>0?t.indexAfter(s)0){i=l.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let a=t.doc.resolve(o);if(e.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!$.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}return null}}};St.prototype.visible=!1;St.findFrom=St.findGapCursorFrom;W.jsonID("gapcursor",St);var A1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return St.valid(n)?new St(n):W.near(n)}};function yC(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function UP(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||yC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function $P(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||yC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function xC(){return new V({props:{decorations:WP,createSelectionBetween(e,t,n){return t.pos==n.pos&&St.valid(n)?new St(n):null},handleClick:VP,handleKeyDown:HP,handleDOMEvents:{beforeinput:qP}}})}var HP=xa({ArrowLeft:gf("horiz",-1),ArrowRight:gf("horiz",1),ArrowUp:gf("vert",-1),ArrowDown:gf("vert",1)});function gf(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,l=t>0?s.$to:s.$from,a=s.empty;if(s instanceof H){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(t>0?l.after():l.before())}let u=St.findGapCursorFrom(l,t,a);return u?(o&&o(r.tr.setSelection(new St(u))),!0):!1}}function VP(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!St.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&$.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new St(r))),!0)}function qP(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof St))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=T.empty;for(let s=r.length-1;s>=0;s--)o=T.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new P(o,0,0));return i.setSelection(H.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function WP(e){if(!(e.selection instanceof St))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",xe.create(e.doc,[Oe.widget(e.selection.head,t,{key:"gapcursor"})])}var bf=200,ct=function(){};ct.prototype.append=function(t){return t.length?(t=ct.from(t),!this.length&&t||t.length=n?ct.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};ct.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};ct.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};ct.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};ct.from=function(t){return t instanceof ct?t:t&&t.length?new vC(t):ct.empty};var vC=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=bf)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=bf)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(ct);ct.empty=new vC([]);var jP=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(ct),T1=ct;var KP=500,wi=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new tr(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new tr(h,void 0,void 0,u.length+c.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(t,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cYP&&(l=GP(l,u),s-=u),new e(l.append(i),s)}remapping(t,n){let r=new ia;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new tr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},o);let a=n;this.items.forEach(f=>{let p=i.getMirror(--a);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let g=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(a+1,p));b&&l++,r.push(new tr(h,g,b))}else r.push(new tr(h))},o);let u=[];for(let f=n;fKP&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=t)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new tr(u.invert(),a,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new e(T1.from(o.reverse()),i)}};wi.empty=new wi(T1.empty,0);function GP(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var tr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},nr=class{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},YP=20;function JP(e,t,n,r){let o=n.getMeta(Ei),i;if(o)return o.historyState;n.getMeta(QP)&&(e=new nr(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Ei))return s.getMeta(Ei).redo?new nr(e.done.addTransform(n,void 0,r,yf(t)),e.undone,kC(n.mapping.maps),e.prevTime,e.prevComposition):new nr(e.done,e.undone.addTransform(n,void 0,r,yf(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=e.prevTime==0||!s&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!ZP(n,e.prevRanges)),u=s?N1(e.prevRanges,n.mapping):kC(n.mapping.maps);return new nr(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,yf(t)),wi.empty,u,n.time,l??e.prevComposition)}else return(i=n.getMeta("rebased"))?new nr(e.done.rebased(n,i),e.undone.rebased(n,i),N1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new nr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),N1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function ZP(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function kC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,s)=>t.push(i,s));return t}function N1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=Ei.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=XP(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}var O1=xf(!1,!0),R1=xf(!0,!0),qW=xf(!1,!1),WW=xf(!0,!1);var ZW=ne.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new V({key:new J("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>o){let s=i-o,l=0,a=s,u=r.tr.deleteRange(l,a);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;let l=t.selection.$head.pos,a=i-r,u=l-a,c=l;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),SC=ne.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[bC(this.options)]}}),rj=ne.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new V({key:new J("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return xe.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((a,u)=>{if(a.isText)return;if(!(o>=u&&o<=u+a.nodeSize-1))return!1;s+=1});let l=0;return e.descendants((a,u)=>{if(a.isText||!(o>=u&&o<=u+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(Oe.node(u,u+a.nodeSize,{class:this.options.className}))}),xe.create(e,i)}}})]}}),CC=ne.create({name:"gapCursor",addProseMirrorPlugins(){return[xC()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=he(K(e,"allowGapCursor",n)))!=null?t:null}}}),D1=ne.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new V({key:new J("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let i=this.editor.isEmpty;return e.descendants((s,l)=>{let a=r>=l&&r<=l+s.nodeSize,u=!s.isLeaf&&ka(s);if((a||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];i&&c.push(this.options.emptyEditorClass);let d=Oe.node(l,l+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:a}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),xe.create(e,o)}}})]}}),fj=ne.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new V({key:new J("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||_d(n.selection)||e.view.dragging?null:xe.create(n.doc,[Oe.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function _C({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var AC=ne.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new J(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new V({key:t,appendTransaction:(o,i,s)=>{let{doc:l,tr:a,schema:u}=s,c=t.getState(s),d=l.content.size,f=u.nodes[n];if(c)return a.insert(d,f.create())},state:{init:(o,i)=>{let s=i.tr.doc.lastChild;return!_C({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;let s=o.doc.lastChild;return!_C({node:s,types:r})}}})]}}),TC=ne.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>O1(e,t),redo:()=>({state:e,dispatch:t})=>R1(e,t)}},addProseMirrorPlugins(){return[wC(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var e5=ne.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(RS.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(OS.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(k1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(DS.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(Gg.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(LS.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(SC.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(CC.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(PS.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(BS.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(TC.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(FS.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(zS.configure(this.options.italic)),this.options.listItem!==!1&&o.push(E1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(_1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(y1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(S1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(pC.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(hC.configure(this.options.strike)),this.options.text!==!1&&o.push(mC.configure(this.options.text)),this.options.underline!==!1&&o.push(gC.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(AC.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),NC=e5;var MC=D1;var OC=mf;var RC=hf;var L1,P1;if(typeof WeakMap<"u"){let e=new WeakMap;L1=t=>e.get(t),P1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;L1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var $e=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:m-x});break}let v=o+x*t;for(let k=0;kr&&(i+=u.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function r5(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function i5(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Pn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Sf(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=$s(t.$head)||s5(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function s5(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function B1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function l5(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function U1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function HC(e,t,n){let r=e.node(-1),o=$e.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return s==null?null:e.node(0).resolve(i+s)}function _i(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function VC(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-i);a.unshift(n.pos-i);let u=a.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=i+c+1;return new Ss(l.resolve(f),l.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(B1(r)&&B1(o)&&U1(r,o)){let i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?zr.rowSelection(r,o):i&&this.isColSelection()?zr.colSelection(r,o):new zr(r,o)}return H.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=$e.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let a=o.top;a0||b>0){let m=h.attrs;if(g>0&&(m=_i(m,0,g)),b>0&&(m=_i(m,m.colspan-b,b)),p.lefto.bottom){let m={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.top<=l.top?(s.top>0&&(t=a.resolve(i+o.map[s.left])),l.bottom0&&(n=a.resolve(i+o.map[l.left])),s.bottom0)return!1;let s=o+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(t){return t instanceof zr&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.left<=l.left?(s.left>0&&(t=a.resolve(i+o.map[s.top*o.width])),l.right0&&(n=a.resolve(i+o.map[l.top*o.width])),s.right{t.push(Oe.node(r,r+n.nodeSize,{class:"selectedCell"}))}),xe.create(e.doc,t)}function d5({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function f5({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){let i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function p5(e,t,n){let r=(t||e).selection,o=(t||e).doc,i,s;if(r instanceof $&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=me.create(o,r.from);else if(s=="row"){let l=o.resolve(r.from+1);i=me.rowSelection(l,l)}else if(!n){let l=$e.get(r.node),a=r.from+1,u=a+l.map[l.width*l.height-1];i=me.create(o,a+1,u)}}else r instanceof H&&d5(r)?i=H.create(o,r.from):r instanceof H&&f5(r)&&(i=H.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var h5=new J("fix-tables");function WC(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let s=0,l=0;s{o.type.spec.tableRole=="table"&&(n=m5(e,o,i,n))};return t?t.doc!=e.doc&&WC(t.doc,e.doc,0,r):e.doc.descendants(r),n}function m5(e,t,n,r){let o=$e.get(t);if(!o.problems)return r;r||(r=e.tr);let i=[];for(let a=0;a0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;a5(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let s=0;s0&&o0&&t.map[l-1]==a||o0?-1:0;b5(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=a+1+u.content.size,d=DC(u)?a+1:c;i.replaceWith(d+r.tableStart,c+r.tableStart,l)}i.setSelection(new me(i.doc.resolve(a+r.tableStart))),t(i)}return!0}function V1(e,t){let n=Ct(e.schema);return v5(({node:r})=>n[r.type.spec.tableRole])(e,t)}function v5(e){return(t,n)=>{let r=t.selection,o,i;if(r instanceof me){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=i5(r.$from),!o)return!1;i=(s=$s(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs,a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let c=rr(t),d=t.tr;for(let p=0;p{s.attrs[e]!==t&&i.setNodeMarkup(l,null,{...s.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function k5(e){return function(t,n){if(!Pn(t))return!1;if(n){let r=Ct(t.schema),o=rr(t),i=t.tr,s=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(a=>o.table.nodeAt(a));for(let a=0;a{let p=f+i.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),r(s)}return!0}}var Jj=Hs("row",{useDeprecatedLogic:!0}),Zj=Hs("column",{useDeprecatedLogic:!0}),tA=Hs("cell",{useDeprecatedLogic:!0});function E5(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let i=e.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function vf(e,t){let n=e.selection;if(!(n instanceof me))return!1;if(t){let r=e.tr,o=Ct(e.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new P(o,0,0))}),r.docChanged&&t(r)}return!0}function w5(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if(i=="row")for(let a=0;a=0;s--){let{rowspan:l,colspan:a}=i.child(s).attrs;for(let u=o;u=t.length&&t.push(T.empty),n[o]r&&(f=f.type.createChecked(_i(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),a.push(d)}i.push(T.from(a))}n=i,t=o}return{width:e,height:t,rows:n}}function C5(e,t,n,r,o,i,s){let l=e.doc.type.schema,a=Ct(l),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,g=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[g+h]).type==a.header_cell;d.push(b?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}let f=a.row.create(null,T.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let i=n.selection;if(i instanceof me)return wf(n,r,W.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;let s=rA(o,e,t);if(s==null)return!1;if(e=="horiz")return wf(n,r,W.near(n.doc.resolve(i.head+t),t));{let l=n.doc.resolve(s),a=HC(l,e,t),u;return a?u=W.near(a,1):t<0?u=W.near(n.doc.resolve(l.before(-1)),-1):u=W.near(n.doc.resolve(l.after(-1)),1),wf(n,r,u)}}}function Ef(e,t){return(n,r,o)=>{if(!o)return!1;let i=n.selection,s;if(i instanceof me)s=i;else{let a=rA(o,e,t);if(a==null)return!1;s=new me(n.doc.resolve(a))}let l=HC(s.$headCell,e,t);return l?wf(n,r,new me(s.$anchorCell,l)):!1}}function T5(e,t){let n=e.state.doc,r=$s(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new me(r))),!0):!1}function N5(e,t,n){if(!Pn(e.state))return!1;let r=w5(n),o=e.state.selection;if(o instanceof me){r||(r={width:1,height:1,rows:[T.from(F1(Ct(e.state.schema).cell,n))]});let i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=$e.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=S5(r,l.right-l.left,l.bottom-l.top),BC(e.state,e.dispatch,s,l,r),!0}else if(r){let i=Sf(e.state),s=i.start(-1);return BC(e.state,e.dispatch,s,$e.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function M5(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=FC(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof me)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=$s(e.state.selection.$anchor))!=null&&((n=I1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(a,u){let c=I1(e,u),d=Io.getState(e.state)==null;if(!c||!U1(a,c))if(d)c=a;else return;let f=new me(a,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Io,a.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",l),Io.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Io,-1))}function l(a){let u=a,c=Io.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(FC(e,u.target)!=r&&(d=I1(e,t),!d))return s();d&&i(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",l)}function rA(e,t,n){if(!(e.state.selection instanceof H))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){let s=r.before(o),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function FC(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function I1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return $s(e.state.doc.resolve(r))}var O5=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),z1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,z1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function z1(e,t,n,r,o,i){let s=0,l=!0,a=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new R5(-1,!1)},apply(s,l){return l.apply(s)}},props:{attributes:s=>{let l=en.getState(s);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,l)=>{D5(s,l,e,o)},mouseleave:s=>{I5(s)},mousedown:(s,l)=>{L5(s,l,t,n)}},decorations:s=>{let l=en.getState(s);if(l&&l.activeHandle>-1)return U5(s,l.activeHandle)},nodeViews:{}}});return i}var R5=class _f{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(en);if(r&&r.setHandle!=null)return new _f(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new _f(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return B1(t.doc.resolve(o))||(o=-1),new _f(o,n.dragging)}return n}};function D5(e,t,n,r){if(!e.editable)return;let o=en.getState(e.state);if(o&&!o.dragging){let i=B5(t.target),s=-1;if(i){let{left:l,right:a}=i.getBoundingClientRect();t.clientX-l<=n?s=zC(e,t,"left",n):a-t.clientX<=n&&(s=zC(e,t,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){let l=e.state.doc.resolve(s),a=l.node(-1),u=$e.get(a),c=l.start(-1);if(u.colCount(l.pos-c)+l.nodeAfter.attrs.colspan-1==u.width-1)return}iA(e,s)}}}function I5(e){if(!e.editable)return;let t=en.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&iA(e,-1)}function L5(e,t,n,r){var o;if(!e.editable)return!1;let i=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=en.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let l=e.state.doc.nodeAt(s.activeHandle),a=P5(e,s.activeHandle,l.attrs);e.dispatch(e.state.tr.setMeta(en,{setDragging:{startX:t.clientX,startWidth:a}}));function u(d){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",c);let f=en.getState(e.state);f?.dragging&&(F5(e,f.activeHandle,UC(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(en,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=en.getState(e.state);if(f&&f.dragging){let p=UC(f.dragging,d,n);$C(e,f.activeHandle,p,r)}}return $C(e,s.activeHandle,a,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",c),t.preventDefault(),!0}function P5(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let a=0;a{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){let i=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&i&&i[s]){let l=i[s].getAttribute("width");return l?[parseInt(l,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",te(this.options.HTMLAttributes,e),0]}}),K1=Q.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",te(this.options.HTMLAttributes,e),0]}}),G1=Q.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",te(this.options.HTMLAttributes,e),0]}});function W1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function lA(e,t,n,r,o,i){var s;let l=0,a=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function q5(e,t,n,r,o){let i=V5(e),s=[],l=[];for(let u=0;u{let{selection:t}=e.state;if(!W5(t))return!1;let n=0,r=Rg(t.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},j5="";function K5(e){return(e||"").replace(/\s+/g," ").trim()}function G5(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:j5;if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(h=>{let g=[];h.content&&h.content.forEach(b=>{let m="";b.content&&Array.isArray(b.content)&&b.content.length>1?m=b.content.map(k=>t.renderChildren(k)).join(o):m=b.content?t.renderChildren(b.content):"";let y=K5(m),x=b.type==="tableHeader";g.push({text:y,isHeader:x})}),i.push(g)});let s=i.reduce((h,g)=>Math.max(h,g.length),0);if(s===0)return"";let l=new Array(s).fill(0);i.forEach(h=>{var g;for(let b=0;bl[b]&&(l[b]=y),l[b]<3&&(l[b]=3)}});let a=(h,g)=>h+" ".repeat(Math.max(0,g-h.length)),u=i[0],c=u.some(h=>h.isHeader),d=` +`,f=new Array(s).fill(0).map((h,g)=>c&&u[g]&&u[g].text||"");return d+=`| ${f.map((h,g)=>a(h,l[g])).join(" | ")} | `,d+=`| ${l.map(h=>"-".repeat(Math.max(3,h))).join(" | ")} | -`,(c?i.slice(1):i).forEach(h=>{d+=`| ${new Array(s).fill(0).map((m,b)=>a(h[b]&&h[b].text||"",l[b])).join(" | ")} | -`}),d}var K5=j5,K1=Q.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:z5,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=U5(e,this.options.cellMinWidth),i=t.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",te(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(i.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>K5(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=H5(i.schema,e,t,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(H.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>GC(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>JC(e,t),deleteColumn:()=>({state:e,dispatch:t})=>YC(e,t),addRowBefore:()=>({state:e,dispatch:t})=>XC(e,t),addRowAfter:()=>({state:e,dispatch:t})=>QC(e,t),deleteRow:()=>({state:e,dispatch:t})=>eT(e,t),deleteTable:()=>({state:e,dispatch:t})=>rT(e,t),mergeCells:()=>({state:e,dispatch:t})=>U1(e,t),splitCell:()=>({state:e,dispatch:t})=>$1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Hs("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Hs("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>nT(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>U1(e,t)?!0:$1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>tT(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>H1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>H1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&z1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=me.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Sf,"Mod-Backspace":Sf,Delete:Sf,"Mod-Delete":Sf}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[iT({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],lT({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(K(e,"tableRole",t))}}}),cK=ne.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(K1.configure(this.options.table)),this.options.tableCell!==!1&&e.push(V1.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(W1.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(j1.configure(this.options.tableRow)),e}});var MT=j(NT(),1);var Mf=MT.default;function DT(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?DT(n.children,r):{text:n.value,classes:r}})}function OT(e){return e.value||e.children||[]}function BB(e){return!!Mf.getLanguage(e)}function RT({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return vd(e,i=>i.type.name===t).forEach(i=>{var s;let l=i.pos+1,a=i.node.attrs.language||r,u=n.listLanguages(),c=a&&(u.includes(a)||BB(a)||(s=n.registered)!=null&&s.call(n,a))?OT(n.highlight(a,i.node.textContent)):OT(n.highlightAuto(i.node.textContent));DT(c).forEach(d=>{let f=l+d.text.length;if(d.classes.length){let p=Oe.inline(l,f,{class:d.classes.join(" ")});o.push(p)}l=f})}),xe.create(e,o)}function FB(e){return typeof e=="function"}function zB({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>FB(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new q({key:new Y("lowlight"),state:{init:(o,{doc:i})=>RT({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(o,i,s,l)=>{let a=s.selection.$head.parent.type.name,u=l.selection.$head.parent.type.name,c=vd(s.doc,f=>f.type.name===e),d=vd(l.doc,f=>f.type.name===e);return o.docChanged&&([a,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?RT({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var UB=LS.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],zB({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),IT=UB;function $B(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function LT(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=$B(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function PT(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(l);let a={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],v=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...y,...x,"set","shopt",...v,...k]},contains:[p,e.SHEBANG(),h,d,i,s,g,l,a,u,c,n]}}function BT(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function FT(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function zT(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:o.concat(i),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},x=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",v={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+x+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[g,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},v]}}var HB=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qB=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],VB=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],WB=[...qB,...VB],jB=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),KB=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),GB=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),JB=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function UT(e){let t=e.regex,n=HB(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+KB.join("|")+")"},{begin:":(:)?("+GB.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+JB.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:jB.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+WB.join("|")+")\\b"}]}}function $T(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function HT(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"jT(e,t,n-1))}function KT(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+jT("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,WT,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},WT,u]}}var GT="[A-Za-z$_][0-9A-Za-z$_]*",YB=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],ZB=["true","false","null","undefined","NaN","Infinity"],JT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],YT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ZT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],XB=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],QB=[].concat(ZT,JT,YT);function XT(e){let t=e.regex,n=(L,{after:J})=>{let oe="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,J)=>{let oe=L[0].length+L.index,fe=L.input[oe];if(fe==="<"||fe===","){J.ignoreMatch();return}fe===">"&&(n(L,{after:oe})||J.ignoreMatch());let ge,pt=L.input.substring(oe);if(ge=pt.match(/^\s*=/)){J.ignoreMatch();return}if((ge=pt.match(/^\s+extends\s+/))&&ge.index===0){J.ignoreMatch();return}}},l={$pattern:GT,keyword:YB,literal:ZB,built_in:QB,"variable.language":XB},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...JT,...YT]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(L){return t.concat("(?!",L.join("|"),")")}let X={match:t.concat(/\b/,N([...ZT,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},X,F,w,I,{match:/\$[(.]/}]}}function QT(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var js="[0-9](_*[0-9])*",Df=`\\.(${js})`,If="[0-9a-fA-F](_*[0-9a-fA-F])*",e9={className:"number",variants:[{begin:`(\\b(${js})((${Df})|\\.)?|(${Df}))[eE][+-]?(${js})[fFdD]?\\b`},{begin:`\\b(${js})((${Df})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Df})[fFdD]?\\b`},{begin:`\\b(${js})[fFdD]\\b`},{begin:`\\b0[xX]((${If})\\.?|(${If})?\\.(${If}))[pP][+-]?(${js})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${If})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function eA(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,o]}]};o.contains.push(s);let l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},u=e9,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,l,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,l,a,s,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,a]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},u]}}var t9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),n9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],o9=[...n9,...r9],i9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),tA=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),nA=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),l9=tA.concat(nA).sort().reverse();function rA(e){let t=t9(e),n=l9,r="and or not only",o="[\\w-]+",i="("+o+"|@\\{"+o+"\\})",s=[],l=[],a=function(x){return{className:"string",begin:"~?"+x+".*?"+x}},u=function(x,v,k){return{className:x,begin:v,relevance:k}},c={$pattern:/[a-z-]+/,keyword:r,attribute:i9.join(" ")},d={begin:"\\(",end:"\\)",contains:l,keywords:c,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=l.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:l,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+o9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+tA.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+nA.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,y,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function oA(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function iA(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,a={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,a];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,i,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,a,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function lA(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},a={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+a.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:a,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function aA(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},s={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},a={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,i,a],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let y=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,s.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function uA(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(z,I)=>{I.data._beginMatch=z[1]||z[2]},"on:end":(z,I)=>{I.data._beginMatch!==z[1]&&I.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ -]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:g,literal:(z=>{let I=[];return z.forEach(S=>{I.push(S),S.toLowerCase()===S?I.push(S.toUpperCase()):I.push(S.toLowerCase())}),I})(b),built_in:y},k=z=>z.map(I=>I.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},T={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[T,s,_,e.C_BLOCK_COMMENT_MODE,h,m,E]},F={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(g).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(F);let N=[T,_,e.C_BLOCK_COMMENT_MODE,h,m,E],X={begin:t.concat(/#\[\s*\\?/,t.either(o,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...N]},...N,{scope:"meta",variants:[{match:o},{match:i}]}]};return{case_insensitive:!1,keywords:v,contains:[X,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},s,F,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:v,contains:["self",X,s,_,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function cA(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function dA(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function fA(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},a={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",a,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,a],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[a,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function pA(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function hA(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function mA(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,u),relevance:0}].concat(a,u);c.contains=E,m.contains=E;let C=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return u.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(u).concat(E)}}function gA(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:l,literal:a,built_in:u},illegal:""},i]}}var a9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),u9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],c9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],d9=[...u9,...c9],f9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),p9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),h9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),m9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function bA(e){let t=a9(e),n=h9,r=p9,o="@[a-z-]+",i="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+d9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+m9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:f9.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function yA(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function xA(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...a].filter(k=>!c.includes(k)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k){return t.concat(/\b/,t.either(...k.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}let x={scope:"keyword",match:y(f),relevance:0};function v(k,{exceptions:E,when:w}={}){let _=w;return E=E||[],k.map(T=>T.match(/\|\d+$/)||E.includes(T)?T:_(T)?`${T}|0`:T)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(h,{when:k=>k.length<3}),literal:i,type:l,built_in:d},contains:[{scope:"type",match:y(s)},x,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function wA(e){return e?typeof e=="string"?e:e.source:null}function Ua(e){return we("(?=",e,")")}function we(...e){return e.map(n=>wA(n)).join("")}function g9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Lt(...e){return"("+(g9(e).capture?"":"?:")+e.map(r=>wA(r)).join("|")+")"}var ob=e=>we(/\b/,e,/\w$/.test(e)?/\b/:/\B/),b9=["Protocol","Type"].map(ob),vA=["init","self"].map(ob),y9=["Any","Self"],nb=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],kA=["false","nil","true"],x9=["assignment","associativity","higherThan","left","lowerThan","none","right"],v9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],EA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],_A=Lt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),SA=Lt(_A,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),rb=we(_A,SA,"*"),CA=Lt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Pf=Lt(CA,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),or=we(CA,Pf,"*"),Lf=we(/[A-Z]/,Pf,"*"),k9=["attached","autoclosure",we(/convention\(/,Lt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",we(/objc\(/,or,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],E9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function TA(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,Lt(...b9,...vA)],className:{2:"keyword"}},i={match:we(/\./,Lt(...nb)),relevance:0},s=nb.filter(Ee=>typeof Ee=="string").concat(["_|0"]),l=nb.filter(Ee=>typeof Ee!="string").concat(y9).map(ob),a={variants:[{className:"keyword",match:Lt(...l,...vA)}]},u={$pattern:Lt(/\b\w+/,/#\w+/),keyword:s.concat(v9),literal:kA},c=[o,i,a],d={match:we(/\./,Lt(...EA)),relevance:0},f={className:"built_in",match:we(/\b/,Lt(...EA),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:rb},{match:`\\.(\\.|${SA})+`}]},b=[h,m],g="([0-9]_*)+",y="([0-9a-fA-F]_*)+",x={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},v=(Ee="")=>({className:"subst",variants:[{match:we(/\\/,Ee,/[0\\tnr"']/)},{match:we(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Ee="")=>({className:"subst",match:we(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(Ee="")=>({className:"subst",label:"interpol",begin:we(/\\/,Ee,/\(/),end:/\)/}),w=(Ee="")=>({begin:we(Ee,/"""/),end:we(/"""/,Ee),contains:[v(Ee),k(Ee),E(Ee)]}),_=(Ee="")=>({begin:we(Ee,/"/),end:we(/"/,Ee),contains:[v(Ee),E(Ee)]}),T={className:"string",variants:[w(),w("#"),w("##"),w("###"),_(),_("#"),_("##"),_("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],F={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},N=Ee=>{let Jr=we(Ee,/\//),ee=we(/\//,Ee);return{begin:Jr,end:ee,contains:[...C,{scope:"comment",begin:`#(?!.*${ee})`,end:/$/}]}},X={scope:"regexp",variants:[N("###"),N("##"),N("#"),F]},z={match:we(/`/,or,/`/)},I={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${Pf}+`},M=[z,I,S],L={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:E9,contains:[...b,x,T]}]}},J={scope:"keyword",match:we(/@/,Lt(...k9),Ua(Lt(/\(/,/\s+/)))},oe={scope:"meta",match:we(/@/,or)},fe=[L,J,oe],ge={match:Ua(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:we(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Pf,"+")},{className:"type",match:Lf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:we(/\s+&\s+/,Ua(Lf)),relevance:0}]},pt={begin://,keywords:u,contains:[...r,...c,...fe,h,ge]};ge.contains.push(pt);let Pe={match:we(or,/\s*:/),keywords:"_|0",relevance:0},ht={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Pe,...r,X,...c,...p,...b,x,T,...M,...fe,ge]},Gr={begin://,keywords:"repeat each",contains:[...r,ge]},su={begin:Lt(Ua(we(or,/\s*:/)),Ua(we(or,/\s+/,or,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:or}]},ol={begin:/\(/,end:/\)/,keywords:u,contains:[su,...r,...c,...b,x,T,...fe,ge,ht],endsParent:!0,illegal:/["']/},Lp={match:[/(func|macro)/,/\s+/,Lt(z.match,or,rb)],className:{1:"keyword",3:"title.function"},contains:[Gr,ol,t],illegal:[/\[/,/%/]},Pp={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Gr,ol,t],illegal:/\[|%/},Bp={match:[/operator/,/\s+/,rb],className:{1:"keyword",3:"title"}},Fp={begin:[/precedencegroup/,/\s+/,Lf],className:{1:"keyword",3:"title"},contains:[ge],keywords:[...x9,...kA],end:/}/},Ui={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},lu={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,or,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Gr,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Lf},...c],relevance:0}]};for(let Ee of T.variants){let Jr=Ee.contains.find(au=>au.label==="interpol");Jr.keywords=u;let ee=[...c,...p,...b,x,T,...M];Jr.contains=[...ee,{begin:/\(/,end:/\)/,contains:["self",...ee]}]}return{name:"Swift",keywords:u,contains:[...r,Lp,Pp,Ui,lu,rn,Bp,Fp,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},X,...c,...p,...b,x,T,...M,...fe,ge,ht]}}var Bf="[A-Za-z$_][0-9A-Za-z$_]*",AA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],NA=["true","false","null","undefined","NaN","Infinity"],MA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],OA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],RA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],DA=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],IA=[].concat(RA,MA,OA);function w9(e){let t=e.regex,n=(L,{after:J})=>{let oe="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,J)=>{let oe=L[0].length+L.index,fe=L.input[oe];if(fe==="<"||fe===","){J.ignoreMatch();return}fe===">"&&(n(L,{after:oe})||J.ignoreMatch());let ge,pt=L.input.substring(oe);if(ge=pt.match(/^\s*=/)){J.ignoreMatch();return}if((ge=pt.match(/^\s+extends\s+/))&&ge.index===0){J.ignoreMatch();return}}},l={$pattern:Bf,keyword:AA,literal:NA,built_in:IA,"variable.language":DA},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...MA,...OA]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(L){return t.concat("(?!",L.join("|"),")")}let X={match:t.concat(/\b/,N([...RA,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},X,F,w,I,{match:/\$[(.]/}]}}function LA(e){let t=e.regex,n=w9(e),r=Bf,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Bf,keyword:AA.concat(a),literal:NA,built_in:IA.concat(o),"variable.language":DA},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let y=m.contains.findIndex(x=>x.label===b);if(y===-1)throw new Error("can not find mode to replace");m.contains.splice(y,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,i,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",l);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function PA(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,a={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,o),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(i,o),/ +/,t.either(s,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,a,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function BA(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},a={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,s,o,e.QUOTE_STRING_MODE,a,u,l]}}function FA(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,a,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,a,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function zA(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},l=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,i,s],g=[...b];return g.pop(),g.push(l),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var $a={arduino:LT,bash:PT,c:BT,cpp:FT,csharp:zT,css:UT,diff:$T,go:HT,graphql:qT,ini:VT,java:KT,javascript:XT,json:QT,kotlin:eA,less:rA,lua:oA,makefile:iA,markdown:sA,objectivec:lA,perl:aA,php:uA,"php-template":cA,plaintext:dA,python:fA,"python-repl":pA,r:hA,ruby:mA,rust:gA,scss:bA,shell:yA,sql:xA,swift:TA,typescript:LA,vbnet:PA,wasm:BA,xml:FA,yaml:zA};var UA={},_9="hljs-";function Ha(e){let t=Mf.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:o,register:i,registerAlias:s,registered:l};function n(a,u,c){let d=c||UA,f=typeof d.prefix=="string"?d.prefix:_9;if(!t.getLanguage(a))throw new Error("Unknown language: `"+a+"` is not registered");t.configure({__emitter:ib,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:a});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(a,u){let d=(u||UA).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function i(a,u){if(typeof a=="string")t.registerLanguage(a,u);else{let c;for(c in a)Object.hasOwn(a,c)&&t.registerLanguage(c,a[c])}}function s(a,u){if(typeof a=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:a});else{let c;for(c in a)if(Object.hasOwn(a,c)){let d=a[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function l(a){return!!t.getLanguage(a)}}var ib=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(s,l){return l?s+"_".repeat(l):n.options.classPrefix+s}),o=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var hb={};il(hb,{arrayReplaceAt:()=>pb,assign:()=>Js,escapeHtml:()=>$r,escapeRE:()=>lF,fromCodePoint:()=>Wa,has:()=>Y9,isMdAsciiPunct:()=>Ni,isPunctChar:()=>Ai,isSpace:()=>ue,isString:()=>Jf,isValidEntityCode:()=>Yf,isWhiteSpace:()=>Ti,lib:()=>aF,normalizeReference:()=>Mi,unescapeAll:()=>Ur,unescapeMd:()=>tF});var Hf={};il(Hf,{decode:()=>qa,encode:()=>Uf,format:()=>Ks,parse:()=>Va});var $A={};function S9(e){let t=$A[e];if(t)return t;t=$A[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),i+=6;continue}}if((l&248)===240&&i+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="\uFFFD"}return o})}Ff.defaultChars=";/?:@&=+$,#";Ff.componentChars="";var qa=Ff;var HA={};function C9(e){let t=HA[e];if(t)return t;t=HA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=C9(t),o="";for(let i=0,s=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}zf.defaultChars=";/?:@&=+$,-_.!~*'()#";zf.componentChars="-_.!~*'()";var Uf=zf;function Ks(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function $f(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var T9=/^([a-z0-9.+-]+:)/i,A9=/:[0-9]*$/,N9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,M9=["<",">",'"',"`"," ","\r",` -`," "],O9=["{","}","|","\\","^","`"].concat(M9),R9=["'"].concat(O9),qA=["%","/","?",";","#"].concat(R9),VA=["/","?","#"],D9=255,WA=/^[+a-z0-9A-Z_-]{0,63}$/,I9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,jA={javascript:!0,"javascript:":!0},KA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function L9(e,t){if(e&&e instanceof $f)return e;let n=new $f;return n.parse(e,t),n}$f.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=N9.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=T9.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&jA[s])&&(i=i.substr(2),this.slashes=!0)),!jA[s]&&(o||s&&!KA[s])){let u=-1;for(let h=0;h127?y+="x":y+=g[x];if(!y.match(WA)){let x=h.slice(0,m),v=h.slice(m+1),k=g.match(I9);k&&(x.push(k[1]),v.unshift(k[2])),v.length&&(i=v.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>D9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));let a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),KA[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};$f.prototype.parseHost=function(e){let t=A9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Va=L9;var sb={};il(sb,{Any:()=>qf,Cc:()=>Vf,Cf:()=>GA,P:()=>Gs,S:()=>Wf,Z:()=>jf});var qf=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Vf=/[\0-\x1F\x7F-\x9F]/;var GA=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Gs=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Wf=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var jf=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var JA=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var YA=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var lb,P9=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]]),ab=(lb=String.fromCodePoint)!==null&&lb!==void 0?lb:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function ub(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=P9.get(e))!==null&&t!==void 0?t:e}var nt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(nt||(nt={}));var B9=32,Po;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Po||(Po={}));function cb(e){return e>=nt.ZERO&&e<=nt.NINE}function F9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_F||e>=nt.LOWER_A&&e<=nt.LOWER_F}function z9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_Z||e>=nt.LOWER_A&&e<=nt.LOWER_Z||cb(e)}function U9(e){return e===nt.EQUALS||z9(e)}var tt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(tt||(tt={}));var ir;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ir||(ir={}));var Kf=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ir.Strict}startEntity(t){this.decodeMode=t,this.state=tt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tt.EntityStart:return t.charCodeAt(n)===nt.NUM?(this.state=tt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tt.NamedEntity,this.stateNamedEntity(t,n));case tt.NumericStart:return this.stateNumericStart(t,n);case tt.NumericDecimal:return this.stateNumericDecimal(t,n);case tt.NumericHex:return this.stateNumericHex(t,n);case tt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|B9)===nt.LOWER_X?(this.state=tt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,i!==0){if(s===nt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ir.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&Po.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Po.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tt.NamedEntity:return this.result!==0&&(this.decodeMode!==ir.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tt.NumericDecimal:return this.emitNumericEntity(0,2);case tt.NumericHex:return this.emitNumericEntity(0,3);case tt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tt.EntityStart:return 0}}};function ZA(e){let t="",n=new Kf(e,r=>t+=ab(r));return function(o,i){let s=0,l=0;for(;(l=o.indexOf("&",l))>=0;){t+=o.slice(s,l),n.startEntity(i);let u=n.write(o,l+1);if(u<0){s=l+n.end();break}s=l+u,l=u===0?s+1:s}let a=t+o.slice(s);return t="",a}}function $9(e,t,n,r){let o=(t&Po.BRANCH_LENGTH)>>7,i=t&Po.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){let a=r-i;return a<0||a>=o?-1:e[n+a]-1}let s=n,l=s+o-1;for(;s<=l;){let a=s+l>>>1,u=e[a];if(ur)l=a-1;else return e[a+o]}return-1}var H9=ZA(JA),vJ=ZA(YA);function Bo(e,t=ir.Legacy){return H9(e,t)}function Gf(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function db(e,t){return function(r){let o,i=0,s="";for(;o=e.exec(r);)i!==o.index&&(s+=r.substring(i,o.index)),s+=t.get(o[0].charCodeAt(0)),i=o.index+1;return s+r.substring(i)}}var XA=db(/[&<>'"]/g,V9),QA=db(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e3=db(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var t3;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(t3||(t3={}));var n3;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(n3||(n3={}));function G9(e){return Object.prototype.toString.call(e)}function Jf(e){return G9(e)==="[object String]"}var J9=Object.prototype.hasOwnProperty;function Y9(e,t){return J9.call(e,t)}function Js(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function pb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Yf(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Wa(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var i3=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Z9=/&([a-z#][a-z0-9]{1,31});/gi,X9=new RegExp(i3.source+"|"+Z9.source,"gi"),Q9=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function eF(e,t){if(t.charCodeAt(0)===35&&Q9.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Yf(r)?Wa(r):e}let n=Bo(e);return n!==e?n:e}function tF(e){return e.indexOf("\\")<0?e:e.replace(i3,"$1")}function Ur(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(X9,function(t,n,r){return n||eF(t,r)})}var nF=/[&<>"]/,rF=/[&<>"]/g,oF={"&":"&","<":"<",">":">",'"':"""};function iF(e){return oF[e]}function $r(e){return nF.test(e)?e.replace(rF,iF):e}var sF=/[.?*+^$[\]\\(){}|-]/g;function lF(e){return e.replace(sF,"\\$&")}function ue(e){switch(e){case 9:case 32:return!0}return!1}function Ti(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ai(e){return Gs.test(e)||Wf.test(e)}function Ni(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Mi(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var aF={mdurl:Hf,ucmicro:sb};var yb={};il(yb,{parseLinkDestination:()=>gb,parseLinkLabel:()=>mb,parseLinkTitle:()=>bb});function mb(e,t,n){let r,o,i,s,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=Ur(e.slice(t,o)),i.pos=o,i.ok=!0),i}function bb(e,t,n,r){let o,i=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return s;t++,i++,l===40&&(l=41),s.marker=l}for(;i"+$r(i.content)+""};sr.code_block=function(e,t,n,r,o){let i=e[t];return""+$r(e[t].content)+` +`,(c?i.slice(1):i).forEach(h=>{d+=`| ${new Array(s).fill(0).map((g,b)=>a(h[b]&&h[b].text||"",l[b])).join(" | ")} | +`}),d}var Y5=G5,Y1=Q.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:$5,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=H5(e,this.options.cellMinWidth),i=t.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",te(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(i.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>Y5(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=q5(i.schema,e,t,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(H.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>KC(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>GC(e,t),deleteColumn:()=>({state:e,dispatch:t})=>YC(e,t),addRowBefore:()=>({state:e,dispatch:t})=>ZC(e,t),addRowAfter:()=>({state:e,dispatch:t})=>XC(e,t),deleteRow:()=>({state:e,dispatch:t})=>QC(e,t),deleteTable:()=>({state:e,dispatch:t})=>nA(e,t),mergeCells:()=>({state:e,dispatch:t})=>H1(e,t),splitCell:()=>({state:e,dispatch:t})=>V1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Hs("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Hs("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>tA(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>H1(e,t)?!0:V1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>eA(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>q1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>q1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&$1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=me.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Cf,"Mod-Backspace":Cf,Delete:Cf,"Mod-Delete":Cf}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[oA({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],sA({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(K(e,"tableRole",t))}}}),fK=ne.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(Y1.configure(this.options.table)),this.options.tableCell!==!1&&e.push(j1.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(K1.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(G1.configure(this.options.tableRow)),e}});var NA=j(TA(),1);var Of=NA.default;function RA(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?RA(n.children,r):{text:n.value,classes:r}})}function MA(e){return e.value||e.children||[]}function zB(e){return!!Of.getLanguage(e)}function OA({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return vd(e,i=>i.type.name===t).forEach(i=>{var s;let l=i.pos+1,a=i.node.attrs.language||r,u=n.listLanguages(),c=a&&(u.includes(a)||zB(a)||(s=n.registered)!=null&&s.call(n,a))?MA(n.highlight(a,i.node.textContent)):MA(n.highlightAuto(i.node.textContent));RA(c).forEach(d=>{let f=l+d.text.length;if(d.classes.length){let p=Oe.inline(l,f,{class:d.classes.join(" ")});o.push(p)}l=f})}),xe.create(e,o)}function UB(e){return typeof e=="function"}function $B({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>UB(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new V({key:new J("lowlight"),state:{init:(o,{doc:i})=>OA({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(o,i,s,l)=>{let a=s.selection.$head.parent.type.name,u=l.selection.$head.parent.type.name,c=vd(s.doc,f=>f.type.name===e),d=vd(l.doc,f=>f.type.name===e);return o.docChanged&&([a,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?OA({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var HB=IS.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],$B({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),DA=HB;function VB(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],m=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:g,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function IA(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=VB(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function LA(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(l);let a={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},g=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],m={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],v=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:g,literal:b,built_in:[...y,...x,"set","shopt",...v,...k]},contains:[p,e.SHEBANG(),h,d,i,s,m,l,a,u,c,n]}}function PA(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},m=[d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:m.concat([{begin:/\(/,end:/\)/,keywords:b,contains:m.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function BA(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],m=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:g,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function FA(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:o.concat(i),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},g={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(g,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[g,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[u,g,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},x=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",v={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},m,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+x+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},v]}}var qB=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),WB=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],jB=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],KB=[...WB,...jB],GB=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),YB=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),JB=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ZB=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function zA(e){let t=e.regex,n=qB(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+YB.join("|")+")"},{begin:":(:)?("+JB.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ZB.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:GB.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+KB.join("|")+")\\b"}]}}function UA(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function $A(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"WA(e,t,n-1))}function jA(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+WA("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,qA,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},qA,u]}}var KA="[A-Za-z$_][0-9A-Za-z$_]*",XB=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],QB=["true","false","null","undefined","NaN","Infinity"],GA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],YA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],JA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],e9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],t9=[].concat(JA,GA,YA);function ZA(e){let t=e.regex,n=(L,{after:Y})=>{let oe="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,Y)=>{let oe=L[0].length+L.index,fe=L.input[oe];if(fe==="<"||fe===","){Y.ignoreMatch();return}fe===">"&&(n(L,{after:oe})||Y.ignoreMatch());let ge,pt=L.input.substring(oe);if(ge=pt.match(/^\s*=/)){Y.ignoreMatch();return}if((ge=pt.match(/^\s+extends\s+/))&&ge.index===0){Y.ignoreMatch();return}}},l={$pattern:KA,keyword:XB,literal:QB,built_in:t9,"variable.language":e9},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...GA,...YA]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(L){return t.concat("(?!",L.join("|"),")")}let X={match:t.concat(/\b/,N([...JA,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},X,F,w,I,{match:/\$[(.]/}]}}function XA(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var js="[0-9](_*[0-9])*",If=`\\.(${js})`,Lf="[0-9a-fA-F](_*[0-9a-fA-F])*",n9={className:"number",variants:[{begin:`(\\b(${js})((${If})|\\.)?|(${If}))[eE][+-]?(${js})[fFdD]?\\b`},{begin:`\\b(${js})((${If})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${If})[fFdD]?\\b`},{begin:`\\b(${js})[fFdD]\\b`},{begin:`\\b0[xX]((${Lf})\\.?|(${Lf})?\\.(${Lf}))[pP][+-]?(${js})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Lf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function QA(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,o]}]};o.contains.push(s);let l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},u=n9,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,l,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,l,a,s,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,a]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},u]}}var r9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),o9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],s9=[...o9,...i9],l9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),eT=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),tT=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u9=eT.concat(tT).sort().reverse();function nT(e){let t=r9(e),n=u9,r="and or not only",o="[\\w-]+",i="("+o+"|@\\{"+o+"\\})",s=[],l=[],a=function(x){return{className:"string",begin:"~?"+x+".*?"+x}},u=function(x,v,k){return{className:x,begin:v,relevance:k}},c={$pattern:/[a-z-]+/,keyword:r,attribute:l9.join(" ")},d={begin:"\\(",end:"\\)",contains:l,keywords:c,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=l.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:l,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},m={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+s9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+eT.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+tT.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[m]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,b,y,h,m,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function rT(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function oT(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,a={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,a];return[u,c,d,f].forEach(m=>{m.contains=m.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,i,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,a,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function sT(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},a={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+a.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:a,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function lT(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},s={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},a={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,i,a],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(g,b,m="\\1")=>{let y=m==="\\1"?m:t.concat(m,b);return t.concat(t.concat("(?:",g,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,m,r)},p=(g,b,m)=>t.concat(t.concat("(?:",g,")"),b,/(?:\\.|[^\\\/])*?/,m,r),h=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,s.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function aT(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(z,I)=>{I.data._beginMatch=z[1]||z[2]},"on:end":(z,I)=>{I.data._beginMatch!==z[1]&&I.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ +]`,h={scope:"string",variants:[c,u,d,f]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],m=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:m,literal:(z=>{let I=[];return z.forEach(S=>{I.push(S),S.toLowerCase()===S?I.push(S.toUpperCase()):I.push(S.toLowerCase())}),I})(b),built_in:y},k=z=>z.map(I=>I.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},A={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[A,s,_,e.C_BLOCK_COMMENT_MODE,h,g,E]},F={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(m).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(F);let N=[A,_,e.C_BLOCK_COMMENT_MODE,h,g,E],X={begin:t.concat(/#\[\s*\\?/,t.either(o,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...N]},...N,{scope:"meta",variants:[{match:o},{match:i}]}]};return{case_insensitive:!1,keywords:v,contains:[X,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},s,F,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:v,contains:["self",X,s,_,e.C_BLOCK_COMMENT_MODE,h,g]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,g]}}function uT(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function cT(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function dT(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},a={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",a,g,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,g,a],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[a,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,d]}]}}function fT(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function pT(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function hT(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,u),relevance:0}].concat(a,u);c.contains=E,g.contains=E;let C=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return u.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(u).concat(E)}}function mT(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:l,literal:a,built_in:u},illegal:""},i]}}var c9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),d9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],f9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],p9=[...d9,...f9],h9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),m9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),g9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),b9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function gT(e){let t=c9(e),n=g9,r=m9,o="@[a-z-]+",i="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+p9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+b9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:h9.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function bT(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function yT(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...a].filter(k=>!c.includes(k)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},m={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k){return t.concat(/\b/,t.either(...k.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}let x={scope:"keyword",match:y(f),relevance:0};function v(k,{exceptions:E,when:w}={}){let _=w;return E=E||[],k.map(A=>A.match(/\|\d+$/)||E.includes(A)?A:_(A)?`${A}|0`:A)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(h,{when:k=>k.length<3}),literal:i,type:l,built_in:d},contains:[{scope:"type",match:y(s)},x,m,g,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function ET(e){return e?typeof e=="string"?e:e.source:null}function Ua(e){return we("(?=",e,")")}function we(...e){return e.map(n=>ET(n)).join("")}function y9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Lt(...e){return"("+(y9(e).capture?"":"?:")+e.map(r=>ET(r)).join("|")+")"}var sb=e=>we(/\b/,e,/\w$/.test(e)?/\b/:/\B/),x9=["Protocol","Type"].map(sb),xT=["init","self"].map(sb),v9=["Any","Self"],ob=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],vT=["false","nil","true"],k9=["assignment","associativity","higherThan","left","lowerThan","none","right"],E9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],kT=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],wT=Lt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),_T=Lt(wT,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ib=we(wT,_T,"*"),ST=Lt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Bf=Lt(ST,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),or=we(ST,Bf,"*"),Pf=we(/[A-Z]/,Bf,"*"),w9=["attached","autoclosure",we(/convention\(/,Lt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",we(/objc\(/,or,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],_9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function CT(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,Lt(...x9,...xT)],className:{2:"keyword"}},i={match:we(/\./,Lt(...ob)),relevance:0},s=ob.filter(Ee=>typeof Ee=="string").concat(["_|0"]),l=ob.filter(Ee=>typeof Ee!="string").concat(v9).map(sb),a={variants:[{className:"keyword",match:Lt(...l,...xT)}]},u={$pattern:Lt(/\b\w+/,/#\w+/),keyword:s.concat(E9),literal:vT},c=[o,i,a],d={match:we(/\./,Lt(...kT)),relevance:0},f={className:"built_in",match:we(/\b/,Lt(...kT),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},g={className:"operator",relevance:0,variants:[{match:ib},{match:`\\.(\\.|${_T})+`}]},b=[h,g],m="([0-9]_*)+",y="([0-9a-fA-F]_*)+",x={className:"number",relevance:0,variants:[{match:`\\b(${m})(\\.(${m}))?([eE][+-]?(${m}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${m}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},v=(Ee="")=>({className:"subst",variants:[{match:we(/\\/,Ee,/[0\\tnr"']/)},{match:we(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Ee="")=>({className:"subst",match:we(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(Ee="")=>({className:"subst",label:"interpol",begin:we(/\\/,Ee,/\(/),end:/\)/}),w=(Ee="")=>({begin:we(Ee,/"""/),end:we(/"""/,Ee),contains:[v(Ee),k(Ee),E(Ee)]}),_=(Ee="")=>({begin:we(Ee,/"/),end:we(/"/,Ee),contains:[v(Ee),E(Ee)]}),A={className:"string",variants:[w(),w("#"),w("##"),w("###"),_(),_("#"),_("##"),_("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],F={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},N=Ee=>{let Yr=we(Ee,/\//),ee=we(/\//,Ee);return{begin:Yr,end:ee,contains:[...C,{scope:"comment",begin:`#(?!.*${ee})`,end:/$/}]}},X={scope:"regexp",variants:[N("###"),N("##"),N("#"),F]},z={match:we(/`/,or,/`/)},I={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${Bf}+`},M=[z,I,S],L={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:_9,contains:[...b,x,A]}]}},Y={scope:"keyword",match:we(/@/,Lt(...w9),Ua(Lt(/\(/,/\s+/)))},oe={scope:"meta",match:we(/@/,or)},fe=[L,Y,oe],ge={match:Ua(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:we(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Bf,"+")},{className:"type",match:Pf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:we(/\s+&\s+/,Ua(Pf)),relevance:0}]},pt={begin://,keywords:u,contains:[...r,...c,...fe,h,ge]};ge.contains.push(pt);let Pe={match:we(or,/\s*:/),keywords:"_|0",relevance:0},ht={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Pe,...r,X,...c,...p,...b,x,A,...M,...fe,ge]},Gr={begin://,keywords:"repeat each",contains:[...r,ge]},su={begin:Lt(Ua(we(or,/\s*:/)),Ua(we(or,/\s+/,or,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:or}]},ol={begin:/\(/,end:/\)/,keywords:u,contains:[su,...r,...c,...b,x,A,...fe,ge,ht],endsParent:!0,illegal:/["']/},Pp={match:[/(func|macro)/,/\s+/,Lt(z.match,or,ib)],className:{1:"keyword",3:"title.function"},contains:[Gr,ol,t],illegal:[/\[/,/%/]},Bp={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Gr,ol,t],illegal:/\[|%/},Fp={match:[/operator/,/\s+/,ib],className:{1:"keyword",3:"title"}},zp={begin:[/precedencegroup/,/\s+/,Pf],className:{1:"keyword",3:"title"},contains:[ge],keywords:[...k9,...vT],end:/}/},Ui={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},lu={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,or,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Gr,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Pf},...c],relevance:0}]};for(let Ee of A.variants){let Yr=Ee.contains.find(au=>au.label==="interpol");Yr.keywords=u;let ee=[...c,...p,...b,x,A,...M];Yr.contains=[...ee,{begin:/\(/,end:/\)/,contains:["self",...ee]}]}return{name:"Swift",keywords:u,contains:[...r,Pp,Bp,Ui,lu,rn,Fp,zp,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},X,...c,...p,...b,x,A,...M,...fe,ge,ht]}}var Ff="[A-Za-z$_][0-9A-Za-z$_]*",AT=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],TT=["true","false","null","undefined","NaN","Infinity"],NT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],MT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],OT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],RT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],DT=[].concat(OT,NT,MT);function S9(e){let t=e.regex,n=(L,{after:Y})=>{let oe="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,Y)=>{let oe=L[0].length+L.index,fe=L.input[oe];if(fe==="<"||fe===","){Y.ignoreMatch();return}fe===">"&&(n(L,{after:oe})||Y.ignoreMatch());let ge,pt=L.input.substring(oe);if(ge=pt.match(/^\s*=/)){Y.ignoreMatch();return}if((ge=pt.match(/^\s+extends\s+/))&&ge.index===0){Y.ignoreMatch();return}}},l={$pattern:Ff,keyword:AT,literal:TT,built_in:DT,"variable.language":RT},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...NT,...MT]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(L){return t.concat("(?!",L.join("|"),")")}let X={match:t.concat(/\b/,N([...OT,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},X,F,w,I,{match:/\$[(.]/}]}}function IT(e){let t=e.regex,n=S9(e),r=Ff,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Ff,keyword:AT.concat(a),literal:TT,built_in:DT.concat(o),"variable.language":RT},c={className:"meta",begin:"@"+r},d=(g,b,m)=>{let y=g.contains.findIndex(x=>x.label===b);if(y===-1)throw new Error("can not find mode to replace");g.contains.splice(y,1,m)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(g=>g.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,i,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",l);let h=n.contains.find(g=>g.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function LT(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,a={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,o),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(i,o),/ +/,t.either(s,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,a,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function PT(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},a={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,s,o,e.QUOTE_STRING_MODE,a,u,l]}}function BT(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,a,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,a,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function FT(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},l=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,g,i,s],m=[...b];return m.pop(),m.push(l),p.contains=m,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var $a={arduino:IA,bash:LA,c:PA,cpp:BA,csharp:FA,css:zA,diff:UA,go:$A,graphql:HA,ini:VA,java:jA,javascript:ZA,json:XA,kotlin:QA,less:nT,lua:rT,makefile:oT,markdown:iT,objectivec:sT,perl:lT,php:aT,"php-template":uT,plaintext:cT,python:dT,"python-repl":fT,r:pT,ruby:hT,rust:mT,scss:gT,shell:bT,sql:yT,swift:CT,typescript:IT,vbnet:LT,wasm:PT,xml:BT,yaml:FT};var zT={},C9="hljs-";function Ha(e){let t=Of.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:o,register:i,registerAlias:s,registered:l};function n(a,u,c){let d=c||zT,f=typeof d.prefix=="string"?d.prefix:C9;if(!t.getLanguage(a))throw new Error("Unknown language: `"+a+"` is not registered");t.configure({__emitter:lb,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:a});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,g=h.data;return g.language=p.language,g.relevance=p.relevance,h}function r(a,u){let d=(u||zT).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function i(a,u){if(typeof a=="string")t.registerLanguage(a,u);else{let c;for(c in a)Object.hasOwn(a,c)&&t.registerLanguage(c,a[c])}}function s(a,u){if(typeof a=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:a});else{let c;for(c in a)if(Object.hasOwn(a,c)){let d=a[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function l(a){return!!t.getLanguage(a)}}var lb=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(s,l){return l?s+"_".repeat(l):n.options.classPrefix+s}),o=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var gb={};il(gb,{arrayReplaceAt:()=>mb,assign:()=>Ys,escapeHtml:()=>$r,escapeRE:()=>uF,fromCodePoint:()=>Wa,has:()=>X9,isMdAsciiPunct:()=>Ni,isPunctChar:()=>Ti,isSpace:()=>ue,isString:()=>Jf,isValidEntityCode:()=>Zf,isWhiteSpace:()=>Ai,lib:()=>cF,normalizeReference:()=>Mi,unescapeAll:()=>Ur,unescapeMd:()=>rF});var Vf={};il(Vf,{decode:()=>Va,encode:()=>$f,format:()=>Ks,parse:()=>qa});var UT={};function A9(e){let t=UT[e];if(t)return t;t=UT[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),i+=6;continue}}if((l&248)===240&&i+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="\uFFFD"}return o})}zf.defaultChars=";/?:@&=+$,#";zf.componentChars="";var Va=zf;var $T={};function T9(e){let t=$T[e];if(t)return t;t=$T[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=T9(t),o="";for(let i=0,s=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}Uf.defaultChars=";/?:@&=+$,-_.!~*'()#";Uf.componentChars="-_.!~*'()";var $f=Uf;function Ks(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Hf(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var N9=/^([a-z0-9.+-]+:)/i,M9=/:[0-9]*$/,O9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,R9=["<",">",'"',"`"," ","\r",` +`," "],D9=["{","}","|","\\","^","`"].concat(R9),I9=["'"].concat(D9),HT=["%","/","?",";","#"].concat(I9),VT=["/","?","#"],L9=255,qT=/^[+a-z0-9A-Z_-]{0,63}$/,P9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,WT={javascript:!0,"javascript:":!0},jT={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function B9(e,t){if(e&&e instanceof Hf)return e;let n=new Hf;return n.parse(e,t),n}Hf.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=O9.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=N9.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&WT[s])&&(i=i.substr(2),this.slashes=!0)),!WT[s]&&(o||s&&!jT[s])){let u=-1;for(let h=0;h127?y+="x":y+=m[x];if(!y.match(qT)){let x=h.slice(0,g),v=h.slice(g+1),k=m.match(P9);k&&(x.push(k[1]),v.unshift(k[2])),v.length&&(i=v.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>L9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));let a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),jT[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Hf.prototype.parseHost=function(e){let t=M9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var qa=B9;var ab={};il(ab,{Any:()=>qf,Cc:()=>Wf,Cf:()=>KT,P:()=>Gs,S:()=>jf,Z:()=>Kf});var qf=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Wf=/[\0-\x1F\x7F-\x9F]/;var KT=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Gs=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var jf=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Kf=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var GT=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var YT=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var ub,F9=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]]),cb=(ub=String.fromCodePoint)!==null&&ub!==void 0?ub:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function db(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=F9.get(e))!==null&&t!==void 0?t:e}var nt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(nt||(nt={}));var z9=32,Po;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Po||(Po={}));function fb(e){return e>=nt.ZERO&&e<=nt.NINE}function U9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_F||e>=nt.LOWER_A&&e<=nt.LOWER_F}function $9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_Z||e>=nt.LOWER_A&&e<=nt.LOWER_Z||fb(e)}function H9(e){return e===nt.EQUALS||$9(e)}var tt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(tt||(tt={}));var ir;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ir||(ir={}));var Gf=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ir.Strict}startEntity(t){this.decodeMode=t,this.state=tt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tt.EntityStart:return t.charCodeAt(n)===nt.NUM?(this.state=tt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tt.NamedEntity,this.stateNamedEntity(t,n));case tt.NumericStart:return this.stateNumericStart(t,n);case tt.NumericDecimal:return this.stateNumericDecimal(t,n);case tt.NumericHex:return this.stateNumericHex(t,n);case tt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|z9)===nt.LOWER_X?(this.state=tt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,i!==0){if(s===nt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ir.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&Po.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Po.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tt.NamedEntity:return this.result!==0&&(this.decodeMode!==ir.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tt.NumericDecimal:return this.emitNumericEntity(0,2);case tt.NumericHex:return this.emitNumericEntity(0,3);case tt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tt.EntityStart:return 0}}};function JT(e){let t="",n=new Gf(e,r=>t+=cb(r));return function(o,i){let s=0,l=0;for(;(l=o.indexOf("&",l))>=0;){t+=o.slice(s,l),n.startEntity(i);let u=n.write(o,l+1);if(u<0){s=l+n.end();break}s=l+u,l=u===0?s+1:s}let a=t+o.slice(s);return t="",a}}function V9(e,t,n,r){let o=(t&Po.BRANCH_LENGTH)>>7,i=t&Po.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){let a=r-i;return a<0||a>=o?-1:e[n+a]-1}let s=n,l=s+o-1;for(;s<=l;){let a=s+l>>>1,u=e[a];if(ur)l=a-1;else return e[a+o]}return-1}var q9=JT(GT),EY=JT(YT);function Bo(e,t=ir.Legacy){return q9(e,t)}function Yf(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function pb(e,t){return function(r){let o,i=0,s="";for(;o=e.exec(r);)i!==o.index&&(s+=r.substring(i,o.index)),s+=t.get(o[0].charCodeAt(0)),i=o.index+1;return s+r.substring(i)}}var ZT=pb(/[&<>'"]/g,j9),XT=pb(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),QT=pb(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var e3;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(e3||(e3={}));var t3;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(t3||(t3={}));function J9(e){return Object.prototype.toString.call(e)}function Jf(e){return J9(e)==="[object String]"}var Z9=Object.prototype.hasOwnProperty;function X9(e,t){return Z9.call(e,t)}function Ys(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function mb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Zf(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Wa(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var o3=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Q9=/&([a-z#][a-z0-9]{1,31});/gi,eF=new RegExp(o3.source+"|"+Q9.source,"gi"),tF=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function nF(e,t){if(t.charCodeAt(0)===35&&tF.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Zf(r)?Wa(r):e}let n=Bo(e);return n!==e?n:e}function rF(e){return e.indexOf("\\")<0?e:e.replace(o3,"$1")}function Ur(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(eF,function(t,n,r){return n||nF(t,r)})}var oF=/[&<>"]/,iF=/[&<>"]/g,sF={"&":"&","<":"<",">":">",'"':"""};function lF(e){return sF[e]}function $r(e){return oF.test(e)?e.replace(iF,lF):e}var aF=/[.?*+^$[\]\\(){}|-]/g;function uF(e){return e.replace(aF,"\\$&")}function ue(e){switch(e){case 9:case 32:return!0}return!1}function Ai(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ti(e){return Gs.test(e)||jf.test(e)}function Ni(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Mi(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var cF={mdurl:Vf,ucmicro:ab};var vb={};il(vb,{parseLinkDestination:()=>yb,parseLinkLabel:()=>bb,parseLinkTitle:()=>xb});function bb(e,t,n){let r,o,i,s,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=Ur(e.slice(t,o)),i.pos=o,i.ok=!0),i}function xb(e,t,n,r){let o,i=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return s;t++,i++,l===40&&(l=41),s.marker=l}for(;i"+$r(i.content)+""};sr.code_block=function(e,t,n,r,o){let i=e[t];return""+$r(e[t].content)+` `};sr.fence=function(e,t,n,r,o){let i=e[t],s=i.info?Ur(i.info).trim():"",l="",a="";if(s){let c=s.split(/(\s+)/g);l=c[0],a=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(i.content,l,a)||$r(i.content):u=$r(i.content),u.indexOf("${u} `}return`
${u}
@@ -355,28 +355,28 @@ ${p.slice(u+2)}`,d+=1;else break}t.push({indent:u,number:parseInt(l,10),content: `};sr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};sr.text=function(e,t){return $r(e[t].content)};sr.html_block=function(e,t){return e[t].content};sr.html_inline=function(e,t){return e[t].content};function Ys(){this.rules=Js({},sr)}Ys.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n -`:">",i};Ys.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let i=0,s=e.length;i=0&&(r=this.attrs[n][1]),r};Zs.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var Hr=Zs;function l3(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}l3.prototype.Token=Hr;var a3=l3;var uF=/\r\n?|\n/g,cF=/\0/g;function xb(e){let t;t=e.src.replace(uF,` -`),t=t.replace(cF,"\uFFFD"),e.src=t}function vb(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function kb(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function fF(e){return/^<\/a\s*>/i.test(e)}function Eb(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;s--){let l=o[s];if(l.type==="link_close"){for(s--;o[s].level!==l.level&&o[s].type!=="link_open";)s--;continue}if(l.type==="html_inline"&&(dF(l.content)&&i>0&&i--,fF(l.content)&&i++),!(i>0)&&l.type==="text"&&e.md.linkify.test(l.content)){let a=l.content,u=e.md.linkify.match(a),c=[],d=l.level,f=0;u.length>0&&u[0].index===0&&s>0&&o[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let k=new e.Token("text","",0);k.content=a.slice(f,g),k.level=d,c.push(k)}let y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let x=new e.Token("text","",0);x.content=b,x.level=d,c.push(x);let v=new e.Token("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(hF,gF)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function yF(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&u3.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function wb(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(pF.test(e.tokens[t].content)&&bF(e.tokens[t].children),u3.test(e.tokens[t].content)&&yF(e.tokens[t].children))}var xF=/['"]/,c3=/['"]/g,d3="\u2019";function Zf(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function vF(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,i.type!=="text")continue;let l=i.content,a=0,u=l.length;e:for(;a=0)h=l.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(a=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(i.content=Zf(i.content,c.index,d3));continue}if(f)for(n=r.length-1;n>=0;n--){let v=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!xF.test(e.tokens[t].content)||vF(e.tokens[t].children,e)}function Sb(e){let t,n,r=e.tokens,o=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};lr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};lr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!ue(this.src.charCodeAt(--t)))return t+1;return t};lr.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};lr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let i=new Array(n-t);for(let s=0,l=t;lr?i[s]=new Array(a-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};lr.prototype.Token=Hr;var p3=lr;var kF=65536;function Ab(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function h3(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),i=!1,s=0,l="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;let s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;let l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!ue(l)||s===45&&ue(l))return!1;for(;i=4)return!1;u=h3(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let v=0;v=4||(u=h3(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),x+=d-u.length,x>kF))break;if(o===t+2){let E=e.push("tbody_open","tbody",1);E.map=y=[t+2,0]}let k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let E=0;E=4){r++,o=r;continue}break}e.line=o;let i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+` -`,i.map=[t,e.line],!0}function Ob(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;let s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let l=o;o=e.skipChars(o,s);let a=o-l;if(a<3)return!1;let u=e.src.slice(l,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o=4)&&(o=e.skipChars(o,s),!(o-l=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let l=[],a=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=i)break;if(e.src.charCodeAt(o++)===62&&!x){let k=e.sCount[h]+1,E,w;e.src.charCodeAt(o)===32?(o++,k++,w=!1,E=!0):e.src.charCodeAt(o)===9?(E=!0,(e.bsCount[h]+k)%4===3?(o++,k++,w=!1):w=!0):E=!1;let _=k;for(l.push(e.bMarks[h]),e.bMarks[h]=o;o=i,a.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(E?1:0),u.push(e.sCount[h]),e.sCount[h]=_-k,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let v=!1;for(let k=0,E=d.length;k";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=f,g[1]=e.line;for(let x=0;x=4)return!1;let i=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let l=1;for(;i=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]=e.blkIndent&&(c=!0);let d,f,p;if((p=g3(e,a))>=0){if(d=!0,s=e.bMarks[a]+e.tShift[a],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=m3(e,a))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[a])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(l=e.push("ordered_list_open","ol",1),f!==1&&(l.attrs=[["start",f]])):l=e.push("bullet_list_open","ul",1);let b=[a,0];l.map=b,l.markup=String.fromCharCode(h);let g=!1,y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";a=o?w=1:w=k-v,w>4&&(w=1);let _=v+w;l=e.push("list_item_open","li",1),l.markup=String.fromCharCode(h);let T=[a,0];l.map=T,d&&(l.info=e.src.slice(s,p-1));let C=e.tight,F=e.tShift[a],N=e.sCount[a],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[a]=E-e.bMarks[a],e.sCount[a]=k,E>=o&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n,!0),(!e.tight||g)&&(u=!1),g=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[a]=F,e.sCount[a]=N,e.tight=C,l=e.push("list_item_close","li",-1),l.markup=String.fromCharCode(h),a=e.line,T[1]=a,a>=n||e.sCount[a]=4)break;let z=!1;for(let I=0,S=y.length;I=4||e.src.charCodeAt(o)!==91)return!1;function l(y){let x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let v=!1;if(e.sCount[y]-e.blkIndent>3&&(v=!0),e.sCount[y]<0&&(v=!0),!v){let w=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let T=!1;for(let C=0,F=w.length;C"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=s),!0):!1}var b3=["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"];var wF="[a-zA-Z_:][a-zA-Z0-9:._-]*",_F="[^\"'=<>`\\x00-\\x20]+",SF="'[^']*'",CF='"[^"]*"',TF="(?:"+_F+"|"+SF+"|"+CF+")",AF="(?:\\s+"+wF+"(?:\\s*=\\s*"+TF+")?)",y3="<[A-Za-z][A-Za-z0-9\\-]*"+AF+"*\\s*\\/?>",x3="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",NF="",MF="<[?][\\s\\S]*?[?]>",OF="]*>",RF="",v3=new RegExp("^(?:"+y3+"|"+x3+"|"+NF+"|"+MF+"|"+OF+"|"+RF+")"),k3=new RegExp("^(?:"+y3+"|"+x3+")");var Xs=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(k3.source+"\\s*$"),/^$/,!1]];function Pb(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),l=0;for(;l=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let l=1;for(s=e.src.charCodeAt(++o);s===35&&o6||oo&&ue(e.src.charCodeAt(a-1))&&(i=a),e.line=t+1;let u=e.push("heading_open","h"+String(l),1);u.markup="########".slice(0,l),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,i).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(l),-1);return d.markup="########".slice(0,l),!0}function Fb(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let i=0,s,l=t+1;for(;l3)continue;if(e.sCount[l]>=e.blkIndent){let p=e.bMarks[l]+e.tShift[l],h=e.eMarks[l];if(p=h))){i=s===61?1:2;break}}if(e.sCount[l]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[i]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[s]=i){e.line=n;break}let a=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};ja.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,i=e;for(;i0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(IF);if(!o)return!1;let i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let l=s.url;if(l.length<=i.length)return!1;l=l.replace(/\*+$/,"");let a=e.md.normalizeLink(l);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=l.length-i.length,!0}function Hb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){qb[e.charCodeAt(0)]=1});function Vb(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&l<=57343&&(i+=e.src[n+1],n++)}let s="\\"+i;if(!t){let l=e.push("text_special","",0);o<256&&qb[o]!==0?l.content=i:l.content=s,l.markup=s,l.info="escape"}return e.pos=n+1,!0}function Wb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let i=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,l=String.fromCharCode(o.marker),a=e.tokens[o.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?l+l:l,a.content="";let u=e.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?l+l:l,u.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function FF(e){let t=e.tokens_meta,n=e.tokens_meta.length;S3(e,e.delimiters);for(let r=0;r=d)return!1;if(a=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",a=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(a,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[Mi(r)],!i)return e.pos=c,!1;s=i.href,l=i.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,l&&b.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function Jb(e,t){let n,r,o,i,s,l,a,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;for(u=i,l=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),l.ok&&(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?i=l.pos:c=""),u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?o=e.src.slice(u,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[Mi(o)],!s)return e.pos=d,!1;c=s.href,a=s.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,a&&g.push(["title",a])}return e.pos=i,e.posMax=f,!0}var zF=/^([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])?)*)$/,UF=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Yb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let i=e.src.slice(r+1,n);if(UF.test(i)){let s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(zF.test(i)){let s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function $F(e){return/^\s]/i.test(e)}function HF(e){return/^<\/a\s*>/i.test(e)}function qF(e){let t=e|32;return t>=97&&t<=122}function Zb(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!qF(o))return!1;let i=e.src.slice(r).match(v3);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=i[0],$F(s.content)&&e.linkLevel++,HF(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var VF=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,WF=/^&([a-z][a-z0-9]{1,31});/i;function Xb(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(VF);if(i){if(!t){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),l=e.push("text_special","",0);l.content=Yf(s)?Wa(s):Wa(65533),l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(WF);if(i){let s=Bo(i[0]);if(s!==i[0]){if(!t){let l=e.push("text_special","",0);l.content=s,l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function C3(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,i=[];for(let s=0;sa;u-=i[u]+1){let d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,l.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function Qb(e){let t=e.tokens_meta,n=e.tokens_meta.length;C3(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};Ka.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ka.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let i=this.ruler2.getRules(""),s=i.length;for(let l=0;l|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function ry(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function tp(e){return Object.prototype.toString.call(e)}function jF(e){return tp(e)==="[object String]"}function KF(e){return tp(e)==="[object Object]"}function GF(e){return tp(e)==="[object RegExp]"}function N3(e){return tp(e)==="[object Function]"}function JF(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var O3={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function YF(e){return Object.keys(e||{}).reduce(function(t,n){return t||O3.hasOwnProperty(n)},!1)}var ZF={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},XF="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",QF="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function ez(e){e.__index__=-1,e.__text_cache__=""}function tz(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function M3(){return function(e,t){t.normalize(e)}}function ep(e){let t=e.re=A3(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(XF),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function i(l,a){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+a)}Object.keys(e.__schemas__).forEach(function(l){let a=e.__schemas__[l];if(a===null)return;let u={validate:null,link:null};if(e.__compiled__[l]=u,KF(a)){GF(a.validate)?u.validate=tz(a.validate):N3(a.validate)?u.validate=a.validate:i(l,a),N3(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=M3();return}if(jF(a)){o.push(l);return}i(l,a)}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:M3()};let s=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(JF).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),ez(e)}function nz(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function oy(e,t){let n=new nz(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function tn(e,t){if(!(this instanceof tn))return new tn(e,t);t||YF(e)&&(t=e,e={}),this.__opts__=ry({},O3,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ry({},ZF,e),this.__compiled__={},this.__tlds__=QF,this.__tlds_replaced__=!1,this.re={},ep(this)}tn.prototype.add=function(t,n){return this.__schemas__[t]=n,ep(this),this};tn.prototype.set=function(t){return this.__opts__=ry(this.__opts__,t),this};tn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,i,s,l,a,u,c;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(n=a.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],a.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=l))),this.__index__>=0};tn.prototype.pretest=function(t){return this.re.pretest.test(t)};tn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};tn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(oy(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(oy(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};tn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,oy(this,0)):null};tn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),ep(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ep(this),this)};tn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};tn.prototype.onCompile=function(){};var R3=tn;var rz=/^xn--/,oz=/[^\0-\x7F]/,iz=/[\x2E\u3002\uFF0E\uFF61]/g,sz={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},iy=35,ar=Math.floor,sy=String.fromCharCode;function Fo(e){throw new RangeError(sz[e])}function lz(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function I3(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(iz,".");let o=e.split("."),i=lz(o,t).join(".");return r+i}function L3(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),uz=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},D3=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},P3=function(e,t,n){let r=0;for(e=n?ar(e/700):e>>1,e+=ar(e/t);e>iy*26>>1;r+=36)e=ar(e/iy);return ar(r+(iy+1)*e/(e+38))},B3=function(e){let t=[],n=e.length,r=0,o=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let l=0;l=128&&Fo("not-basic"),t.push(e.charCodeAt(l));for(let l=s>0?s+1:0;l=n&&Fo("invalid-input");let f=uz(e.charCodeAt(l++));f>=36&&Fo("invalid-input"),f>ar((2147483647-r)/c)&&Fo("overflow"),r+=f*c;let p=d<=i?1:d>=i+26?26:d-i;if(far(2147483647/h)&&Fo("overflow"),c*=h}let u=t.length+1;i=P3(r-a,u,a==0),ar(r/u)>2147483647-o&&Fo("overflow"),o+=ar(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},F3=function(e){let t=[];e=L3(e);let n=e.length,r=128,o=0,i=72;for(let a of e)a<128&&t.push(sy(a));let s=t.length,l=s;for(s&&t.push("-");l=r&&car((2147483647-o)/u)&&Fo("overflow"),o+=(a-r)*u,r=a;for(let c of e)if(c2147483647&&Fo("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=i?1:f>=i+26?26:f-i;if(d=0))try{t.hostname=ly.toASCII(t.hostname)}catch{}return Uf(Ks(t))}function yz(e){let t=Va(e,!0);if(t.hostname&&(!t.protocol||H3.indexOf(t.protocol)>=0))try{t.hostname=ly.toUnicode(t.hostname)}catch{}return qa(Ks(t),qa.defaultChars+"%")}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);t||Jf(e)||(t=e||{},e="default"),this.inline=new T3,this.block=new E3,this.core=new f3,this.renderer=new s3,this.linkify=new R3,this.validateLink=gz,this.normalizeLink=bz,this.normalizeLinkText=yz,this.utils=hb,this.helpers=Js({},yb),this.options={},this.configure(e),t&&this.set(t)}kn.prototype.set=function(e){return Js(this.options,e),this};kn.prototype.configure=function(e){let t=this;if(Jf(e)){let n=e;if(e=pz[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};kn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};kn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};kn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};kn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};kn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};kn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};kn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Qs=kn;var xz=new yo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function vz(e,t){if(e.isText&&t.isText&&ce.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var cy=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:ce.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks),s;o&&(s=vz(o,i))?r[r.length-1]=s:r.push(i)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{s.openNode(i,Ga(o,l,a,u)),s.addText(q3(l.content)),s.closeNode()}:(n[r+"_open"]=(s,l,a,u)=>s.openNode(i,Ga(o,l,a,u)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=e.nodeType(o.node);n[r]=(s,l,a,u)=>s.addNode(i,Ga(o,l,a,u))}else if(o.mark){let i=e.marks[o.mark];ay(o,r)?n[r]=(s,l,a,u)=>{s.openMark(i.create(Ga(o,l,a,u))),s.addText(q3(l.content)),s.closeMark(i)}:(n[r+"_open"]=(s,l,a,u)=>s.openMark(i.create(Ga(o,l,a,u))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)ay(o,r)?n[r]=uy:(n[r+"_open"]=uy,n[r+"_close"]=uy);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var dy=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=kz(t,r)}parse(t,n={}){let r=new cy(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function V3(e,t){for(;++t({tight:V3(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:V3(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),Ez={open:"",close:"",mixable:!0},fy=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new Ja(this.nodes,this.marks,n);return r.renderContent(t),r.out}},Fn=new fy({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` +`:">",i};Js.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let i=0,s=e.length;i=0&&(r=this.attrs[n][1]),r};Zs.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var Hr=Zs;function s3(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}s3.prototype.Token=Hr;var l3=s3;var dF=/\r\n?|\n/g,fF=/\0/g;function kb(e){let t;t=e.src.replace(dF,` +`),t=t.replace(fF,"\uFFFD"),e.src=t}function Eb(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function wb(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function hF(e){return/^<\/a\s*>/i.test(e)}function _b(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;s--){let l=o[s];if(l.type==="link_close"){for(s--;o[s].level!==l.level&&o[s].type!=="link_open";)s--;continue}if(l.type==="html_inline"&&(pF(l.content)&&i>0&&i--,hF(l.content)&&i++),!(i>0)&&l.type==="text"&&e.md.linkify.test(l.content)){let a=l.content,u=e.md.linkify.match(a),c=[],d=l.level,f=0;u.length>0&&u[0].index===0&&s>0&&o[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let k=new e.Token("text","",0);k.content=a.slice(f,m),k.level=d,c.push(k)}let y=new e.Token("link_open","a",1);y.attrs=[["href",g]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let x=new e.Token("text","",0);x.content=b,x.level=d,c.push(x);let v=new e.Token("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(gF,yF)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function vF(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&a3.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Sb(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(mF.test(e.tokens[t].content)&&xF(e.tokens[t].children),a3.test(e.tokens[t].content)&&vF(e.tokens[t].children))}var kF=/['"]/,u3=/['"]/g,c3="\u2019";function Xf(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function EF(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,i.type!=="text")continue;let l=i.content,a=0,u=l.length;e:for(;a=0)h=l.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let g=32;if(a=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=m),!d&&!f){p&&(i.content=Xf(i.content,c.index,c3));continue}if(f)for(n=r.length-1;n>=0;n--){let v=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!kF.test(e.tokens[t].content)||EF(e.tokens[t].children,e)}function Ab(e){let t,n,r=e.tokens,o=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};lr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};lr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!ue(this.src.charCodeAt(--t)))return t+1;return t};lr.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};lr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let i=new Array(n-t);for(let s=0,l=t;lr?i[s]=new Array(a-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};lr.prototype.Token=Hr;var f3=lr;var wF=65536;function Mb(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function p3(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),i=!1,s=0,l="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;let s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;let l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!ue(l)||s===45&&ue(l))return!1;for(;i=4)return!1;u=p3(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),g=[t,0];h.map=g;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let m=e.push("tr_open","tr",1);m.map=[t,t+1];for(let v=0;v=4||(u=p3(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),x+=d-u.length,x>wF))break;if(o===t+2){let E=e.push("tbody_open","tbody",1);E.map=y=[t+2,0]}let k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let E=0;E=4){r++,o=r;continue}break}e.line=o;let i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+` +`,i.map=[t,e.line],!0}function Db(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;let s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let l=o;o=e.skipChars(o,s);let a=o-l;if(a<3)return!1;let u=e.src.slice(l,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o=4)&&(o=e.skipChars(o,s),!(o-l=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let l=[],a=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=i)break;if(e.src.charCodeAt(o++)===62&&!x){let k=e.sCount[h]+1,E,w;e.src.charCodeAt(o)===32?(o++,k++,w=!1,E=!0):e.src.charCodeAt(o)===9?(E=!0,(e.bsCount[h]+k)%4===3?(o++,k++,w=!1):w=!0):E=!1;let _=k;for(l.push(e.bMarks[h]),e.bMarks[h]=o;o=i,a.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(E?1:0),u.push(e.sCount[h]),e.sCount[h]=_-k,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let v=!1;for(let k=0,E=d.length;k";let m=[t,0];b.map=m,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=f,m[1]=e.line;for(let x=0;x=4)return!1;let i=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let l=1;for(;i=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]=e.blkIndent&&(c=!0);let d,f,p;if((p=m3(e,a))>=0){if(d=!0,s=e.bMarks[a]+e.tShift[a],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=h3(e,a))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[a])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),g=e.tokens.length;d?(l=e.push("ordered_list_open","ol",1),f!==1&&(l.attrs=[["start",f]])):l=e.push("bullet_list_open","ul",1);let b=[a,0];l.map=b,l.markup=String.fromCharCode(h);let m=!1,y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";a=o?w=1:w=k-v,w>4&&(w=1);let _=v+w;l=e.push("list_item_open","li",1),l.markup=String.fromCharCode(h);let A=[a,0];l.map=A,d&&(l.info=e.src.slice(s,p-1));let C=e.tight,F=e.tShift[a],N=e.sCount[a],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[a]=E-e.bMarks[a],e.sCount[a]=k,E>=o&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n,!0),(!e.tight||m)&&(u=!1),m=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[a]=F,e.sCount[a]=N,e.tight=C,l=e.push("list_item_close","li",-1),l.markup=String.fromCharCode(h),a=e.line,A[1]=a,a>=n||e.sCount[a]=4)break;let z=!1;for(let I=0,S=y.length;I=4||e.src.charCodeAt(o)!==91)return!1;function l(y){let x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let v=!1;if(e.sCount[y]-e.blkIndent>3&&(v=!0),e.sCount[y]<0&&(v=!0),!v){let w=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let A=!1;for(let C=0,F=w.length;C"u"&&(e.env.references={}),typeof e.env.references[m]>"u"&&(e.env.references[m]={title:b,href:d}),e.line=s),!0):!1}var g3=["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"];var SF="[a-zA-Z_:][a-zA-Z0-9:._-]*",CF="[^\"'=<>`\\x00-\\x20]+",AF="'[^']*'",TF='"[^"]*"',NF="(?:"+CF+"|"+AF+"|"+TF+")",MF="(?:\\s+"+SF+"(?:\\s*=\\s*"+NF+")?)",b3="<[A-Za-z][A-Za-z0-9\\-]*"+MF+"*\\s*\\/?>",y3="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",OF="",RF="<[?][\\s\\S]*?[?]>",DF="]*>",IF="",x3=new RegExp("^(?:"+b3+"|"+y3+"|"+OF+"|"+RF+"|"+DF+"|"+IF+")"),v3=new RegExp("^(?:"+b3+"|"+y3+")");var Xs=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(v3.source+"\\s*$"),/^$/,!1]];function Fb(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),l=0;for(;l=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let l=1;for(s=e.src.charCodeAt(++o);s===35&&o6||oo&&ue(e.src.charCodeAt(a-1))&&(i=a),e.line=t+1;let u=e.push("heading_open","h"+String(l),1);u.markup="########".slice(0,l),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,i).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(l),-1);return d.markup="########".slice(0,l),!0}function Ub(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let i=0,s,l=t+1;for(;l3)continue;if(e.sCount[l]>=e.blkIndent){let p=e.bMarks[l]+e.tShift[l],h=e.eMarks[l];if(p=h))){i=s===61?1:2;break}}if(e.sCount[l]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[i]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[s]=i){e.line=n;break}let a=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};ja.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,i=e;for(;i0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(PF);if(!o)return!1;let i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let l=s.url;if(l.length<=i.length)return!1;l=l.replace(/\*+$/,"");let a=e.md.normalizeLink(l);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=l.length-i.length,!0}function qb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){Wb[e.charCodeAt(0)]=1});function jb(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&l<=57343&&(i+=e.src[n+1],n++)}let s="\\"+i;if(!t){let l=e.push("text_special","",0);o<256&&Wb[o]!==0?l.content=i:l.content=s,l.markup=s,l.info="escape"}return e.pos=n+1,!0}function Kb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let i=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,l=String.fromCharCode(o.marker),a=e.tokens[o.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?l+l:l,a.content="";let u=e.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?l+l:l,u.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function UF(e){let t=e.tokens_meta,n=e.tokens_meta.length;_3(e,e.delimiters);for(let r=0;r=d)return!1;if(a=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",a=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(a,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[Mi(r)],!i)return e.pos=c,!1;s=i.href,l=i.title}if(!t){e.pos=f,e.posMax=p;let g=e.push("link_open","a",1),b=[["href",s]];g.attrs=b,l&&b.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function Zb(e,t){let n,r,o,i,s,l,a,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;for(u=i,l=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),l.ok&&(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?i=l.pos:c=""),u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?o=e.src.slice(u,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[Mi(o)],!s)return e.pos=d,!1;c=s.href,a=s.title}if(!t){r=e.src.slice(p,h);let g=[];e.md.inline.parse(r,e.md,e.env,g);let b=e.push("image","img",0),m=[["src",c],["alt",""]];b.attrs=m,b.children=g,b.content=r,a&&m.push(["title",a])}return e.pos=i,e.posMax=f,!0}var $F=/^([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])?)*)$/,HF=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Xb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let i=e.src.slice(r+1,n);if(HF.test(i)){let s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if($F.test(i)){let s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function VF(e){return/^\s]/i.test(e)}function qF(e){return/^<\/a\s*>/i.test(e)}function WF(e){let t=e|32;return t>=97&&t<=122}function Qb(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!WF(o))return!1;let i=e.src.slice(r).match(x3);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=i[0],VF(s.content)&&e.linkLevel++,qF(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var jF=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,KF=/^&([a-z][a-z0-9]{1,31});/i;function ey(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(jF);if(i){if(!t){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),l=e.push("text_special","",0);l.content=Zf(s)?Wa(s):Wa(65533),l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(KF);if(i){let s=Bo(i[0]);if(s!==i[0]){if(!t){let l=e.push("text_special","",0);l.content=s,l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function S3(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,i=[];for(let s=0;sa;u-=i[u]+1){let d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,l.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function ty(e){let t=e.tokens_meta,n=e.tokens_meta.length;S3(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};Ka.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ka.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let i=this.ruler2.getRules(""),s=i.length;for(let l=0;l|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function iy(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function np(e){return Object.prototype.toString.call(e)}function GF(e){return np(e)==="[object String]"}function YF(e){return np(e)==="[object Object]"}function JF(e){return np(e)==="[object RegExp]"}function T3(e){return np(e)==="[object Function]"}function ZF(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var M3={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function XF(e){return Object.keys(e||{}).reduce(function(t,n){return t||M3.hasOwnProperty(n)},!1)}var QF={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},ez="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",tz="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function nz(e){e.__index__=-1,e.__text_cache__=""}function rz(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function N3(){return function(e,t){t.normalize(e)}}function tp(e){let t=e.re=A3(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(ez),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function i(l,a){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+a)}Object.keys(e.__schemas__).forEach(function(l){let a=e.__schemas__[l];if(a===null)return;let u={validate:null,link:null};if(e.__compiled__[l]=u,YF(a)){JF(a.validate)?u.validate=rz(a.validate):T3(a.validate)?u.validate=a.validate:i(l,a),T3(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=N3();return}if(GF(a)){o.push(l);return}i(l,a)}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:N3()};let s=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(ZF).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),nz(e)}function oz(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function sy(e,t){let n=new oz(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function tn(e,t){if(!(this instanceof tn))return new tn(e,t);t||XF(e)&&(t=e,e={}),this.__opts__=iy({},M3,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=iy({},QF,e),this.__compiled__={},this.__tlds__=tz,this.__tlds_replaced__=!1,this.re={},tp(this)}tn.prototype.add=function(t,n){return this.__schemas__[t]=n,tp(this),this};tn.prototype.set=function(t){return this.__opts__=iy(this.__opts__,t),this};tn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,i,s,l,a,u,c;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(n=a.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],a.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=l))),this.__index__>=0};tn.prototype.pretest=function(t){return this.re.pretest.test(t)};tn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};tn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(sy(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(sy(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};tn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,sy(this,0)):null};tn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),tp(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,tp(this),this)};tn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};tn.prototype.onCompile=function(){};var O3=tn;var iz=/^xn--/,sz=/[^\0-\x7F]/,lz=/[\x2E\u3002\uFF0E\uFF61]/g,az={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ly=35,ar=Math.floor,ay=String.fromCharCode;function Fo(e){throw new RangeError(az[e])}function uz(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function D3(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(lz,".");let o=e.split("."),i=uz(o,t).join(".");return r+i}function I3(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),dz=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},R3=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},L3=function(e,t,n){let r=0;for(e=n?ar(e/700):e>>1,e+=ar(e/t);e>ly*26>>1;r+=36)e=ar(e/ly);return ar(r+(ly+1)*e/(e+38))},P3=function(e){let t=[],n=e.length,r=0,o=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let l=0;l=128&&Fo("not-basic"),t.push(e.charCodeAt(l));for(let l=s>0?s+1:0;l=n&&Fo("invalid-input");let f=dz(e.charCodeAt(l++));f>=36&&Fo("invalid-input"),f>ar((2147483647-r)/c)&&Fo("overflow"),r+=f*c;let p=d<=i?1:d>=i+26?26:d-i;if(far(2147483647/h)&&Fo("overflow"),c*=h}let u=t.length+1;i=L3(r-a,u,a==0),ar(r/u)>2147483647-o&&Fo("overflow"),o+=ar(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},B3=function(e){let t=[];e=I3(e);let n=e.length,r=128,o=0,i=72;for(let a of e)a<128&&t.push(ay(a));let s=t.length,l=s;for(s&&t.push("-");l=r&&car((2147483647-o)/u)&&Fo("overflow"),o+=(a-r)*u,r=a;for(let c of e)if(c2147483647&&Fo("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=i?1:f>=i+26?26:f-i;if(d=0))try{t.hostname=uy.toASCII(t.hostname)}catch{}return $f(Ks(t))}function vz(e){let t=qa(e,!0);if(t.hostname&&(!t.protocol||$3.indexOf(t.protocol)>=0))try{t.hostname=uy.toUnicode(t.hostname)}catch{}return Va(Ks(t),Va.defaultChars+"%")}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);t||Jf(e)||(t=e||{},e="default"),this.inline=new C3,this.block=new k3,this.core=new d3,this.renderer=new i3,this.linkify=new O3,this.validateLink=yz,this.normalizeLink=xz,this.normalizeLinkText=vz,this.utils=gb,this.helpers=Ys({},vb),this.options={},this.configure(e),t&&this.set(t)}kn.prototype.set=function(e){return Ys(this.options,e),this};kn.prototype.configure=function(e){let t=this;if(Jf(e)){let n=e;if(e=mz[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};kn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};kn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};kn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};kn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};kn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};kn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};kn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Qs=kn;var kz=new yo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function Ez(e,t){if(e.isText&&t.isText&&ce.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var fy=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:ce.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks),s;o&&(s=Ez(o,i))?r[r.length-1]=s:r.push(i)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{s.openNode(i,Ga(o,l,a,u)),s.addText(H3(l.content)),s.closeNode()}:(n[r+"_open"]=(s,l,a,u)=>s.openNode(i,Ga(o,l,a,u)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=e.nodeType(o.node);n[r]=(s,l,a,u)=>s.addNode(i,Ga(o,l,a,u))}else if(o.mark){let i=e.marks[o.mark];cy(o,r)?n[r]=(s,l,a,u)=>{s.openMark(i.create(Ga(o,l,a,u))),s.addText(H3(l.content)),s.closeMark(i)}:(n[r+"_open"]=(s,l,a,u)=>s.openMark(i.create(Ga(o,l,a,u))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)cy(o,r)?n[r]=dy:(n[r+"_open"]=dy,n[r+"_close"]=dy);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var py=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=wz(t,r)}parse(t,n={}){let r=new fy(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function V3(e,t){for(;++t({tight:V3(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:V3(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),_z={open:"",close:"",mixable:!0},hy=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new Ya(this.nodes,this.marks,n);return r.renderContent(t),r.out}},Fn=new hy({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` `),e.text(t.textContent,!1),e.write(` `),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,i=>{let s=String(n+i);return e.repeat(" ",r-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return W3(n.child(r),-1)},close(e,t,n,r){return W3(n.child(r-1),1)},escape:!1}});function W3(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let i=o>0&&t>0?" `":"`";for(let s=0;s0&&t<0&&(i+=" "),i}function wz(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Ja=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` +`);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,r){return e.inAutolink=Sz(t,n,r),e.inAutolink?"<":"["},close(e,t,n,r){let{inAutolink:o}=e;return e.inAutolink=void 0,o?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return q3(n.child(r),-1)},close(e,t,n,r){return q3(n.child(r-1),1)},escape:!1}});function q3(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let i=o>0&&t>0?" `":"`";for(let s=0;s0&&t<0&&(i+=" "),i}function Sz(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Ya=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` `),t>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let o=1;othis.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,l,a)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(a+1==t.childCount)return!1;let b=t.child(a+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=g?s.withText(g):null,s||(u=r))}if(s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&(a==t.childCount-1||!m.isInSet(t.child(a+1).marks))})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(s.text);g&&(o=g,s=b?s.withText(b):null,s||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;mg?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(i),i(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((s,l,a)=>{a&&o&&this.flushClose(1),this.wrapBlock(n,r(a),t,()=>this.render(s,t,a))}),this.inTightList=i}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?Lz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,np=(e,t,n)=>(Pz(e,typeof t!="symbol"?t+"":t,n),n),Bz=ne.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;let l=r.getAttributes(s);return o.updateAttributes(s,{tight:t??!(l!=null&&l.tight)})}return e.options.listTypes.some(s=>i(s))}}}}}),Z3=Qs();function tN(e,t){return Z3.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new Z3.inline.State(e,null,null,[]).scanDelims(t,!0)}function nN(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function Fz(e,t,n,r){let o=n,i=e;for(;on&&!tN(i,o).can_close;)i=nN(i,t,o,-1),o--;return{text:i,from:n,to:o}}function Uz(e,t,n,r){let o={text:e,from:n,to:r};return o=Fz(o.text,t,o.from,o.to),o=zz(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function yy(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function $z(e){return e?.replace(//g,">")}function Hz(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function qz(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var op=Q.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(Vz(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function Vz(e,t){let n=e.type.schema,r=Bs(A.from(e),n);return e.isBlock&&(t instanceof A||t.type.name===n.topNodeType.name)?Wz(r):r}function Wz(e){let n=yy(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` +`)}render(t,n,r){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,r,o)=>this.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,l,a)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(g=>{if(a+1==t.childCount)return!1;let b=t.child(a+1);return g.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",s&&s.isText&&u.some(g=>{let b=this.getMark(g.type.name);return b&&b.expelEnclosingWhitespace&&!g.isInSet(r)})){let[g,b,m]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=m?s.withText(m):null,s||(u=r))}if(s&&s.isText&&u.some(g=>{let b=this.getMark(g.type.name);return b&&b.expelEnclosingWhitespace&&(a==t.childCount-1||!g.isInSet(t.child(a+1).marks))})){let[g,b,m]=/^(.*?)(\s*)$/m.exec(s.text);m&&(o=m,s=b?s.withText(b):null,s||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let g=0;gm?u=u.slice(0,m).concat(b).concat(u.slice(m,g)).concat(u.slice(g+1,p)):m>g&&(u=u.slice(0,g).concat(u.slice(g+1,m)).concat(b).concat(u.slice(m,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(i),i(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((s,l,a)=>{a&&o&&this.flushClose(1),this.wrapBlock(n,r(a),t,()=>this.render(s,t,a))}),this.inTightList=i}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?Bz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rp=(e,t,n)=>(Fz(e,typeof t!="symbol"?t+"":t,n),n),zz=ne.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;let l=r.getAttributes(s);return o.updateAttributes(s,{tight:t??!(l!=null&&l.tight)})}return e.options.listTypes.some(s=>i(s))}}}}}),J3=Qs();function eN(e,t){return J3.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new J3.inline.State(e,null,null,[]).scanDelims(t,!0)}function tN(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function Uz(e,t,n,r){let o=n,i=e;for(;on&&!eN(i,o).can_close;)i=tN(i,t,o,-1),o--;return{text:i,from:n,to:o}}function Hz(e,t,n,r){let o={text:e,from:n,to:r};return o=Uz(o.text,t,o.from,o.to),o=$z(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function vy(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Vz(e){return e?.replace(//g,">")}function qz(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function Wz(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var ip=Q.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(jz(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function jz(e,t){let n=e.type.schema,r=Bs(T.from(e),n);return e.isBlock&&(t instanceof T||t.type.name===n.topNodeType.name)?Kz(r):r}function Kz(e){let n=vy(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` ${n.innerHTML} `:` -`,n.outerHTML}var jz=Q.create({name:"blockquote"}),Kz=jz.extend({addStorage(){return{markdown:{serialize:Fn.nodes.blockquote,parse:{}}}}}),Gz=Q.create({name:"bulletList"}),oN=Gz.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),Jz=Q.create({name:"codeBlock"}),Yz=Jz.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` -`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),Zz=Q.create({name:"hardBreak"}),iN=Zz.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var a7=s7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,i=String(o+t.childCount-1).length,s=e.repeat(" ",i+2),a=l7(t,n,r)%2?") ":". ";e.renderList(t,s,u=>{let c=String(o+u);return e.repeat(" ",i-c.length)+c+a})},parse:{}}}}}),u7=Q.create({name:"paragraph"}),c7=u7.extend({addStorage(){return{markdown:{serialize:Fn.nodes.paragraph,parse:{}}}}});function hy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var d7=Q.create({name:"table"}),f7=d7.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!p7(t)){op.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,i)=>{if(e.write("| "),r.forEach((s,l,a)=>{a&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!i){let s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function Q3(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function p7(e){let t=hy(e),n=t[0],r=t.slice(1);return!(hy(n).some(o=>o.type.name!=="tableHeader"||Q3(o)||o.childCount>1)||r.some(o=>hy(o).some(i=>i.type.name==="tableHeader"||Q3(i)||i.childCount>1)))}var h7=Q.create({name:"taskItem"}),m7=h7.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),g7=Q.create({name:"taskList"}),b7=g7.extend({addStorage(){return{markdown:{serialize:oN.storage.markdown.serialize,parse:{setup(e){e.use(eN.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),y7=Q.create({name:"text"}),x7=y7.extend({addStorage(){return{markdown:{serialize(e,t){e.text($z(t.text))},parse:{}}}}}),v7=Ge.create({name:"bold"}),k7=v7.extend({addStorage(){return{markdown:{serialize:Fn.marks.strong,parse:{}}}}}),E7=Ge.create({name:"code"}),w7=E7.extend({addStorage(){return{markdown:{serialize:Fn.marks.code,parse:{}}}}}),_7=Ge.create({name:"italic"}),S7=_7.extend({addStorage(){return{markdown:{serialize:Fn.marks.em,parse:{}}}}}),C7=Ge.create({name:"link"}),T7=C7.extend({addStorage(){return{markdown:{serialize:Fn.marks.link,parse:{}}}}}),A7=Ge.create({name:"strike"}),N7=A7.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),M7=[Kz,oN,Yz,iN,Qz,t7,op,r7,i7,a7,c7,f7,m7,b7,x7,k7,w7,rN,S7,T7,N7];function rp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=M7.find(i=>i.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var gy=class{constructor(t){np(this,"editor",null),this.editor=t}serialize(t){let n=new my(this.nodes,this.marks,{hardBreakNodeName:iN.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(op)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(rN)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=rp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=rp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},by=class{constructor(t,n){np(this,"editor",null),np(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=t,this.md=this.withPatchedRenderer(Qs({html:r,linkify:o,breaks:i}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=rp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});let r=this.md.render(t),o=yy(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=rp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&Hz(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,l;let a=t.firstElementChild,{nextElementSibling:u}=a,c=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",d=u?"":(s=(l=n.match(/\s+$/))===null||l===void 0?void 0:l[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){a.innerHTML=`${a.innerHTML}${d}`;return}qz(a),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` +`,n.outerHTML}var Gz=Q.create({name:"blockquote"}),Yz=Gz.extend({addStorage(){return{markdown:{serialize:Fn.nodes.blockquote,parse:{}}}}}),Jz=Q.create({name:"bulletList"}),rN=Jz.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),Zz=Q.create({name:"codeBlock"}),Xz=Zz.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` +`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),Qz=Q.create({name:"hardBreak"}),oN=Qz.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var c7=a7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,i=String(o+t.childCount-1).length,s=e.repeat(" ",i+2),a=u7(t,n,r)%2?") ":". ";e.renderList(t,s,u=>{let c=String(o+u);return e.repeat(" ",i-c.length)+c+a})},parse:{}}}}}),d7=Q.create({name:"paragraph"}),f7=d7.extend({addStorage(){return{markdown:{serialize:Fn.nodes.paragraph,parse:{}}}}});function gy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var p7=Q.create({name:"table"}),h7=p7.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!m7(t)){ip.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,i)=>{if(e.write("| "),r.forEach((s,l,a)=>{a&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!i){let s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function X3(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function m7(e){let t=gy(e),n=t[0],r=t.slice(1);return!(gy(n).some(o=>o.type.name!=="tableHeader"||X3(o)||o.childCount>1)||r.some(o=>gy(o).some(i=>i.type.name==="tableHeader"||X3(i)||i.childCount>1)))}var g7=Q.create({name:"taskItem"}),b7=g7.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),y7=Q.create({name:"taskList"}),x7=y7.extend({addStorage(){return{markdown:{serialize:rN.storage.markdown.serialize,parse:{setup(e){e.use(Q3.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),v7=Q.create({name:"text"}),k7=v7.extend({addStorage(){return{markdown:{serialize(e,t){e.text(Vz(t.text))},parse:{}}}}}),E7=Ge.create({name:"bold"}),w7=E7.extend({addStorage(){return{markdown:{serialize:Fn.marks.strong,parse:{}}}}}),_7=Ge.create({name:"code"}),S7=_7.extend({addStorage(){return{markdown:{serialize:Fn.marks.code,parse:{}}}}}),C7=Ge.create({name:"italic"}),A7=C7.extend({addStorage(){return{markdown:{serialize:Fn.marks.em,parse:{}}}}}),T7=Ge.create({name:"link"}),N7=T7.extend({addStorage(){return{markdown:{serialize:Fn.marks.link,parse:{}}}}}),M7=Ge.create({name:"strike"}),O7=M7.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),R7=[Yz,rN,Xz,oN,t7,r7,ip,i7,l7,c7,f7,h7,b7,x7,k7,w7,S7,nN,A7,N7,O7];function op(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=R7.find(i=>i.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var yy=class{constructor(t){rp(this,"editor",null),this.editor=t}serialize(t){let n=new by(this.nodes,this.marks,{hardBreakNodeName:oN.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(ip)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(nN)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=op(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=op(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},xy=class{constructor(t,n){rp(this,"editor",null),rp(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=t,this.md=this.withPatchedRenderer(Qs({html:r,linkify:o,breaks:i}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=op(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});let r=this.md.render(t),o=vy(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=op(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&qz(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,l;let a=t.firstElementChild,{nextElementSibling:u}=a,c=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",d=u?"":(s=(l=n.match(/\s+$/))===null||l===void 0?void 0:l[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){a.innerHTML=`${a.innerHTML}${d}`;return}Wz(a),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` `?o:o[o.length-1]===` -`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},O7=ne.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new q({key:new Y("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return fn.fromSchema(this.editor.schema).parseSlice(yy(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),sN=ne.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=Fg.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new by(this.editor,this.options),serializer:new gy(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[Bz.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),O7.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var Pi=j(Be());var xy=["top","right","bottom","left"],lN=["start","end"],vy=xy.reduce((e,t)=>e.concat(t,t+"-"+lN[0],t+"-"+lN[1]),[]),En=Math.min,dt=Math.max,Xa=Math.round;var zn=e=>({x:e,y:e}),R7={left:"right",right:"left",bottom:"top",top:"bottom"},D7={start:"end",end:"start"};function ip(e,t,n){return dt(e,En(t,n))}function ur(e,t){return typeof e=="function"?e(t):e}function nn(e){return e.split("-")[0]}function wn(e){return e.split("-")[1]}function ky(e){return e==="x"?"y":"x"}function sp(e){return e==="y"?"height":"width"}var I7=new Set(["top","bottom"]);function Un(e){return I7.has(nn(e))?"y":"x"}function lp(e){return ky(Un(e))}function Ey(e,t,n){n===void 0&&(n=!1);let r=wn(e),o=lp(e),i=sp(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Za(s)),[s,Za(s)]}function cN(e){let t=Za(e);return[Ya(e),t,Ya(t)]}function Ya(e){return e.replace(/start|end/g,t=>D7[t])}var aN=["left","right"],uN=["right","left"],L7=["top","bottom"],P7=["bottom","top"];function B7(e,t,n){switch(e){case"top":case"bottom":return n?t?uN:aN:t?aN:uN;case"left":case"right":return t?L7:P7;default:return[]}}function dN(e,t,n,r){let o=wn(e),i=B7(nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ya)))),i}function Za(e){return e.replace(/left|right|bottom|top/g,t=>R7[t])}function F7(e){return{top:0,right:0,bottom:0,left:0,...e}}function ap(e){return typeof e!="number"?F7(e):{top:e,right:e,bottom:e,left:e}}function qr(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function fN(e,t,n){let{reference:r,floating:o}=e,i=Un(t),s=lp(t),l=sp(s),a=nn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2,p;switch(a){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wn(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}var mN=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=fN(u,r,a),f=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:c=0}=ur(e,t)||{};if(u==null)return{};let d=ap(c),f={x:n,y:r},p=lp(o),h=sp(p),m=await s.getDimensions(u),b=p==="y",g=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",v=i.reference[h]+i.reference[p]-f[p]-i.floating[h],k=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),w=E?E[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(E)))&&(w=l.floating[x]||i.floating[h]);let _=v/2-k/2,T=w/2-m[h]/2-1,C=En(d[g],T),F=En(d[y],T),N=C,X=w-m[h]-F,z=w/2-m[h]/2+_,I=ip(N,z,X),S=!a.arrow&&wn(o)!=null&&z!==I&&i.reference[h]/2-(zwn(o)===e),...n.filter(o=>wn(o)!==e)]:n.filter(o=>nn(o)===o)).filter(o=>e?wn(o)===e||(t?Ya(o)!==o:!1):!0)}var bN=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:i,middlewareData:s,placement:l,platform:a,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=vy,autoAlignment:p=!0,...h}=ur(e,t),m=d!==void 0||f===vy?z7(d||null,p,f):f,b=await Ri(t,h),g=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[g];if(y==null)return{};let x=Ey(y,i,await(a.isRTL==null?void 0:a.isRTL(u.floating)));if(l!==y)return{reset:{placement:m[0]}};let v=[b[nn(y)],b[x[0]],b[x[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:v}],E=m[g+1];if(E)return{data:{index:g+1,overflows:k},reset:{placement:E}};let w=k.map(C=>{let F=wn(C.placement);return[C.placement,F&&c?C.overflows.slice(0,2).reduce((N,X)=>N+X,0):C.overflows[0],C.overflows]}).sort((C,F)=>C[1]-F[1]),T=((o=w.filter(C=>C[2].slice(0,wn(C[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return T!==l?{data:{index:g+1,overflows:k},reset:{placement:T}}:{}}}},yN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=ur(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nn(o),y=Un(l),x=nn(l)===l,v=await(a.isRTL==null?void 0:a.isRTL(u.floating)),k=f||(x||!m?[Za(l)]:cN(l)),E=h!=="none";!f&&E&&k.push(...dN(l,m,h,v));let w=[l,...k],_=await Ri(t,b),T=[],C=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(_[g]),d){let z=Ey(o,s,v);T.push(_[z[0]],_[z[1]])}if(C=[...C,{placement:o,overflows:T}],!T.every(z=>z<=0)){var F,N;let z=(((F=i.flip)==null?void 0:F.index)||0)+1,I=w[z];if(I&&(!(d==="alignment"?y!==Un(I):!1)||C.every(L=>Un(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:z,overflows:C},reset:{placement:I}};let S=(N=C.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:N.placement;if(!S)switch(p){case"bestFit":{var X;let M=(X=C.filter(L=>{if(E){let J=Un(L.placement);return J===y||J==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(J=>J>0).reduce((J,oe)=>J+oe,0)]).sort((L,J)=>L[1]-J[1])[0])==null?void 0:X[0];M&&(S=M);break}case"initialPlacement":S=l;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function pN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hN(e){return xy.some(t=>e[t]>=0)}var xN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=ur(e,t);switch(r){case"referenceHidden":{let i=await Ri(t,{...o,elementContext:"reference"}),s=pN(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:hN(s)}}}case"escaped":{let i=await Ri(t,{...o,altBoundary:!0}),s=pN(i,n.floating);return{data:{escapedOffsets:s,escaped:hN(s)}}}default:return{}}}}};function vN(e){let t=En(...e.map(i=>i.left)),n=En(...e.map(i=>i.top)),r=dt(...e.map(i=>i.right)),o=dt(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function U7(e){let t=e.slice().sort((o,i)=>o.y-i.y),n=[],r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>qr(vN(o)))}var kN=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:l=2,x:a,y:u}=ur(e,t),c=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),d=U7(c),f=qr(vN(c)),p=ap(l);function h(){if(d.length===2&&d[0].left>d[1].right&&a!=null&&u!=null)return d.find(b=>a>b.left-p.left&&ab.top-p.top&&u=2){if(Un(n)==="y"){let C=d[0],F=d[d.length-1],N=nn(n)==="top",X=C.top,z=F.bottom,I=N?C.left:F.left,S=N?C.right:F.right,M=S-I,L=z-X;return{top:X,bottom:z,left:I,right:S,width:M,height:L,x:I,y:X}}let b=nn(n)==="left",g=dt(...d.map(C=>C.right)),y=En(...d.map(C=>C.left)),x=d.filter(C=>b?C.left===y:C.right===g),v=x[0].top,k=x[x.length-1].bottom,E=y,w=g,_=w-E,T=k-v;return{top:v,bottom:k,left:E,right:w,width:_,height:T,x:E,y:v}}return f}let m=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},$7=new Set(["left","top"]);async function H7(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=nn(n),l=wn(n),a=Un(n)==="y",u=$7.has(s)?-1:1,c=i&&a?-1:1,d=ur(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var EN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:l}=t,a=await H7(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},wN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...a}=ur(e,t),u={x:n,y:r},c=await Ri(t,a),d=Un(nn(o)),f=ky(d),p=u[f],h=u[d];if(i){let b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[b],x=p-c[g];p=ip(y,p,x)}if(s){let b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+c[b],x=h-c[g];h=ip(y,h,x)}let m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}};var _N=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=ur(e,t),c=await Ri(t,u),d=nn(o),f=wn(o),p=Un(o)==="y",{width:h,height:m}=i.floating,b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");let y=m-c.top-c.bottom,x=h-c.left-c.right,v=En(m-c[b],y),k=En(h-c[g],x),E=!t.middlewareData.shift,w=v,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=y),E&&!f){let C=dt(c.left,0),F=dt(c.right,0),N=dt(c.top,0),X=dt(c.bottom,0);p?_=h-2*(C!==0||F!==0?C+F:dt(c.left,c.right)):w=m-2*(N!==0||X!==0?N+X:dt(c.top,c.bottom))}await a({...t,availableWidth:_,availableHeight:w});let T=await s.getDimensions(l.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function cp(){return typeof window<"u"}function Di(e){return CN(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(CN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CN(e){return cp()?e instanceof Node||e instanceof Wt(e).Node:!1}function _n(e){return cp()?e instanceof Element||e instanceof Wt(e).Element:!1}function $n(e){return cp()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function SN(e){return!cp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}var q7=new Set(["inline","contents"]);function el(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!q7.has(o)}var V7=new Set(["table","td","th"]);function TN(e){return V7.has(Di(e))}var W7=[":popover-open",":modal"];function Qa(e){return W7.some(t=>{try{return e.matches(t)}catch{return!1}})}var j7=["transform","translate","scale","rotate","perspective"],K7=["transform","translate","scale","rotate","perspective","filter"],G7=["paint","layout","strict","content"];function dp(e){let t=fp(),n=_n(e)?Sn(e):e;return j7.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||K7.some(r=>(n.willChange||"").includes(r))||G7.some(r=>(n.contain||"").includes(r))}function AN(e){let t=Vr(e);for(;$n(t)&&!Ii(t);){if(dp(t))return t;if(Qa(t))return null;t=Vr(t)}return null}function fp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var J7=new Set(["html","body","#document"]);function Ii(e){return J7.has(Di(e))}function Sn(e){return Wt(e).getComputedStyle(e)}function eu(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vr(e){if(Di(e)==="html")return e;let t=e.assignedSlot||e.parentNode||SN(e)&&e.host||cr(e);return SN(t)?t.host:t}function NN(e){let t=Vr(e);return Ii(t)?e.ownerDocument?e.ownerDocument.body:e.body:$n(t)&&el(t)?t:NN(t)}function up(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=NN(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){let l=pp(s);return t.concat(s,s.visualViewport||[],el(o)?o:[],l&&n?up(l):[])}return t.concat(o,up(o,[],n))}function pp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DN(e){let t=Sn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=$n(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=Xa(n)!==i||Xa(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function IN(e){return _n(e)?e:e.contextElement}function tl(e){let t=IN(e);if(!$n(t))return zn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=DN(t),s=(i?Xa(n.width):n.width)/r,l=(i?Xa(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Y7=zn(0);function LN(e){let t=Wt(e);return!fp()||!t.visualViewport?Y7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Z7(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function tu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=IN(e),s=zn(1);t&&(r?_n(r)&&(s=tl(r)):s=tl(e));let l=Z7(i,n,r)?LN(i):zn(0),a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){let f=Wt(i),p=r&&_n(r)?Wt(r):r,h=f,m=pp(h);for(;m&&r&&p!==h;){let b=tl(m),g=m.getBoundingClientRect(),y=Sn(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,v=g.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,u*=b.y,c*=b.x,d*=b.y,a+=x,u+=v,h=Wt(m),m=pp(h)}}return qr({width:c,height:d,x:a,y:u})}function hp(e,t){let n=eu(e).scrollLeft;return t?t.left+n:tu(cr(e)).left+n}function PN(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hp(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function X7(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=cr(r),l=t?Qa(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=zn(1),c=zn(0),d=$n(r);if((d||!d&&!i)&&((Di(r)!=="body"||el(s))&&(a=eu(r)),$n(r))){let p=tu(r);u=tl(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!i?PN(s,a):zn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}}function Q7(e){return Array.from(e.getClientRects())}function eU(e){let t=cr(e),n=eu(e),r=e.ownerDocument.body,o=dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+hp(e),l=-n.scrollTop;return Sn(r).direction==="rtl"&&(s+=dt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}var MN=25;function tU(e,t){let n=Wt(e),r=cr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;let c=fp();(!c||c&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}let u=hp(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=MN&&(i-=h)}else u<=MN&&(i+=u);return{width:i,height:s,x:l,y:a}}var nU=new Set(["absolute","fixed"]);function rU(e,t){let n=tu(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=$n(e)?tl(e):zn(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function ON(e,t,n){let r;if(t==="viewport")r=tU(e,n);else if(t==="document")r=eU(cr(e));else if(_n(t))r=rU(t,n);else{let o=LN(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qr(r)}function BN(e,t){let n=Vr(e);return n===t||!_n(n)||Ii(n)?!1:Sn(n).position==="fixed"||BN(n,t)}function oU(e,t){let n=t.get(e);if(n)return n;let r=up(e,[],!1).filter(l=>_n(l)&&Di(l)!=="body"),o=null,i=Sn(e).position==="fixed",s=i?Vr(e):e;for(;_n(s)&&!Ii(s);){let l=Sn(s),a=dp(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&nU.has(o.position)||el(s)&&!a&&BN(e,s))?r=r.filter(c=>c!==s):o=l,s=Vr(s)}return t.set(e,r),r}function iU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Qa(t)?[]:oU(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{let d=ON(t,c,o);return u.top=dt(d.top,u.top),u.right=En(d.right,u.right),u.bottom=En(d.bottom,u.bottom),u.left=dt(d.left,u.left),u},ON(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function sU(e){let{width:t,height:n}=DN(e);return{width:t,height:n}}function lU(e,t,n){let r=$n(t),o=cr(t),i=n==="fixed",s=tu(e,!0,i,t),l={scrollLeft:0,scrollTop:0},a=zn(0);function u(){a.x=hp(o)}if(r||!r&&!i)if((Di(t)!=="body"||el(o))&&(l=eu(t)),r){let p=tu(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();let c=o&&!r&&!i?PN(o,l):zn(0),d=s.left+l.scrollLeft-a.x-c.x,f=s.top+l.scrollTop-a.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function wy(e){return Sn(e).position==="static"}function RN(e,t){if(!$n(e)||Sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cr(e)===n&&(n=n.ownerDocument.body),n}function FN(e,t){let n=Wt(e);if(Qa(e))return n;if(!$n(e)){let o=Vr(e);for(;o&&!Ii(o);){if(_n(o)&&!wy(o))return o;o=Vr(o)}return n}let r=RN(e,t);for(;r&&TN(r)&&wy(r);)r=RN(r,t);return r&&Ii(r)&&wy(r)&&!dp(r)?n:r||AN(e)||n}var aU=async function(e){let t=this.getOffsetParent||FN,n=this.getDimensions,r=await n(e.floating);return{reference:lU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uU(e){return Sn(e).direction==="rtl"}var cU={convertOffsetParentRelativeRectToViewportRelativeRect:X7,getDocumentElement:cr,getClippingRect:iU,getOffsetParent:FN,getElementRects:aU,getClientRects:Q7,getDimensions:sU,getScale:tl,isElement:_n,isRTL:uU};var mp=EN,gp=bN,bp=wN,yp=yN,xp=_N,vp=xN,kp=gN,Ep=kN;var wp=(e,t,n)=>{let r=new Map,o={platform:cU,...n},i={...o.platform,_c:r};return mN(e,t,{...o,platform:i})};function dU(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-o,l=r-n,a=o,u=n;return new DOMRect(a,u,s,l)}var fU=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:i,appendTo:s,getReferencedVirtualElement:l,options:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:m}=d,{empty:b}=m,g=!h.textBetween(f,p).length&&bd(d.selection),y=this.element.contains(document.activeElement);return!(!(c.hasFocus()||y)||b||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=s,this.scrollTarget=(u=a?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...a},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(yp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(bp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(mp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(kp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(xp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(gp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(vp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Ep(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=Sd(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof $){let i=this.view.nodeDOM(t.from),s=i.dataset.nodeViewWrapper?i:i.querySelector("[data-node-view-wrapper]");s&&(i=s),i&&(o={getBoundingClientRect:()=>i.getBoundingClientRect(),getClientRects:()=>[i.getBoundingClientRect()]})}if(t instanceof me){let{$anchorCell:i,$headCell:s}=t,l=i?i.pos:s.pos,a=s?s.pos:i.pos,u=this.view.nodeDOM(l),c=this.view.nodeDOM(a);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():dU(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&wp(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),i=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,i,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:i,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},_y=e=>new q({key:typeof e.pluginKey=="string"?new Y(e.pluginKey):e.pluginKey,view:t=>new fU({view:t,...e})}),PX=ne.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[_y({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Li=j(Be(),1),zN=j(ys(),1),UN=j(pe(),1);var pU=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:i}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:s,state:l})=>{let{selection:a}=l,{$anchor:u,empty:c}=a,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(s,l,a,u)=>{let{composing:c}=s;if(c||!l&&!a)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&((l=this.element.parentNode)!=null&&l.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Ig(e,{textSerializers:Ed(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(yp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(bp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(mp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(kp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(xp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(gp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(vp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Ep(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:i,to:s})}updatePosition(){let{selection:e}=this.editor.state,t=Sd(this.view,e.from,e.to);wp({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:i})=>{this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Sy=e=>new q({key:typeof e.pluginKey=="string"?new Y(e.pluginKey):e.pluginKey,view:t=>new pU({view:t,...e})}),qX=ne.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Sy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var nl=j(Be(),1),HN=j(ys(),1),qN=j(pe(),1),$N=Li.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:i=null,getReferencedVirtualElement:s,options:l,children:a,...u},c)=>{let d=(0,Li.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=Od(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:i,getReferencedVirtualElement:s,options:l},m=(0,Li.useRef)(h);return m.current=h,(0,Li.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let g=_y({...m.current,editor:p,element:b});p.registerPlugin(g);let y=m.current.pluginKey;return()=>{p.unregisterPlugin(y),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,zN.createPortal)((0,UN.jsx)("div",{...u,children:a}),d.current)}),YX=nl.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:i,...s},l)=>{let a=(0,nl.useRef)(document.createElement("div"));typeof l=="function"?l(a.current):l&&(l.current=a.current);let{editor:u}=Od();return(0,nl.useEffect)(()=>{let c=a.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=Sy({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,HN.createPortal)((0,qN.jsx)("div",{...s,children:i}),a.current)});var VN=document.createElement("style");VN.textContent=`/* Floating toolbar container */ +`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},D7=ne.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new V({key:new J("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return fn.fromSchema(this.editor.schema).parseSlice(vy(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),iN=ne.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=zg.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new xy(this.editor,this.options),serializer:new yy(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[zz.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),D7.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var Pi=j(Be());var ky=["top","right","bottom","left"],sN=["start","end"],Ey=ky.reduce((e,t)=>e.concat(t,t+"-"+sN[0],t+"-"+sN[1]),[]),En=Math.min,dt=Math.max,Xa=Math.round;var zn=e=>({x:e,y:e}),I7={left:"right",right:"left",bottom:"top",top:"bottom"},L7={start:"end",end:"start"};function sp(e,t,n){return dt(e,En(t,n))}function ur(e,t){return typeof e=="function"?e(t):e}function nn(e){return e.split("-")[0]}function wn(e){return e.split("-")[1]}function wy(e){return e==="x"?"y":"x"}function lp(e){return e==="y"?"height":"width"}var P7=new Set(["top","bottom"]);function Un(e){return P7.has(nn(e))?"y":"x"}function ap(e){return wy(Un(e))}function _y(e,t,n){n===void 0&&(n=!1);let r=wn(e),o=ap(e),i=lp(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Za(s)),[s,Za(s)]}function uN(e){let t=Za(e);return[Ja(e),t,Ja(t)]}function Ja(e){return e.replace(/start|end/g,t=>L7[t])}var lN=["left","right"],aN=["right","left"],B7=["top","bottom"],F7=["bottom","top"];function z7(e,t,n){switch(e){case"top":case"bottom":return n?t?aN:lN:t?lN:aN;case"left":case"right":return t?B7:F7;default:return[]}}function cN(e,t,n,r){let o=wn(e),i=z7(nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ja)))),i}function Za(e){return e.replace(/left|right|bottom|top/g,t=>I7[t])}function U7(e){return{top:0,right:0,bottom:0,left:0,...e}}function up(e){return typeof e!="number"?U7(e):{top:e,right:e,bottom:e,left:e}}function Vr(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function dN(e,t,n){let{reference:r,floating:o}=e,i=Un(t),s=ap(t),l=lp(s),a=nn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2,p;switch(a){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wn(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}var hN=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=dN(u,r,a),f=r,p={},h=0;for(let g=0;g({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:c=0}=ur(e,t)||{};if(u==null)return{};let d=up(c),f={x:n,y:r},p=ap(o),h=lp(p),g=await s.getDimensions(u),b=p==="y",m=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",v=i.reference[h]+i.reference[p]-f[p]-i.floating[h],k=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),w=E?E[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(E)))&&(w=l.floating[x]||i.floating[h]);let _=v/2-k/2,A=w/2-g[h]/2-1,C=En(d[m],A),F=En(d[y],A),N=C,X=w-g[h]-F,z=w/2-g[h]/2+_,I=sp(N,z,X),S=!a.arrow&&wn(o)!=null&&z!==I&&i.reference[h]/2-(zwn(o)===e),...n.filter(o=>wn(o)!==e)]:n.filter(o=>nn(o)===o)).filter(o=>e?wn(o)===e||(t?Ja(o)!==o:!1):!0)}var gN=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:i,middlewareData:s,placement:l,platform:a,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=Ey,autoAlignment:p=!0,...h}=ur(e,t),g=d!==void 0||f===Ey?$7(d||null,p,f):f,b=await Ri(t,h),m=((n=s.autoPlacement)==null?void 0:n.index)||0,y=g[m];if(y==null)return{};let x=_y(y,i,await(a.isRTL==null?void 0:a.isRTL(u.floating)));if(l!==y)return{reset:{placement:g[0]}};let v=[b[nn(y)],b[x[0]],b[x[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:v}],E=g[m+1];if(E)return{data:{index:m+1,overflows:k},reset:{placement:E}};let w=k.map(C=>{let F=wn(C.placement);return[C.placement,F&&c?C.overflows.slice(0,2).reduce((N,X)=>N+X,0):C.overflows[0],C.overflows]}).sort((C,F)=>C[1]-F[1]),A=((o=w.filter(C=>C[2].slice(0,wn(C[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return A!==l?{data:{index:m+1,overflows:k},reset:{placement:A}}:{}}}},bN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=ur(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let m=nn(o),y=Un(l),x=nn(l)===l,v=await(a.isRTL==null?void 0:a.isRTL(u.floating)),k=f||(x||!g?[Za(l)]:uN(l)),E=h!=="none";!f&&E&&k.push(...cN(l,g,h,v));let w=[l,...k],_=await Ri(t,b),A=[],C=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&A.push(_[m]),d){let z=_y(o,s,v);A.push(_[z[0]],_[z[1]])}if(C=[...C,{placement:o,overflows:A}],!A.every(z=>z<=0)){var F,N;let z=(((F=i.flip)==null?void 0:F.index)||0)+1,I=w[z];if(I&&(!(d==="alignment"?y!==Un(I):!1)||C.every(L=>Un(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:z,overflows:C},reset:{placement:I}};let S=(N=C.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:N.placement;if(!S)switch(p){case"bestFit":{var X;let M=(X=C.filter(L=>{if(E){let Y=Un(L.placement);return Y===y||Y==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Y=>Y>0).reduce((Y,oe)=>Y+oe,0)]).sort((L,Y)=>L[1]-Y[1])[0])==null?void 0:X[0];M&&(S=M);break}case"initialPlacement":S=l;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function fN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pN(e){return ky.some(t=>e[t]>=0)}var yN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=ur(e,t);switch(r){case"referenceHidden":{let i=await Ri(t,{...o,elementContext:"reference"}),s=fN(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pN(s)}}}case"escaped":{let i=await Ri(t,{...o,altBoundary:!0}),s=fN(i,n.floating);return{data:{escapedOffsets:s,escaped:pN(s)}}}default:return{}}}}};function xN(e){let t=En(...e.map(i=>i.left)),n=En(...e.map(i=>i.top)),r=dt(...e.map(i=>i.right)),o=dt(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function H7(e){let t=e.slice().sort((o,i)=>o.y-i.y),n=[],r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>Vr(xN(o)))}var vN=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:l=2,x:a,y:u}=ur(e,t),c=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),d=H7(c),f=Vr(xN(c)),p=up(l);function h(){if(d.length===2&&d[0].left>d[1].right&&a!=null&&u!=null)return d.find(b=>a>b.left-p.left&&ab.top-p.top&&u=2){if(Un(n)==="y"){let C=d[0],F=d[d.length-1],N=nn(n)==="top",X=C.top,z=F.bottom,I=N?C.left:F.left,S=N?C.right:F.right,M=S-I,L=z-X;return{top:X,bottom:z,left:I,right:S,width:M,height:L,x:I,y:X}}let b=nn(n)==="left",m=dt(...d.map(C=>C.right)),y=En(...d.map(C=>C.left)),x=d.filter(C=>b?C.left===y:C.right===m),v=x[0].top,k=x[x.length-1].bottom,E=y,w=m,_=w-E,A=k-v;return{top:v,bottom:k,left:E,right:w,width:_,height:A,x:E,y:v}}return f}let g=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});return o.reference.x!==g.reference.x||o.reference.y!==g.reference.y||o.reference.width!==g.reference.width||o.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},V7=new Set(["left","top"]);async function q7(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=nn(n),l=wn(n),a=Un(n)==="y",u=V7.has(s)?-1:1,c=i&&a?-1:1,d=ur(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var kN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:l}=t,a=await q7(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},EN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:m,y}=b;return{x:m,y}}},...a}=ur(e,t),u={x:n,y:r},c=await Ri(t,a),d=Un(nn(o)),f=wy(d),p=u[f],h=u[d];if(i){let b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=p+c[b],x=p-c[m];p=sp(y,p,x)}if(s){let b=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=h+c[b],x=h-c[m];h=sp(y,h,x)}let g=l.fn({...t,[f]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:s}}}}}};var wN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=ur(e,t),c=await Ri(t,u),d=nn(o),f=wn(o),p=Un(o)==="y",{width:h,height:g}=i.floating,b,m;d==="top"||d==="bottom"?(b=d,m=f===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(m=d,b=f==="end"?"top":"bottom");let y=g-c.top-c.bottom,x=h-c.left-c.right,v=En(g-c[b],y),k=En(h-c[m],x),E=!t.middlewareData.shift,w=v,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=y),E&&!f){let C=dt(c.left,0),F=dt(c.right,0),N=dt(c.top,0),X=dt(c.bottom,0);p?_=h-2*(C!==0||F!==0?C+F:dt(c.left,c.right)):w=g-2*(N!==0||X!==0?N+X:dt(c.top,c.bottom))}await a({...t,availableWidth:_,availableHeight:w});let A=await s.getDimensions(l.floating);return h!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function dp(){return typeof window<"u"}function Di(e){return SN(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(SN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SN(e){return dp()?e instanceof Node||e instanceof Wt(e).Node:!1}function _n(e){return dp()?e instanceof Element||e instanceof Wt(e).Element:!1}function $n(e){return dp()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function _N(e){return!dp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}var W7=new Set(["inline","contents"]);function el(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!W7.has(o)}var j7=new Set(["table","td","th"]);function CN(e){return j7.has(Di(e))}var K7=[":popover-open",":modal"];function Qa(e){return K7.some(t=>{try{return e.matches(t)}catch{return!1}})}var G7=["transform","translate","scale","rotate","perspective"],Y7=["transform","translate","scale","rotate","perspective","filter"],J7=["paint","layout","strict","content"];function fp(e){let t=pp(),n=_n(e)?Sn(e):e;return G7.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Y7.some(r=>(n.willChange||"").includes(r))||J7.some(r=>(n.contain||"").includes(r))}function AN(e){let t=qr(e);for(;$n(t)&&!Ii(t);){if(fp(t))return t;if(Qa(t))return null;t=qr(t)}return null}function pp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Z7=new Set(["html","body","#document"]);function Ii(e){return Z7.has(Di(e))}function Sn(e){return Wt(e).getComputedStyle(e)}function eu(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qr(e){if(Di(e)==="html")return e;let t=e.assignedSlot||e.parentNode||_N(e)&&e.host||cr(e);return _N(t)?t.host:t}function TN(e){let t=qr(e);return Ii(t)?e.ownerDocument?e.ownerDocument.body:e.body:$n(t)&&el(t)?t:TN(t)}function cp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=TN(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){let l=hp(s);return t.concat(s,s.visualViewport||[],el(o)?o:[],l&&n?cp(l):[])}return t.concat(o,cp(o,[],n))}function hp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RN(e){let t=Sn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=$n(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=Xa(n)!==i||Xa(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function DN(e){return _n(e)?e:e.contextElement}function tl(e){let t=DN(e);if(!$n(t))return zn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=RN(t),s=(i?Xa(n.width):n.width)/r,l=(i?Xa(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var X7=zn(0);function IN(e){let t=Wt(e);return!pp()||!t.visualViewport?X7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q7(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function tu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=DN(e),s=zn(1);t&&(r?_n(r)&&(s=tl(r)):s=tl(e));let l=Q7(i,n,r)?IN(i):zn(0),a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){let f=Wt(i),p=r&&_n(r)?Wt(r):r,h=f,g=hp(h);for(;g&&r&&p!==h;){let b=tl(g),m=g.getBoundingClientRect(),y=Sn(g),x=m.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,v=m.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,u*=b.y,c*=b.x,d*=b.y,a+=x,u+=v,h=Wt(g),g=hp(h)}}return Vr({width:c,height:d,x:a,y:u})}function mp(e,t){let n=eu(e).scrollLeft;return t?t.left+n:tu(cr(e)).left+n}function LN(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-mp(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function eU(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=cr(r),l=t?Qa(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=zn(1),c=zn(0),d=$n(r);if((d||!d&&!i)&&((Di(r)!=="body"||el(s))&&(a=eu(r)),$n(r))){let p=tu(r);u=tl(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!i?LN(s,a):zn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}}function tU(e){return Array.from(e.getClientRects())}function nU(e){let t=cr(e),n=eu(e),r=e.ownerDocument.body,o=dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+mp(e),l=-n.scrollTop;return Sn(r).direction==="rtl"&&(s+=dt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}var NN=25;function rU(e,t){let n=Wt(e),r=cr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;let c=pp();(!c||c&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}let u=mp(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=NN&&(i-=h)}else u<=NN&&(i+=u);return{width:i,height:s,x:l,y:a}}var oU=new Set(["absolute","fixed"]);function iU(e,t){let n=tu(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=$n(e)?tl(e):zn(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function MN(e,t,n){let r;if(t==="viewport")r=rU(e,n);else if(t==="document")r=nU(cr(e));else if(_n(t))r=iU(t,n);else{let o=IN(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vr(r)}function PN(e,t){let n=qr(e);return n===t||!_n(n)||Ii(n)?!1:Sn(n).position==="fixed"||PN(n,t)}function sU(e,t){let n=t.get(e);if(n)return n;let r=cp(e,[],!1).filter(l=>_n(l)&&Di(l)!=="body"),o=null,i=Sn(e).position==="fixed",s=i?qr(e):e;for(;_n(s)&&!Ii(s);){let l=Sn(s),a=fp(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&oU.has(o.position)||el(s)&&!a&&PN(e,s))?r=r.filter(c=>c!==s):o=l,s=qr(s)}return t.set(e,r),r}function lU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Qa(t)?[]:sU(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{let d=MN(t,c,o);return u.top=dt(d.top,u.top),u.right=En(d.right,u.right),u.bottom=En(d.bottom,u.bottom),u.left=dt(d.left,u.left),u},MN(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function aU(e){let{width:t,height:n}=RN(e);return{width:t,height:n}}function uU(e,t,n){let r=$n(t),o=cr(t),i=n==="fixed",s=tu(e,!0,i,t),l={scrollLeft:0,scrollTop:0},a=zn(0);function u(){a.x=mp(o)}if(r||!r&&!i)if((Di(t)!=="body"||el(o))&&(l=eu(t)),r){let p=tu(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();let c=o&&!r&&!i?LN(o,l):zn(0),d=s.left+l.scrollLeft-a.x-c.x,f=s.top+l.scrollTop-a.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function Sy(e){return Sn(e).position==="static"}function ON(e,t){if(!$n(e)||Sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cr(e)===n&&(n=n.ownerDocument.body),n}function BN(e,t){let n=Wt(e);if(Qa(e))return n;if(!$n(e)){let o=qr(e);for(;o&&!Ii(o);){if(_n(o)&&!Sy(o))return o;o=qr(o)}return n}let r=ON(e,t);for(;r&&CN(r)&&Sy(r);)r=ON(r,t);return r&&Ii(r)&&Sy(r)&&!fp(r)?n:r||AN(e)||n}var cU=async function(e){let t=this.getOffsetParent||BN,n=this.getDimensions,r=await n(e.floating);return{reference:uU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dU(e){return Sn(e).direction==="rtl"}var fU={convertOffsetParentRelativeRectToViewportRelativeRect:eU,getDocumentElement:cr,getClippingRect:lU,getOffsetParent:BN,getElementRects:cU,getClientRects:tU,getDimensions:aU,getScale:tl,isElement:_n,isRTL:dU};var gp=kN,bp=gN,yp=EN,xp=bN,vp=wN,kp=yN,Ep=mN,wp=vN;var _p=(e,t,n)=>{let r=new Map,o={platform:fU,...n},i={...o.platform,_c:r};return hN(e,t,{...o,platform:i})};function pU(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-o,l=r-n,a=o,u=n;return new DOMRect(a,u,s,l)}var hU=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:i,appendTo:s,getReferencedVirtualElement:l,options:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:g}=d,{empty:b}=g,m=!h.textBetween(f,p).length&&bd(d.selection),y=this.element.contains(document.activeElement);return!(!(c.hasFocus()||y)||b||m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=s,this.scrollTarget=(u=a?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...a},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(xp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(yp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(gp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Ep(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(vp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(bp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(kp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(wp(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=Sd(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof $){let i=this.view.nodeDOM(t.from),s=i.dataset.nodeViewWrapper?i:i.querySelector("[data-node-view-wrapper]");s&&(i=s),i&&(o={getBoundingClientRect:()=>i.getBoundingClientRect(),getClientRects:()=>[i.getBoundingClientRect()]})}if(t instanceof me){let{$anchorCell:i,$headCell:s}=t,l=i?i.pos:s.pos,a=s?s.pos:i.pos,u=this.view.nodeDOM(l),c=this.view.nodeDOM(a);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():pU(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&_p(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),i=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,i,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:i,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Cy=e=>new V({key:typeof e.pluginKey=="string"?new J(e.pluginKey):e.pluginKey,view:t=>new hU({view:t,...e})}),FX=ne.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Cy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Li=j(Be(),1),FN=j(ys(),1),zN=j(pe(),1);var mU=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:i}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:s,state:l})=>{let{selection:a}=l,{$anchor:u,empty:c}=a,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(s,l,a,u)=>{let{composing:c}=s;if(c||!l&&!a)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&((l=this.element.parentNode)!=null&&l.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Lg(e,{textSerializers:Ed(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(xp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(yp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(gp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Ep(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(vp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(bp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(kp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(wp(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:i,to:s})}updatePosition(){let{selection:e}=this.editor.state,t=Sd(this.view,e.from,e.to);_p({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:i})=>{this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Ay=e=>new V({key:typeof e.pluginKey=="string"?new J(e.pluginKey):e.pluginKey,view:t=>new mU({view:t,...e})}),WX=ne.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Ay({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var nl=j(Be(),1),$N=j(ys(),1),HN=j(pe(),1),UN=Li.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:i=null,getReferencedVirtualElement:s,options:l,children:a,...u},c)=>{let d=(0,Li.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=Rd(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:i,getReferencedVirtualElement:s,options:l},g=(0,Li.useRef)(h);return g.current=h,(0,Li.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let m=Cy({...g.current,editor:p,element:b});p.registerPlugin(m);let y=g.current.pluginKey;return()=>{p.unregisterPlugin(y),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,FN.createPortal)((0,zN.jsx)("div",{...u,children:a}),d.current)}),XX=nl.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:i,...s},l)=>{let a=(0,nl.useRef)(document.createElement("div"));typeof l=="function"?l(a.current):l&&(l.current=a.current);let{editor:u}=Rd();return(0,nl.useEffect)(()=>{let c=a.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=Ay({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,$N.createPortal)((0,HN.jsx)("div",{...s,children:i}),a.current)});var VN=document.createElement("style");VN.textContent=`/* Floating toolbar container */ .toolbar_FloatingToolbar { display: flex; align-items: center; @@ -483,7 +483,7 @@ ${n.innerHTML} .linkButton_FloatingToolbar:active { background-color: var(--vscode-toolbar-activeBackground, #4a4a4a); } -`;document.head.appendChild(VN);var Le={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var Z=j(pe()),Cy=({editor:e})=>{let[t,n]=(0,Pi.useState)(!1),[r,o]=(0,Pi.useState)(""),i=(0,Pi.useRef)(null),{isBold:s,isItalic:l,isStrike:a,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=qg({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,Pi.useEffect)(()=>{if(t&&i.current){let b=e.getAttributes("link").href||"";o(b),i.current.focus(),i.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},m=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,Z.jsx)($N,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:g})=>!(g.selection.empty||b.isActive("codeBlock")),children:(0,Z.jsx)("div",{className:Le.toolbar,children:t?(0,Z.jsxs)("form",{onSubmit:p,className:Le.linkForm,children:[(0,Z.jsx)("input",{ref:i,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Le.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,Z.jsx)("button",{type:"submit",className:Le.linkButton,title:"Apply",children:(0,Z.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Z.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,Z.jsx)("button",{type:"button",onClick:m,className:Le.linkButton,title:"Remove link",children:(0,Z.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Z.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,Z.jsx)("button",{type:"button",onClick:h,className:Le.linkButton,title:"Cancel",children:(0,Z.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Z.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Le.button} ${s?Le.active:""}`,title:"Bold (Cmd+B)",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,Z.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,Z.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Le.button} ${l?Le.active:""}`,title:"Italic (Cmd+I)",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,Z.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,Z.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Le.button} ${a?Le.active:""}`,title:"Strikethrough",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Z.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,Z.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,Z.jsx)("div",{className:Le.divider}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Le.button} ${u?Le.active:""}`,title:"Inline Code",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,Z.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Le.button} ${c?Le.active:""}`,title:"Link (Cmd+K)",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,Z.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,Z.jsx)("div",{className:Le.divider}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Le.button} ${d?Le.active:""}`,title:"Code Block",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,Z.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,Z.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Le.button} ${f?Le.active:""}`,title:"Quote",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,Z.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Pt=j(Be());function hU(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:l}=e,a=r&&!o,u=W_(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=o?"":u,p=a?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=l.nodeBefore)==null?void 0:t.isText)&&l.nodeBefore.text;if(!h)return null;let m=l.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let g=b.input.slice(Math.max(0,b.index-1),b.index),y=new RegExp(`^[${i?.join("")}\0]?$`).test(g);if(i!==null&&!y)return null;let x=m+b.index,v=x+b[0].length;return a&&c.test(h.slice(v-1,v+1))&&(b[0]+=" ",v+=1),x=l.pos?{range:{from:x,to:v},query:b[0].slice(n.length),text:b[0]}:null}var mU=new Y("suggestion");function gU({pluginKey:e=mU,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:l="span",decorationClass:a="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:m=hU}){let b,g=p?.(),y=()=>{let E=t.state.selection.$anchor.pos,w=t.view.coordsAtPos(E),{top:_,right:T,bottom:C,left:F}=w;try{return new DOMRect(F,_,T-F,C-_)}catch{return null}},x=(E,w)=>w?()=>{let _=e.getState(t.state),T=_?.decorationId,C=E.dom.querySelector(`[data-decoration-id="${T}"]`);return C?.getBoundingClientRect()||null}:y;function v(E,w){var _;try{let C=e.getState(E.state),F=C?.decorationId?E.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null,N={editor:t,range:C?.range||{from:0,to:0},query:C?.query||null,text:C?.text||null,items:[],command:X=>d({editor:t,range:C?.range||{from:0,to:0},props:X}),decorationNode:F,clientRect:x(E,F)};(_=g?.onExit)==null||_.call(g,N)}catch{}let T=E.state.tr.setMeta(w,{exit:!0});E.dispatch(T)}let k=new q({key:e,view(){return{update:async(E,w)=>{var _,T,C,F,N,X,z;let I=(_=this.key)==null?void 0:_.getState(w),S=(T=this.key)==null?void 0:T.getState(E.state),M=I.active&&S.active&&I.range.from!==S.range.from,L=!I.active&&S.active,J=I.active&&!S.active,oe=!L&&!J&&I.query!==S.query,fe=L||M&&oe,ge=oe||M,pt=J||M&&oe;if(!fe&&!ge&&!pt)return;let Pe=pt&&!fe?I:S,ht=E.dom.querySelector(`[data-decoration-id="${Pe.decorationId}"]`);b={editor:t,range:Pe.range,query:Pe.query,text:Pe.text,items:[],command:Gr=>d({editor:t,range:Pe.range,props:Gr}),decorationNode:ht,clientRect:x(E,ht)},fe&&((C=g?.onBeforeStart)==null||C.call(g,b)),ge&&((F=g?.onBeforeUpdate)==null||F.call(g,b)),(ge||fe)&&(b.items=await f({editor:t,query:Pe.query})),pt&&((N=g?.onExit)==null||N.call(g,b)),ge&&((X=g?.onUpdate)==null||X.call(g,b)),fe&&((z=g?.onStart)==null||z.call(g,b))},destroy:()=>{var E;b&&((E=g?.onExit)==null||E.call(g,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(E,w,_,T){let{isEditable:C}=t,{composing:F}=t.view,{selection:N}=E,{empty:X,from:z}=N,I={...w},S=E.getMeta(e);if(S&&S.exit)return I.active=!1,I.decorationId=null,I.range={from:0,to:0},I.query=null,I.text=null,I;if(I.composing=F,C&&(X||t.view.composing)){(zw.range.to)&&!F&&!w.composing&&(I.active=!1);let M=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:N.$from}),L=`id_${Math.floor(Math.random()*4294967295)}`;M&&h({editor:t,state:T,range:M.range,isActive:w.active})?(I.active=!0,I.decorationId=w.decorationId?w.decorationId:L,I.range=M.range,I.query=M.query,I.text=M.text):I.active=!1}else I.active=!1;return I.active||(I.decorationId=null,I.range={from:0,to:0},I.query=null,I.text=null),I}},props:{handleKeyDown(E,w){var _,T,C,F;let{active:N,range:X}=k.getState(E.state);if(!N)return!1;if(w.key==="Escape"||w.key==="Esc"){let I=k.getState(E.state),S=(_=b?.decorationNode)!=null?_:null,M=S??(I?.decorationId?E.dom.querySelector(`[data-decoration-id="${I.decorationId}"]`):null);if(((T=g?.onKeyDown)==null?void 0:T.call(g,{view:E,event:w,range:I.range}))||!1)return!0;let J={editor:t,range:I.range,query:I.query,text:I.text,items:[],command:oe=>d({editor:t,range:I.range,props:oe}),decorationNode:M,clientRect:M?()=>M.getBoundingClientRect()||null:null};return(C=g?.onExit)==null||C.call(g,J),v(E,e),!0}return((F=g?.onKeyDown)==null?void 0:F.call(g,{view:E,event:w,range:X}))||!1},decorations(E){let{active:w,range:_,decorationId:T,query:C}=k.getState(E);if(!w)return null;let F=!C?.length,N=[a];return F&&N.push(c),xe.create(E.doc,[Oe.inline(_.from,_.to,{nodeName:l,class:N.join(" "),"data-decoration-id":T,"data-decoration-content":u})])}}});return k}var WN=gU;var jN=document.createElement("style");jN.textContent=`/* Command list container */ +`;document.head.appendChild(VN);var Le={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var Z=j(pe()),Ty=({editor:e})=>{let[t,n]=(0,Pi.useState)(!1),[r,o]=(0,Pi.useState)(""),i=(0,Pi.useRef)(null),{isBold:s,isItalic:l,isStrike:a,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=Wg({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,Pi.useEffect)(()=>{if(t&&i.current){let b=e.getAttributes("link").href||"";o(b),i.current.focus(),i.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},g=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,Z.jsx)(UN,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:m})=>!(m.selection.empty||b.isActive("codeBlock")),children:(0,Z.jsx)("div",{className:Le.toolbar,children:t?(0,Z.jsxs)("form",{onSubmit:p,className:Le.linkForm,children:[(0,Z.jsx)("input",{ref:i,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Le.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,Z.jsx)("button",{type:"submit",className:Le.linkButton,title:"Apply",children:(0,Z.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Z.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,Z.jsx)("button",{type:"button",onClick:g,className:Le.linkButton,title:"Remove link",children:(0,Z.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Z.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,Z.jsx)("button",{type:"button",onClick:h,className:Le.linkButton,title:"Cancel",children:(0,Z.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Z.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Le.button} ${s?Le.active:""}`,title:"Bold (Cmd+B)",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,Z.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,Z.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Le.button} ${l?Le.active:""}`,title:"Italic (Cmd+I)",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,Z.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,Z.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Le.button} ${a?Le.active:""}`,title:"Strikethrough",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Z.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,Z.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,Z.jsx)("div",{className:Le.divider}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Le.button} ${u?Le.active:""}`,title:"Inline Code",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,Z.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Le.button} ${c?Le.active:""}`,title:"Link (Cmd+K)",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,Z.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,Z.jsx)("div",{className:Le.divider}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Le.button} ${d?Le.active:""}`,title:"Code Block",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,Z.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,Z.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,Z.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Le.button} ${f?Le.active:""}`,title:"Quote",children:(0,Z.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Z.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,Z.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Pt=j(Be());function gU(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:l}=e,a=r&&!o,u=K_(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=o?"":u,p=a?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=l.nodeBefore)==null?void 0:t.isText)&&l.nodeBefore.text;if(!h)return null;let g=l.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let m=b.input.slice(Math.max(0,b.index-1),b.index),y=new RegExp(`^[${i?.join("")}\0]?$`).test(m);if(i!==null&&!y)return null;let x=g+b.index,v=x+b[0].length;return a&&c.test(h.slice(v-1,v+1))&&(b[0]+=" ",v+=1),x=l.pos?{range:{from:x,to:v},query:b[0].slice(n.length),text:b[0]}:null}var bU=new J("suggestion");function yU({pluginKey:e=bU,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:l="span",decorationClass:a="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:g=gU}){let b,m=p?.(),y=()=>{let E=t.state.selection.$anchor.pos,w=t.view.coordsAtPos(E),{top:_,right:A,bottom:C,left:F}=w;try{return new DOMRect(F,_,A-F,C-_)}catch{return null}},x=(E,w)=>w?()=>{let _=e.getState(t.state),A=_?.decorationId,C=E.dom.querySelector(`[data-decoration-id="${A}"]`);return C?.getBoundingClientRect()||null}:y;function v(E,w){var _;try{let C=e.getState(E.state),F=C?.decorationId?E.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null,N={editor:t,range:C?.range||{from:0,to:0},query:C?.query||null,text:C?.text||null,items:[],command:X=>d({editor:t,range:C?.range||{from:0,to:0},props:X}),decorationNode:F,clientRect:x(E,F)};(_=m?.onExit)==null||_.call(m,N)}catch{}let A=E.state.tr.setMeta(w,{exit:!0});E.dispatch(A)}let k=new V({key:e,view(){return{update:async(E,w)=>{var _,A,C,F,N,X,z;let I=(_=this.key)==null?void 0:_.getState(w),S=(A=this.key)==null?void 0:A.getState(E.state),M=I.active&&S.active&&I.range.from!==S.range.from,L=!I.active&&S.active,Y=I.active&&!S.active,oe=!L&&!Y&&I.query!==S.query,fe=L||M&&oe,ge=oe||M,pt=Y||M&&oe;if(!fe&&!ge&&!pt)return;let Pe=pt&&!fe?I:S,ht=E.dom.querySelector(`[data-decoration-id="${Pe.decorationId}"]`);b={editor:t,range:Pe.range,query:Pe.query,text:Pe.text,items:[],command:Gr=>d({editor:t,range:Pe.range,props:Gr}),decorationNode:ht,clientRect:x(E,ht)},fe&&((C=m?.onBeforeStart)==null||C.call(m,b)),ge&&((F=m?.onBeforeUpdate)==null||F.call(m,b)),(ge||fe)&&(b.items=await f({editor:t,query:Pe.query})),pt&&((N=m?.onExit)==null||N.call(m,b)),ge&&((X=m?.onUpdate)==null||X.call(m,b)),fe&&((z=m?.onStart)==null||z.call(m,b))},destroy:()=>{var E;b&&((E=m?.onExit)==null||E.call(m,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(E,w,_,A){let{isEditable:C}=t,{composing:F}=t.view,{selection:N}=E,{empty:X,from:z}=N,I={...w},S=E.getMeta(e);if(S&&S.exit)return I.active=!1,I.decorationId=null,I.range={from:0,to:0},I.query=null,I.text=null,I;if(I.composing=F,C&&(X||t.view.composing)){(zw.range.to)&&!F&&!w.composing&&(I.active=!1);let M=g({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:N.$from}),L=`id_${Math.floor(Math.random()*4294967295)}`;M&&h({editor:t,state:A,range:M.range,isActive:w.active})?(I.active=!0,I.decorationId=w.decorationId?w.decorationId:L,I.range=M.range,I.query=M.query,I.text=M.text):I.active=!1}else I.active=!1;return I.active||(I.decorationId=null,I.range={from:0,to:0},I.query=null,I.text=null),I}},props:{handleKeyDown(E,w){var _,A,C,F;let{active:N,range:X}=k.getState(E.state);if(!N)return!1;if(w.key==="Escape"||w.key==="Esc"){let I=k.getState(E.state),S=(_=b?.decorationNode)!=null?_:null,M=S??(I?.decorationId?E.dom.querySelector(`[data-decoration-id="${I.decorationId}"]`):null);if(((A=m?.onKeyDown)==null?void 0:A.call(m,{view:E,event:w,range:I.range}))||!1)return!0;let Y={editor:t,range:I.range,query:I.query,text:I.text,items:[],command:oe=>d({editor:t,range:I.range,props:oe}),decorationNode:M,clientRect:M?()=>M.getBoundingClientRect()||null:null};return(C=m?.onExit)==null||C.call(m,Y),v(E,e),!0}return((F=m?.onKeyDown)==null?void 0:F.call(m,{view:E,event:w,range:X}))||!1},decorations(E){let{active:w,range:_,decorationId:A,query:C}=k.getState(E);if(!w)return null;let F=!C?.length,N=[a];return F&&N.push(c),xe.create(E.doc,[Oe.inline(_.from,_.to,{nodeName:l,class:N.join(" "),"data-decoration-id":A,"data-decoration-content":u})])}}});return k}var qN=yU;var WN=document.createElement("style");WN.textContent=`/* Command list container */ .commandList_SlashCommands { display: flex; flex-direction: column; @@ -607,7 +607,7 @@ ${n.innerHTML} -`;document.head.appendChild(jN);var dr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var V=j(pe()),bU=[{title:"Heading 1",description:"Large section heading",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M4 12h8"}),(0,V.jsx)("path",{d:"M4 18V6"}),(0,V.jsx)("path",{d:"M12 18V6"}),(0,V.jsx)("path",{d:"M17 10v8"}),(0,V.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M4 12h8"}),(0,V.jsx)("path",{d:"M4 18V6"}),(0,V.jsx)("path",{d:"M12 18V6"}),(0,V.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M4 12h8"}),(0,V.jsx)("path",{d:"M4 18V6"}),(0,V.jsx)("path",{d:"M12 18V6"}),(0,V.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,V.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,V.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,V.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,V.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,V.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,V.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,V.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,V.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,V.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,V.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,V.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,V.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,V.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,V.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,V.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,V.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,V.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,V.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,V.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,V.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,V.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,V.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,V.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],KN=(0,Pt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,i]=(0,Pt.useState)(0),s=(0,Pt.useRef)(null),[l,a]=(0,Pt.useState)({top:0,left:0});(0,Pt.useEffect)(()=>{i(0)},[e]),(0,Pt.useEffect)(()=>{if(n){let c=n();c&&a({top:c.bottom+4,left:c.left})}},[n]),(0,Pt.useEffect)(()=>{let c=s.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Pt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Pt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(i(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,V.jsx)("div",{className:dr.commandList,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:(0,V.jsx)("div",{className:dr.noResults,children:"No commands found"})}):(0,V.jsx)("div",{className:dr.commandList,ref:s,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:e.map((c,d)=>(0,V.jsxs)("button",{type:"button",className:`${dr.commandItem} ${d===o?dr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>i(d),children:[(0,V.jsx)("div",{className:dr.commandIcon,children:c.icon}),(0,V.jsxs)("div",{className:dr.commandContent,children:[(0,V.jsx)("div",{className:dr.commandTitle,children:c.title}),(0,V.jsx)("div",{className:dr.commandDescription,children:c.description})]})]},c.title))})});KN.displayName="CommandList";var yU=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new Vg(KN,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},xU={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>bU.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:yU,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},Ty=ne.create({name:"slashCommands",addOptions(){return{suggestion:xU}},addProseMirrorPlugins(){return[WN({editor:this.editor,...this.options.suggestion})]}});var Dp=j(Be());var GN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Wr=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Wr.prototype.normal={};Wr.prototype.property={};Wr.prototype.space=void 0;function Ay(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Wr(n,r,t)}function nu(e){return e.toLowerCase()}var rt=class{constructor(t,n){this.attribute=n,this.property=t}};rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;var ru={};il(ru,{boolean:()=>re,booleanish:()=>He,commaOrSpaceSeparated:()=>jt,commaSeparated:()=>zo,number:()=>O,overloadedBoolean:()=>_p,spaceSeparated:()=>ve});var vU=0,re=Bi(),He=Bi(),_p=Bi(),O=Bi(),ve=Bi(),zo=Bi(),jt=Bi();function Bi(){return 2**++vU}var Ny=Object.keys(ru),Fi=class extends rt{constructor(t,n,r,o){let i=-1;if(super(t,n),JN(this,"space",o),typeof r=="number")for(;++i4&&n.slice(0,4)==="data"&&EU.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(XN,_U);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!XN.test(i)){let s=i.replace(kU,wU);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=Fi}return new o(r,t)}function wU(e){return"-"+e.toLowerCase()}function _U(e){return e.charAt(1).toUpperCase()}var QN=Ay([My,YN,Oy,Ry,Dy],"html"),Tp=Ay([My,ZN,Oy,Ry,Dy],"svg");var eM={}.hasOwnProperty;function tM(e,t){let n=t||{};function r(o,...i){let s=r.invalid,l=r.handlers;if(o&&eM.call(o,e)){let a=String(o[e]);s=eM.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var SU=/["&'<>`]/g,CU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,TU=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,AU=/[|\\{}()[\]^$+*?.]/g,nM=new WeakMap;function rM(e,t){if(e=e.replace(t.subset?NU(t.subset):SU,r),t.subset||t.escapeOnly)return e;return e.replace(CU,n).replace(TU,r);function n(o,i,s){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(o,i,s){return t.format(o.charCodeAt(0),s.charCodeAt(i+1),t)}}function NU(e){let t=nM.get(e);return t||(t=MU(e),nM.set(e,t)),t}function MU(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var lM=["cent","copy","divide","gt","lt","not","para","times"];var aM={}.hasOwnProperty,Ly={},Np;for(Np in Ap)aM.call(Ap,Np)&&(Ly[Ap[Np]]=Np);var DU=/[^\dA-Za-z]/;function uM(e,t,n,r){let o=String.fromCharCode(e);if(aM.call(Ly,o)){let i=Ly[o],s="&"+i;return n&&sM.includes(i)&&!lM.includes(i)&&(!r||t&&t!==61&&DU.test(String.fromCharCode(t)))?s:s+";"}return""}function cM(e,t,n){let r=oM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=uM(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i=iM(e,t,n.omitOptionalSemicolons);i.length|^->||--!>|"],PU=["<",">"];function dM(e,t,n,r){return r.settings.bogusComments?"":"";function o(i){return jr(i,Object.assign({},r.settings.characterReferences,{subset:PU}))}}function fM(e,t,n,r){return""}function Py(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function pM(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function hM(e){return e.join(" ").trim()}var BU=/[ \t\n\f\r]/g;function zi(e){return typeof e=="object"?e.type==="text"?mM(e.value):!1:mM(e)}function mM(e){return e.replace(BU,"")===""}var Ve=gM(1),By=gM(-1),FU=[];function gM(e){return t;function t(n,r,o){let i=n?n.children:FU,s=(r||0)+e,l=i[s];if(!o)for(;l&&zi(l);)s+=e,l=i[s];return l}}var zU={}.hasOwnProperty;function Mp(e){return t;function t(n,r,o){return zU.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var ou=Mp({body:$U,caption:Fy,colgroup:Fy,dd:WU,dt:VU,head:Fy,html:UU,li:qU,optgroup:jU,option:KU,p:HU,rp:bM,rt:bM,tbody:JU,td:yM,tfoot:YU,th:yM,thead:GU,tr:ZU});function Fy(e,t,n){let r=Ve(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&zi(r.value.charAt(0)))}function UU(e,t,n){let r=Ve(n,t);return!r||r.type!=="comment"}function $U(e,t,n){let r=Ve(n,t);return!r||r.type!=="comment"}function HU(e,t,n){let r=Ve(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function qU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&r.tagName==="li"}function VU(e,t,n){let r=Ve(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function WU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function bM(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function jU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function KU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function GU(e,t,n){let r=Ve(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function JU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function YU(e,t,n){return!Ve(n,t)}function ZU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function yM(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var xM=Mp({body:e$,colgroup:t$,head:QU,html:XU,tbody:n$});function XU(e){let t=Ve(e,-1);return!t||t.type!=="comment"}function QU(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function e$(e){let t=Ve(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&zi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function t$(e,t,n){let r=By(n,t),o=Ve(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&ou(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function n$(e,t,n){let r=By(n,t),o=Ve(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&ou(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var Op={name:[[` +`;document.head.appendChild(WN);var dr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var q=j(pe()),xU=[{title:"Heading 1",description:"Large section heading",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M4 12h8"}),(0,q.jsx)("path",{d:"M4 18V6"}),(0,q.jsx)("path",{d:"M12 18V6"}),(0,q.jsx)("path",{d:"M17 10v8"}),(0,q.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M4 12h8"}),(0,q.jsx)("path",{d:"M4 18V6"}),(0,q.jsx)("path",{d:"M12 18V6"}),(0,q.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M4 12h8"}),(0,q.jsx)("path",{d:"M4 18V6"}),(0,q.jsx)("path",{d:"M12 18V6"}),(0,q.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,q.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,q.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,q.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,q.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,q.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,q.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,q.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,q.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,q.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,q.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,q.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,q.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,q.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,q.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,q.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,q.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,q.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,q.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,q.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,q.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,q.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,q.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,q.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],jN=(0,Pt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,i]=(0,Pt.useState)(0),s=(0,Pt.useRef)(null),[l,a]=(0,Pt.useState)({top:0,left:0});(0,Pt.useEffect)(()=>{i(0)},[e]),(0,Pt.useEffect)(()=>{if(n){let c=n();c&&a({top:c.bottom+4,left:c.left})}},[n]),(0,Pt.useEffect)(()=>{let c=s.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Pt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Pt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(i(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,q.jsx)("div",{className:dr.commandList,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:(0,q.jsx)("div",{className:dr.noResults,children:"No commands found"})}):(0,q.jsx)("div",{className:dr.commandList,ref:s,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:e.map((c,d)=>(0,q.jsxs)("button",{type:"button",className:`${dr.commandItem} ${d===o?dr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>i(d),children:[(0,q.jsx)("div",{className:dr.commandIcon,children:c.icon}),(0,q.jsxs)("div",{className:dr.commandContent,children:[(0,q.jsx)("div",{className:dr.commandTitle,children:c.title}),(0,q.jsx)("div",{className:dr.commandDescription,children:c.description})]})]},c.title))})});jN.displayName="CommandList";var vU=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new jg(jN,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},kU={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>xU.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:vU,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},Ny=ne.create({name:"slashCommands",addOptions(){return{suggestion:kU}},addProseMirrorPlugins(){return[qN({editor:this.editor,...this.options.suggestion})]}});var Ip=j(Be());var KN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Wr=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Wr.prototype.normal={};Wr.prototype.property={};Wr.prototype.space=void 0;function My(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Wr(n,r,t)}function nu(e){return e.toLowerCase()}var rt=class{constructor(t,n){this.attribute=n,this.property=t}};rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;var ru={};il(ru,{boolean:()=>re,booleanish:()=>He,commaOrSpaceSeparated:()=>jt,commaSeparated:()=>zo,number:()=>O,overloadedBoolean:()=>Sp,spaceSeparated:()=>ve});var EU=0,re=Bi(),He=Bi(),Sp=Bi(),O=Bi(),ve=Bi(),zo=Bi(),jt=Bi();function Bi(){return 2**++EU}var Oy=Object.keys(ru),Fi=class extends rt{constructor(t,n,r,o){let i=-1;if(super(t,n),GN(this,"space",o),typeof r=="number")for(;++i4&&n.slice(0,4)==="data"&&_U.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(ZN,CU);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!ZN.test(i)){let s=i.replace(wU,SU);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=Fi}return new o(r,t)}function SU(e){return"-"+e.toLowerCase()}function CU(e){return e.charAt(1).toUpperCase()}var XN=My([Ry,YN,Dy,Iy,Ly],"html"),Tp=My([Ry,JN,Dy,Iy,Ly],"svg");var QN={}.hasOwnProperty;function eM(e,t){let n=t||{};function r(o,...i){let s=r.invalid,l=r.handlers;if(o&&QN.call(o,e)){let a=String(o[e]);s=QN.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var AU=/["&'<>`]/g,TU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NU=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,MU=/[|\\{}()[\]^$+*?.]/g,tM=new WeakMap;function nM(e,t){if(e=e.replace(t.subset?OU(t.subset):AU,r),t.subset||t.escapeOnly)return e;return e.replace(TU,n).replace(NU,r);function n(o,i,s){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(o,i,s){return t.format(o.charCodeAt(0),s.charCodeAt(i+1),t)}}function OU(e){let t=tM.get(e);return t||(t=RU(e),tM.set(e,t)),t}function RU(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var sM=["cent","copy","divide","gt","lt","not","para","times"];var lM={}.hasOwnProperty,By={},Mp;for(Mp in Np)lM.call(Np,Mp)&&(By[Np[Mp]]=Mp);var LU=/[^\dA-Za-z]/;function aM(e,t,n,r){let o=String.fromCharCode(e);if(lM.call(By,o)){let i=By[o],s="&"+i;return n&&iM.includes(i)&&!sM.includes(i)&&(!r||t&&t!==61&&LU.test(String.fromCharCode(t)))?s:s+";"}return""}function uM(e,t,n){let r=rM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=aM(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i=oM(e,t,n.omitOptionalSemicolons);i.length|^->||--!>|"],FU=["<",">"];function cM(e,t,n,r){return r.settings.bogusComments?"":"";function o(i){return jr(i,Object.assign({},r.settings.characterReferences,{subset:FU}))}}function dM(e,t,n,r){return""}function Fy(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function fM(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function pM(e){return e.join(" ").trim()}var zU=/[ \t\n\f\r]/g;function zi(e){return typeof e=="object"?e.type==="text"?hM(e.value):!1:hM(e)}function hM(e){return e.replace(zU,"")===""}var qe=mM(1),zy=mM(-1),UU=[];function mM(e){return t;function t(n,r,o){let i=n?n.children:UU,s=(r||0)+e,l=i[s];if(!o)for(;l&&zi(l);)s+=e,l=i[s];return l}}var $U={}.hasOwnProperty;function Op(e){return t;function t(n,r,o){return $U.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var ou=Op({body:VU,caption:Uy,colgroup:Uy,dd:KU,dt:jU,head:Uy,html:HU,li:WU,optgroup:GU,option:YU,p:qU,rp:gM,rt:gM,tbody:ZU,td:bM,tfoot:XU,th:bM,thead:JU,tr:QU});function Uy(e,t,n){let r=qe(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&zi(r.value.charAt(0)))}function HU(e,t,n){let r=qe(n,t);return!r||r.type!=="comment"}function VU(e,t,n){let r=qe(n,t);return!r||r.type!=="comment"}function qU(e,t,n){let r=qe(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function WU(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&r.tagName==="li"}function jU(e,t,n){let r=qe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function KU(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function gM(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function GU(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function YU(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function JU(e,t,n){let r=qe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ZU(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function XU(e,t,n){return!qe(n,t)}function QU(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function bM(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var yM=Op({body:n$,colgroup:r$,head:t$,html:e$,tbody:o$});function e$(e){let t=qe(e,-1);return!t||t.type!=="comment"}function t$(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function n$(e){let t=qe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&zi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function r$(e,t,n){let r=zy(n,t),o=qe(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&ou(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function o$(e,t,n){let r=zy(n,t),o=qe(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&ou(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var Rp={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -615,7 +615,7 @@ ${n.innerHTML} \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function vM(e,t,n,r){let o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags,s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[],a;o.space==="html"&&e.tagName==="svg"&&(r.schema=Tp);let u=r$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(s=!1),(u||!i||!xM(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(c),!s&&(!i||!ou(e,t,n))&&l.push(""),l.join("")}function r$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let i=o$(e,o,t[o]);i&&n.push(i)}}for(;++rPy(n,e.alternative)&&(s=e.alternative),l=s+jr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Op.single:Op.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}var i$=["<","&"];function Rp(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:jr(e.value,Object.assign({},r.settings.characterReferences,{subset:i$}))}function kM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Rp(e,t,n,r)}function EM(e,t,n,r){return r.all(e)}var wM=tM("type",{invalid:s$,unknown:l$,handlers:{comment:dM,doctype:fM,element:vM,raw:kM,root:EM,text:Rp}});function s$(e){throw new Error("Expected node, not `"+e+"`")}function l$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var a$={},u$={},c$=[];function zy(e,t){let n=t||a$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:d$,all:f$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||GN,characterReferences:n.characterReferences||u$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Tp:QN,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function d$(e,t,n){return wM(e,t,n,this)}function f$(e){let t=[],n=e&&e.children||c$,r=-1;for(;++r\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function xM(e,t,n,r){let o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags,s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[],a;o.space==="html"&&e.tagName==="svg"&&(r.schema=Tp);let u=i$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(s=!1),(u||!i||!yM(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(c),!s&&(!i||!ou(e,t,n))&&l.push(""),l.join("")}function i$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let i=s$(e,o,t[o]);i&&n.push(i)}}for(;++rFy(n,e.alternative)&&(s=e.alternative),l=s+jr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Rp.single:Rp.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}var l$=["<","&"];function Dp(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:jr(e.value,Object.assign({},r.settings.characterReferences,{subset:l$}))}function vM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Dp(e,t,n,r)}function kM(e,t,n,r){return r.all(e)}var EM=eM("type",{invalid:a$,unknown:u$,handlers:{comment:cM,doctype:dM,element:xM,raw:vM,root:kM,text:Dp}});function a$(e){throw new Error("Expected node, not `"+e+"`")}function u$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var c$={},d$={},f$=[];function $y(e,t){let n=t||c$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:p$,all:h$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||KN,characterReferences:n.characterReferences||d$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Tp:XN,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function p$(e,t,n){return EM(e,t,n,this)}function h$(e){let t=[],n=e&&e.children||f$,r=-1;for(;++r{let n=e.attrs.language||"text",r=e.textContent,o=(0,Dp.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let s=h$[n.toLowerCase()]||n.toLowerCase();if(!SM.registered(s))return r.replace(//g,">");let l=SM.highlight(s,r);return zy(l)}catch{return r.replace(//g,">")}},[r,n]),i=(0,Dp.useCallback)(s=>{t({language:s.target.value})},[t]);return(0,Tn.jsxs)(CS,{className:Uo.codeBlockWrapper,children:[(0,Tn.jsx)("div",{className:Uo.codeBlockHeader,contentEditable:!1,children:(0,Tn.jsx)("select",{value:n,onChange:i,className:Uo.languageSelect,children:p$.map(s=>(0,Tn.jsx)("option",{value:s.value,children:s.label},s.value))})}),(0,Tn.jsxs)("div",{className:Uo.codeBlockContainer,children:[(0,Tn.jsx)("pre",{className:Uo.codeBlockBackdrop,"aria-hidden":"true",children:(0,Tn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,Tn.jsx)("pre",{className:Uo.codeBlockPre,children:(0,Tn.jsx)("code",{className:Uo.codeBlockCode,children:(0,Tn.jsx)(wS,{})})})]})]})};var TM=document.createElement("style");TM.textContent=`/* Container */ +`;document.head.appendChild(wM);var Uo={codeBlockWrapper:"codeBlockWrapper_CodeBlockComponent",codeBlockHeader:"codeBlockHeader_CodeBlockComponent",languageSelect:"languageSelect_CodeBlockComponent",w3:"w3_CodeBlockComponent",org:"org_CodeBlockComponent",codeBlockContainer:"codeBlockContainer_CodeBlockComponent",codeBlockBackdrop:"codeBlockBackdrop_CodeBlockComponent",codeBlockPre:"codeBlockPre_CodeBlockComponent",codeBlockCode:"codeBlockCode_CodeBlockComponent"};var An=j(pe()),_M=Ha($a),m$=[{value:"text",label:"Plain Text"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"jsx",label:"JSX"},{value:"tsx",label:"TSX"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"c",label:"C"},{value:"cpp",label:"C++"},{value:"csharp",label:"C#"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"ruby",label:"Ruby"},{value:"php",label:"PHP"},{value:"swift",label:"Swift"},{value:"kotlin",label:"Kotlin"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"scss",label:"SCSS"},{value:"json",label:"JSON"},{value:"yaml",label:"YAML"},{value:"xml",label:"XML"},{value:"markdown",label:"Markdown"},{value:"sql",label:"SQL"},{value:"graphql",label:"GraphQL"},{value:"bash",label:"Bash"},{value:"shell",label:"Shell"},{value:"powershell",label:"PowerShell"},{value:"dockerfile",label:"Dockerfile"}],g$={js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",py:"python",rb:"ruby",sh:"bash",shell:"bash",yml:"yaml",md:"markdown","c++":"cpp","c#":"csharp"},SM=({node:e,updateAttributes:t})=>{let n=e.attrs.language||"text",r=e.textContent,o=(0,Ip.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let s=g$[n.toLowerCase()]||n.toLowerCase();if(!_M.registered(s))return r.replace(//g,">");let l=_M.highlight(s,r);return $y(l)}catch{return r.replace(//g,">")}},[r,n]),i=(0,Ip.useCallback)(s=>{t({language:s.target.value})},[t]);return(0,An.jsxs)(SS,{className:Uo.codeBlockWrapper,children:[(0,An.jsx)("div",{className:Uo.codeBlockHeader,contentEditable:!1,children:(0,An.jsx)("select",{value:n,onChange:i,className:Uo.languageSelect,children:m$.map(s=>(0,An.jsx)("option",{value:s.value,children:s.label},s.value))})}),(0,An.jsxs)("div",{className:Uo.codeBlockContainer,children:[(0,An.jsx)("pre",{className:Uo.codeBlockBackdrop,"aria-hidden":"true",children:(0,An.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,An.jsx)("pre",{className:Uo.codeBlockPre,children:(0,An.jsx)("code",{className:Uo.codeBlockCode,children:(0,An.jsx)(ES,{})})})]})]})};var CM=document.createElement("style");CM.textContent=`/* Container */ .container_MarkdownEditor { position: relative; border: 1px solid var(--vscode-input-border, #3c3c3c); @@ -1010,10 +1010,10 @@ ${n.innerHTML} -`;document.head.appendChild(TM);var fr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var Kr=j(pe()),m$=Ha($a),Ip=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:i=!1})=>{let s=(0,rl.useRef)(!1),l=(0,rl.useRef)(e),a=bS({extensions:[MC.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),IT.extend({addNodeView(){return OS(CM)}}).configure({lowlight:m$,defaultLanguage:"text"}),nC.configure({openOnClick:!1,HTMLAttributes:{class:fr.link}}),OC.configure({placeholder:n,emptyEditorClass:fr.isEmpty}),RC,DC.configure({nested:!0}),K1.configure({resizable:!1}),j1,V1,W1,sN.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),Ty],content:e,editable:!i,autofocus:o?"end":!1,editorProps:{attributes:{class:fr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(s.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";l.current=d,t(d)}});return(0,rl.useEffect)(()=>{a&&e!==l.current&&(s.current=!0,a.commands.setContent(e),l.current=e,setTimeout(()=>{s.current=!1},0))},[a,e]),(0,rl.useEffect)(()=>{a&&a.setEditable(!i)},[a,i]),a?(0,Kr.jsxs)("div",{className:`${fr.container} ${i?fr.disabled:""}`,children:[(0,Kr.jsx)(Cy,{editor:a}),(0,Kr.jsx)(pS,{editor:a,className:fr.editorContent}),(0,Kr.jsxs)("div",{className:fr.hint,children:["Type ",(0,Kr.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,Kr.jsx)("div",{className:fr.container,style:{minHeight:r},children:(0,Kr.jsx)("div",{className:fr.loading,children:"Loading editor..."})})};function AM(e){let t=e.split(` +`;document.head.appendChild(CM);var fr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var Kr=j(pe()),b$=Ha($a),Lp=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:i=!1})=>{let s=(0,rl.useRef)(!1),l=(0,rl.useRef)(e),a=gS({extensions:[NC.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),DA.extend({addNodeView(){return MS(SM)}}).configure({lowlight:b$,defaultLanguage:"text"}),tC.configure({openOnClick:!1,HTMLAttributes:{class:fr.link}}),MC.configure({placeholder:n,emptyEditorClass:fr.isEmpty}),OC,RC.configure({nested:!0}),Y1.configure({resizable:!1}),G1,j1,K1,iN.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),Ny],content:e,editable:!i,autofocus:o?"end":!1,editorProps:{attributes:{class:fr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(s.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";l.current=d,t(d)}});return(0,rl.useEffect)(()=>{a&&e!==l.current&&(s.current=!0,a.commands.setContent(e),l.current=e,setTimeout(()=>{s.current=!1},0))},[a,e]),(0,rl.useEffect)(()=>{a&&a.setEditable(!i)},[a,i]),a?(0,Kr.jsxs)("div",{className:`${fr.container} ${i?fr.disabled:""}`,children:[(0,Kr.jsx)(Ty,{editor:a}),(0,Kr.jsx)(fS,{editor:a,className:fr.editorContent}),(0,Kr.jsxs)("div",{className:fr.hint,children:["Type ",(0,Kr.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,Kr.jsx)("div",{className:fr.container,style:{minHeight:r},children:(0,Kr.jsx)("div",{className:fr.loading,children:"Loading editor..."})})};function AM(e){let t=e.split(` `),n=[],r=0;for(;r ")){let s=[];for(;r ");)s.push(t[r].slice(2)),r++;n.push({type:"blockquote",content:[{type:"paragraph",content:iu(s.join(` -`))}]});continue}if(o.trim()===""){r++;continue}n.push({type:"paragraph",content:iu(o)}),r++}return{type:"doc",version:1,content:n}}function iu(e){let t=[],n=e,r=[{regex:/`([^`]+)`/,type:"code"},{regex:/\*\*([^*]+)\*\*/,type:"strong"},{regex:/__([^_]+)__/,type:"strong"},{regex:/\*([^*]+)\*/,type:"em"},{regex:/_([^_]+)_/,type:"em"},{regex:/~~([^~]+)~~/,type:"strike"},{regex:/\[([^\]]+)\]\(([^)]+)\)/,type:"link"}];for(;n.length>0;){let o=null;for(let i of r){let s=n.match(i.regex);if(s&&s.index!==void 0&&(!o||s.index0&&t.push({type:"text",text:n.slice(0,o.index)}),t.push(o.node),n=n.slice(o.index+o.length);else{n.length>0&&t.push({type:"text",text:n});break}}return t.length>0?t:[{type:"text",text:""}]}var NM=document.createElement("style");NM.textContent=`.container_App { +`))}]});continue}if(o.trim()===""){r++;continue}n.push({type:"paragraph",content:iu(o)}),r++}return{type:"doc",version:1,content:n}}function iu(e){let t=[],n=e,r=[{regex:/`([^`]+)`/,type:"code"},{regex:/\*\*([^*]+)\*\*/,type:"strong"},{regex:/__([^_]+)__/,type:"strong"},{regex:/\*([^*]+)\*/,type:"em"},{regex:/_([^_]+)_/,type:"em"},{regex:/~~([^~]+)~~/,type:"strike"},{regex:/\[([^\]]+)\]\(([^)]+)\)/,type:"link"}];for(;n.length>0;){let o=null;for(let i of r){let s=n.match(i.regex);if(s&&s.index!==void 0&&(!o||s.index0&&t.push({type:"text",text:n.slice(0,o.index)}),t.push(o.node),n=n.slice(o.index+o.length);else{n.length>0&&t.push({type:"text",text:n});break}}return t.length>0?t:[{type:"text",text:""}]}var TM=document.createElement("style");TM.textContent=`.container_App { padding: 20px; max-width: 800px; margin: 0 auto; @@ -1110,7 +1110,7 @@ ${n.innerHTML} opacity: 0.5; cursor: not-allowed; } -`;document.head.appendChild(NM);var ke={container:"container_App",title:"title_App",form:"form_App",field:"field_App",label:"label_App",required:"required_App",select:"select_App",input:"input_App",textarea:"textarea_App",actions:"actions_App",createButton:"createButton_App"};var le=j(pe());function g$(){let{postMessage:e,onMessage:t}=vE(),[n,r]=(0,ft.useState)([]),[o,i]=(0,ft.useState)([]),[s,l]=(0,ft.useState)([]),[a,u]=(0,ft.useState)([]),[c,d]=(0,ft.useState)(""),[f,p]=(0,ft.useState)(""),[h,m]=(0,ft.useState)(""),[b,g]=(0,ft.useState)(""),[y,x]=(0,ft.useState)(""),[v,k]=(0,ft.useState)(""),[E,w]=(0,ft.useState)(""),[_,T]=(0,ft.useState)(!1);(0,ft.useEffect)(()=>{e({command:"loadProjects"}),e({command:"loadUsers"})},[]),(0,ft.useEffect)(()=>t(N=>{switch(N.command){case"projectsLoaded":r(N.projects);break;case"projectMetaLoaded":i(N.issueTypes.filter(X=>!X.subtask)),l(N.priorities);break;case"usersLoaded":u(N.users);break;case"populateDraft":N.data&&(N.data.title&&p(N.data.title),N.data.description&&m(N.data.description),N.data.projectKey&&d(N.data.projectKey),N.data.labels&&w(N.data.labels.join(", ")),N.data.priority&&setTimeout(()=>{let X=s.find(z=>z.name.toLowerCase()===N.data.priority?.toLowerCase());X&&x(X.id)},500));break}}),[t,s]),(0,ft.useEffect)(()=>{c&&e({command:"loadProjectMeta",projectKey:c})},[c]);let C=()=>{if(!c||!f.trim()||!b)return;T(!0);let N=E.split(",").map(z=>z.trim()).filter(z=>z.length>0),X=h.trim()?JSON.stringify(AM(h.trim())):"";e({command:"createIssue",input:{projectKey:c,summary:f.trim(),description:X,issueTypeId:b,priorityId:y||void 0,assigneeId:v||void 0,labels:N.length>0?N:void 0}})},F=c&&f.trim()&&b&&!_;return(0,le.jsxs)("div",{className:ke.container,children:[(0,le.jsx)("h1",{className:ke.title,children:"Create New Jira Issue"}),(0,le.jsxs)("div",{className:ke.form,children:[(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsxs)("label",{className:ke.label,children:["Project ",(0,le.jsx)("span",{className:ke.required,children:"*"})]}),(0,le.jsxs)("select",{value:c,onChange:N=>{d(N.target.value),g("")},className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"Select a project"}),n.map(N=>(0,le.jsxs)("option",{value:N.key,children:[N.name," (",N.key,")"]},N.key))]})]}),c&&(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsxs)("label",{className:ke.label,children:["Issue Type ",(0,le.jsx)("span",{className:ke.required,children:"*"})]}),(0,le.jsxs)("select",{value:b,onChange:N=>g(N.target.value),className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"Select issue type"}),o.map(N=>(0,le.jsx)("option",{value:N.id,children:N.name},N.id))]})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsxs)("label",{className:ke.label,children:["Summary ",(0,le.jsx)("span",{className:ke.required,children:"*"})]}),(0,le.jsx)("input",{type:"text",value:f,onChange:N=>p(N.target.value),placeholder:"Brief description of the issue",className:ke.input})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Description"}),(0,le.jsx)(Ip,{value:h,onChange:m,placeholder:"Detailed description...",minHeight:150})]}),c&&s.length>0&&(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Priority"}),(0,le.jsxs)("select",{value:y,onChange:N=>x(N.target.value),className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"None"}),s.map(N=>(0,le.jsx)("option",{value:N.id,children:N.name},N.id))]})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Assignee"}),(0,le.jsxs)("select",{value:v,onChange:N=>k(N.target.value),className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"Unassigned"}),a.map(N=>(0,le.jsx)("option",{value:N.accountId,children:N.displayName},N.accountId))]})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Labels"}),(0,le.jsx)("input",{type:"text",value:E,onChange:N=>w(N.target.value),placeholder:"Comma-separated labels (e.g., bug, frontend, urgent)",className:ke.input})]}),(0,le.jsx)("div",{className:ke.actions,children:(0,le.jsx)("button",{onClick:C,disabled:!F,className:ke.createButton,children:_?"Creating...":"Create Issue"})})]})]})}var MM=g$;var RM=j(pe()),b$=OM.default.createRoot(document.getElementById("root"));b$.render((0,RM.jsx)(MM,{}));})(); +`;document.head.appendChild(TM);var ke={container:"container_App",title:"title_App",form:"form_App",field:"field_App",label:"label_App",required:"required_App",select:"select_App",input:"input_App",textarea:"textarea_App",actions:"actions_App",createButton:"createButton_App"};var le=j(pe());function y$(){let{postMessage:e,onMessage:t}=EE(),[n,r]=(0,ft.useState)([]),[o,i]=(0,ft.useState)([]),[s,l]=(0,ft.useState)([]),[a,u]=(0,ft.useState)([]),[c,d]=(0,ft.useState)(""),[f,p]=(0,ft.useState)(""),[h,g]=(0,ft.useState)(""),[b,m]=(0,ft.useState)(""),[y,x]=(0,ft.useState)(""),[v,k]=(0,ft.useState)(""),[E,w]=(0,ft.useState)(""),[_,A]=(0,ft.useState)(!1);(0,ft.useEffect)(()=>{e({command:"loadProjects"}),e({command:"loadUsers"})},[]),(0,ft.useEffect)(()=>t(N=>{switch(N.command){case"projectsLoaded":r(N.projects);break;case"projectMetaLoaded":i(N.issueTypes.filter(X=>!X.subtask)),l(N.priorities);break;case"usersLoaded":u(N.users);break;case"populateDraft":N.data&&(N.data.title&&p(N.data.title),N.data.description&&g(N.data.description),N.data.projectKey&&d(N.data.projectKey),N.data.labels&&w(N.data.labels.join(", ")),N.data.priority&&setTimeout(()=>{let X=s.find(z=>z.name.toLowerCase()===N.data.priority?.toLowerCase());X&&x(X.id)},500));break}}),[t,s]),(0,ft.useEffect)(()=>{c&&e({command:"loadProjectMeta",projectKey:c})},[c]);let C=()=>{if(!c||!f.trim()||!b)return;A(!0);let N=E.split(",").map(z=>z.trim()).filter(z=>z.length>0),X=h.trim()?JSON.stringify(AM(h.trim())):"";e({command:"createIssue",input:{projectKey:c,summary:f.trim(),description:X,issueTypeId:b,priorityId:y||void 0,assigneeId:v||void 0,labels:N.length>0?N:void 0}})},F=c&&f.trim()&&b&&!_;return(0,le.jsxs)("div",{className:ke.container,children:[(0,le.jsx)("h1",{className:ke.title,children:"Create New Jira Issue"}),(0,le.jsxs)("div",{className:ke.form,children:[(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsxs)("label",{className:ke.label,children:["Project ",(0,le.jsx)("span",{className:ke.required,children:"*"})]}),(0,le.jsxs)("select",{value:c,onChange:N=>{d(N.target.value),m("")},className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"Select a project"}),n.map(N=>(0,le.jsxs)("option",{value:N.key,children:[N.name," (",N.key,")"]},N.key))]})]}),c&&(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsxs)("label",{className:ke.label,children:["Issue Type ",(0,le.jsx)("span",{className:ke.required,children:"*"})]}),(0,le.jsxs)("select",{value:b,onChange:N=>m(N.target.value),className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"Select issue type"}),o.map(N=>(0,le.jsx)("option",{value:N.id,children:N.name},N.id))]})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsxs)("label",{className:ke.label,children:["Summary ",(0,le.jsx)("span",{className:ke.required,children:"*"})]}),(0,le.jsx)("input",{type:"text",value:f,onChange:N=>p(N.target.value),placeholder:"Brief description of the issue",className:ke.input})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Description"}),(0,le.jsx)(Lp,{value:h,onChange:g,placeholder:"Detailed description...",minHeight:150})]}),c&&s.length>0&&(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Priority"}),(0,le.jsxs)("select",{value:y,onChange:N=>x(N.target.value),className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"None"}),s.map(N=>(0,le.jsx)("option",{value:N.id,children:N.name},N.id))]})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Assignee"}),(0,le.jsxs)("select",{value:v,onChange:N=>k(N.target.value),className:ke.select,children:[(0,le.jsx)("option",{value:"",children:"Unassigned"}),a.map(N=>(0,le.jsx)("option",{value:N.accountId,children:N.displayName},N.accountId))]})]}),(0,le.jsxs)("div",{className:ke.field,children:[(0,le.jsx)("label",{className:ke.label,children:"Labels"}),(0,le.jsx)("input",{type:"text",value:E,onChange:N=>w(N.target.value),placeholder:"Comma-separated labels (e.g., bug, frontend, urgent)",className:ke.input})]}),(0,le.jsx)("div",{className:ke.actions,children:(0,le.jsx)("button",{onClick:C,disabled:!F,className:ke.createButton,children:_?"Creating...":"Create Issue"})})]})]})}var NM=y$;var OM=j(pe()),x$=MM.default.createRoot(document.getElementById("root"));x$.render((0,OM.jsx)(NM,{}));})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/webview-ui/build/jira-ticket-panel.js b/webview-ui/build/jira-ticket-panel.js index 3f18cf4..0ece966 100644 --- a/webview-ui/build/jira-ticket-panel.js +++ b/webview-ui/build/jira-ticket-panel.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var BR=Object.create;var bh=Object.defineProperty;var FR=Object.getOwnPropertyDescriptor;var zR=Object.getOwnPropertyNames;var UR=Object.getPrototypeOf,HR=Object.prototype.hasOwnProperty;var It=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oa=(e,t)=>{for(var n in t)bh(e,n,{get:t[n],enumerable:!0})},$R=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zR(t))!HR.call(e,o)&&o!==n&&bh(e,o,{get:()=>t[o],enumerable:!(r=FR(t,o))||r.enumerable});return e};var P=(e,t,n)=>(n=e!=null?BR(UR(e)):{},$R(t||!e||!e.__esModule?bh(n,"default",{value:e,enumerable:!0}):n,e));var Mv=It(ue=>{"use strict";var Ia=Symbol.for("react.element"),qR=Symbol.for("react.portal"),VR=Symbol.for("react.fragment"),WR=Symbol.for("react.strict_mode"),jR=Symbol.for("react.profiler"),KR=Symbol.for("react.provider"),GR=Symbol.for("react.context"),JR=Symbol.for("react.forward_ref"),YR=Symbol.for("react.suspense"),ZR=Symbol.for("react.memo"),XR=Symbol.for("react.lazy"),vv=Symbol.iterator;function QR(e){return e===null||typeof e!="object"?null:(e=vv&&e[vv]||e["@@iterator"],typeof e=="function"?e:null)}var wv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ev=Object.assign,_v={};function ps(e,t,n){this.props=e,this.context=t,this.refs=_v,this.updater=n||wv}ps.prototype.isReactComponent={};ps.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ps.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sv(){}Sv.prototype=ps.prototype;function vh(e,t,n){this.props=e,this.context=t,this.refs=_v,this.updater=n||wv}var xh=vh.prototype=new Sv;xh.constructor=vh;Ev(xh,ps.prototype);xh.isPureReactComponent=!0;var xv=Array.isArray,Cv=Object.prototype.hasOwnProperty,kh={current:null},Tv={key:!0,ref:!0,__self:!0,__source:!0};function Nv(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Cv.call(t,r)&&!Tv.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1{"use strict";Rv.exports=Mv()});var Hv=It(Te=>{"use strict";function Ch(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rHu(a,n))lHu(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(lHu(u,n))e[r]=u,e[l]=n,r=l;else break e}}return t}function Hu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Dv=performance,Te.unstable_now=function(){return Dv.now()}):(Eh=Date,Ov=Eh.now(),Te.unstable_now=function(){return Eh.now()-Ov});var Dv,Eh,Ov,Qn=[],fo=[],oD=1,mn=null,kt=3,Vu=!1,li=!1,Pa=!1,Pv=typeof setTimeout=="function"?setTimeout:null,Bv=typeof clearTimeout=="function"?clearTimeout:null,Iv=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Th(e){for(var t=Fn(fo);t!==null;){if(t.callback===null)qu(fo);else if(t.startTime<=e)qu(fo),t.sortIndex=t.expirationTime,Ch(Qn,t);else break;t=Fn(fo)}}function Nh(e){if(Pa=!1,Th(e),!li)if(Fn(Qn)!==null)li=!0,Mh(Ah);else{var t=Fn(fo);t!==null&&Rh(Nh,t.startTime-e)}}function Ah(e,t){li=!1,Pa&&(Pa=!1,Bv(Ba),Ba=-1),Vu=!0;var n=kt;try{for(Th(t),mn=Fn(Qn);mn!==null&&(!(mn.expirationTime>t)||e&&!Uv());){var r=mn.callback;if(typeof r=="function"){mn.callback=null,kt=mn.priorityLevel;var o=r(mn.expirationTime<=t);t=Te.unstable_now(),typeof o=="function"?mn.callback=o:mn===Fn(Qn)&&qu(Qn),Th(t)}else qu(Qn);mn=Fn(Qn)}if(mn!==null)var i=!0;else{var s=Fn(fo);s!==null&&Rh(Nh,s.startTime-t),i=!1}return i}finally{mn=null,kt=n,Vu=!1}}var Wu=!1,$u=null,Ba=-1,Fv=5,zv=-1;function Uv(){return!(Te.unstable_now()-zve||125r?(e.sortIndex=n,Ch(fo,e),Fn(Qn)===null&&e===Fn(fo)&&(Pa?(Bv(Ba),Ba=-1):Pa=!0,Rh(Nh,n-r))):(e.sortIndex=o,Ch(Qn,e),li||Vu||(li=!0,Mh(Ah))),e};Te.unstable_shouldYield=Uv;Te.unstable_wrapCallback=function(e){var t=kt;return function(){var n=kt;kt=t;try{return e.apply(this,arguments)}finally{kt=n}}}});var qv=It((q$,$v)=>{"use strict";$v.exports=Hv()});var Kw=It(un=>{"use strict";var iD=Se(),an=qv();function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),em=Object.prototype.hasOwnProperty,sD=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Vv={},Wv={};function aD(e){return em.call(Wv,e)?!0:em.call(Vv,e)?!1:sD.test(e)?Wv[e]=!0:(Vv[e]=!0,!1)}function lD(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function uD(e,t,n,r){if(t===null||typeof t>"u"||lD(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ft(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new Ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new Ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new Ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new Ft(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pt[e]=new Ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new Ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new Ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new Ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new Ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wm=/[\-:]([a-z])/g;function jm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wm,jm);pt[t]=new Ft(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wm,jm);pt[t]=new Ft(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wm,jm);pt[t]=new Ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new Ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Km(e,t,n,r){var o=pt.hasOwnProperty(t)?pt[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` -`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Oh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ja(e):""}function cD(e){switch(e.tag){case 5:return ja(e.type);case 16:return ja("Lazy");case 13:return ja("Suspense");case 19:return ja("SuspenseList");case 0:case 2:case 15:return e=Ih(e.type,!1),e;case 11:return e=Ih(e.type.render,!1),e;case 1:return e=Ih(e.type,!0),e;default:return""}}function om(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bs:return"Fragment";case gs:return"Portal";case tm:return"Profiler";case Gm:return"StrictMode";case nm:return"Suspense";case rm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xx:return(e.displayName||"Context")+".Consumer";case Zx:return(e._context.displayName||"Context")+".Provider";case Jm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ym:return t=e.displayName||null,t!==null?t:om(e.type)||"Memo";case ho:t=e._payload,e=e._init;try{return om(e(t))}catch{}}return null}function dD(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return om(t);case 8:return t===Gm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function No(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ek(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fD(e){var t=ek(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ku(e){e._valueTracker||(e._valueTracker=fD(e))}function tk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ek(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function kc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function im(e,t){var n=t.checked;return Be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=No(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nk(e,t){t=t.checked,t!=null&&Km(e,"checked",t,!1)}function sm(e,t){nk(e,t);var n=No(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?am(e,t.type,n):t.hasOwnProperty("defaultValue")&&am(e,t.type,No(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function am(e,t,n){(t!=="number"||kc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ka=Array.isArray;function Ns(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Gu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ya={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pD=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){pD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function sk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function ak(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=sk(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var hD=Be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cm(e,t){if(t){if(hD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function dm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fm=null;function Zm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pm=null,As=null,Ms=null;function Zv(e){if(e=_l(e)){if(typeof pm!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Jc(t),pm(e.stateNode,e.type,t))}}function lk(e){As?Ms?Ms.push(e):Ms=[e]:As=e}function uk(){if(As){var e=As,t=Ms;if(Ms=As=null,Zv(e),t)for(e=0;e>>=0,e===0?32:31-(SD(e)/CD|0)|0}var Ju=64,Yu=4194304;function Ga(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Ga(a):(i&=s,i!==0&&(r=Ga(i)))}else s=n&~o,s!==0?r=Ga(s):i!==0&&(r=Ga(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qn(t),e[t]=n}function MD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xa),sx=" ",ax=!1;function Ak(e,t){switch(e){case"keyup":return oO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ys=!1;function sO(e,t){switch(e){case"compositionend":return Mk(t);case"keypress":return t.which!==32?null:(ax=!0,sx);case"textInput":return e=t.data,e===sx&&ax?null:e;default:return null}}function aO(e,t){if(ys)return e==="compositionend"||!i0&&Ak(e,t)?(e=Tk(),fc=n0=yo=null,ys=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cx(n)}}function Ik(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ik(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lk(){for(var e=window,t=kc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kc(e.document)}return t}function s0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gO(e){var t=Lk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ik(n.ownerDocument.documentElement,n)){if(r!==null&&s0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=dx(n,i);var s=dx(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,vs=null,vm=null,el=null,xm=!1;function fx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xm||vs==null||vs!==kc(r)||(r=vs,"selectionStart"in r&&s0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),el&&fl(el,r)||(el=r,r=Nc(vm,"onSelect"),0ws||(e.current=Cm[ws],Cm[ws]=null,ws--)}function Ne(e,t){ws++,Cm[ws]=e.current,e.current=t}var Ao={},St=Ro(Ao),Kt=Ro(!1),gi=Ao;function Ls(e,t){var n=e.type.contextTypes;if(!n)return Ao;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Gt(e){return e=e.childContextTypes,e!=null}function Mc(){Re(Kt),Re(St)}function kx(e,t,n){if(St.current!==Ao)throw Error(O(168));Ne(St,t),Ne(Kt,n)}function Vk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,dD(e)||"Unknown",o));return Be({},n,r)}function Rc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ao,gi=St.current,Ne(St,e),Ne(Kt,Kt.current),!0}function wx(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Vk(e,t,gi),r.__reactInternalMemoizedMergedChildContext=e,Re(Kt),Re(St),Ne(St,e)):Re(Kt),Ne(Kt,n)}var Nr=null,Yc=!1,Wh=!1;function Wk(e){Nr===null?Nr=[e]:Nr.push(e)}function CO(e){Yc=!0,Wk(e)}function Do(){if(!Wh&&Nr!==null){Wh=!0;var e=0,t=xe;try{var n=Nr;for(xe=1;e>=s,o-=s,Ar=1<<32-qn(t)+o|n<_?(T=E,E=null):T=E.sibling;var C=f(g,E,v[_],x);if(C===null){E===null&&(E=T);break}e&&E&&C.alternate===null&&t(g,E),y=i(C,y,_),w===null?k=C:w.sibling=C,w=C,E=T}if(_===v.length)return n(g,E),Oe&&ui(g,_),k;if(E===null){for(;__?(T=E,E=null):T=E.sibling;var U=f(g,E,C.value,x);if(U===null){E===null&&(E=T);break}e&&E&&U.alternate===null&&t(g,E),y=i(U,y,_),w===null?k=U:w.sibling=U,w=U,E=T}if(C.done)return n(g,E),Oe&&ui(g,_),k;if(E===null){for(;!C.done;_++,C=v.next())C=d(g,C.value,x),C!==null&&(y=i(C,y,_),w===null?k=C:w.sibling=C,w=C);return Oe&&ui(g,_),k}for(E=r(g,E);!C.done;_++,C=v.next())C=p(E,g,_,C.value,x),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?_:C.key),y=i(C,y,_),w===null?k=C:w.sibling=C,w=C);return e&&E.forEach(function(V){return t(g,V)}),Oe&&ui(g,_),k}function b(g,y,v,x){if(typeof v=="object"&&v!==null&&v.type===bs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ju:e:{for(var k=v.key,w=y;w!==null;){if(w.key===k){if(k=v.type,k===bs){if(w.tag===7){n(g,w.sibling),y=o(w,v.props.children),y.return=g,g=y;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ho&&Sx(k)===w.type){n(g,w.sibling),y=o(w,v.props),y.ref=$a(g,w,v),y.return=g,g=y;break e}n(g,w);break}else t(g,w);w=w.sibling}v.type===bs?(y=mi(v.props.children,g.mode,x,v.key),y.return=g,g=y):(x=xc(v.type,v.key,v.props,null,g.mode,x),x.ref=$a(g,y,v),x.return=g,g=x)}return s(g);case gs:e:{for(w=v.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=o(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Qh(v,g.mode,x),y.return=g,g=y}return s(g);case ho:return w=v._init,b(g,y,w(v._payload),x)}if(Ka(v))return h(g,y,v,x);if(Fa(v))return m(g,y,v,x);ac(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,v),y.return=g,g=y):(n(g,y),y=Xh(v,g.mode,x),y.return=g,g=y),s(g)):n(g,y)}return b}var Bs=Jk(!0),Yk=Jk(!1),Ic=Ro(null),Lc=null,Ss=null,c0=null;function d0(){c0=Ss=Lc=null}function f0(e){var t=Ic.current;Re(Ic),e._currentValue=t}function Am(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ds(e,t){Lc=e,c0=Ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(jt=!0),e.firstContext=null)}function xn(e){var t=e._currentValue;if(c0!==e)if(e={context:e,memoizedValue:t,next:null},Ss===null){if(Lc===null)throw Error(O(308));Ss=e,Lc.dependencies={lanes:0,firstContext:e}}else Ss=Ss.next=e;return t}var fi=null;function p0(e){fi===null?fi=[e]:fi.push(e)}function Zk(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,p0(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ir(e,r)}function Ir(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var mo=!1;function h0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ir(e,n)}return o=r.interleaved,o===null?(t.next=t,p0(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ir(e,n)}function hc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qm(e,n)}}function Cx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Pc(e,t,n,r){var o=e.updateQueue;mo=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Be({},d,f);break e;case 2:mo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);vi|=s,e.lanes=s,e.memoizedState=d}}function Tx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Kh.transition;Kh.transition={};try{e(!1),t()}finally{xe=n,Kh.transition=r}}function mw(){return kn().memoizedState}function MO(e,t,n){var r=Co(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gw(e))bw(t,n);else if(n=Zk(e,t,n,r),n!==null){var o=Bt();Vn(n,e,r,o),yw(n,t,r)}}function RO(e,t,n){var r=Co(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gw(e))bw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Wn(a,s)){var l=t.interleaved;l===null?(o.next=o,p0(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Zk(e,t,o,r),n!==null&&(o=Bt(),Vn(n,e,r,o),yw(n,t,r))}}function gw(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function bw(e,t){tl=Fc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yw(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qm(e,n)}}var zc={readContext:xn,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},DO={readContext:xn,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:xn,useEffect:Ax,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,gc(4194308,4,cw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gc(4194308,4,e,t)},useInsertionEffect:function(e,t){return gc(4,2,e,t)},useMemo:function(e,t){var n=tr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=MO.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:Nx,useDebugValue:w0,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=Nx(!1),t=e[0];return e=AO.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,o=tr();if(Oe){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),ot===null)throw Error(O(349));(yi&30)!==0||nw(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ax(ow.bind(null,r,i,e),[e]),r.flags|=2048,xl(9,rw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=tr(),t=ot.identifierPrefix;if(Oe){var n=Mr,r=Ar;n=(r&~(1<<32-qn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[nr]=t,e[ml]=r,Nw(e,t,!1,!1),t.stateNode=e;e:{switch(s=dm(n,r),n){case"dialog":Me("cancel",e),Me("close",e),o=r;break;case"iframe":case"object":case"embed":Me("load",e),o=r;break;case"video":case"audio":for(o=0;oUs&&(t.flags|=128,r=!0,qa(i,!1),t.lanes=4194304)}else{if(!r)if(e=Bc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Oe)return Et(t),null}else 2*Ge()-i.renderingStartTime>Us&&n!==1073741824&&(t.flags|=128,r=!0,qa(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ge(),t.sibling=null,n=Le.current,Ne(Le,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return N0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(rn&1073741824)!==0&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function UO(e,t){switch(l0(t),t.tag){case 1:return Gt(t.type)&&Mc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fs(),Re(Kt),Re(St),b0(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return g0(t),null;case 13:if(Re(Le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Ps()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Le),null;case 4:return Fs(),null;case 10:return f0(t.type._context),null;case 22:case 23:return N0(),null;case 24:return null;default:return null}}var uc=!1,_t=!1,HO=typeof WeakSet=="function"?WeakSet:Set,H=null;function Cs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function Bm(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var Ux=!1;function $O(e,t){if(km=Cc,e=Lk(),s0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wm={focusedElem:e,selectionRange:n},Cc=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Un(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(x){Ue(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return h=Ux,Ux=!1,h}function nl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Bm(t,n,i)}o=o.next}while(o!==r)}}function Qc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Fm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Rw(e){var t=e.alternate;t!==null&&(e.alternate=null,Rw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nr],delete t[ml],delete t[Sm],delete t[_O],delete t[SO])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Dw(e){return e.tag===5||e.tag===3||e.tag===4}function Hx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ac));else if(r!==4&&(e=e.child,e!==null))for(zm(e,t,n),e=e.sibling;e!==null;)zm(e,t,n),e=e.sibling}function Um(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Um(e,t,n),e=e.sibling;e!==null;)Um(e,t,n),e=e.sibling}var dt=null,Hn=!1;function po(e,t,n){for(n=n.child;n!==null;)Ow(e,t,n),n=n.sibling}function Ow(e,t,n){if(rr&&typeof rr.onCommitFiberUnmount=="function")try{rr.onCommitFiberUnmount(Wc,n)}catch{}switch(n.tag){case 5:_t||Cs(n,t);case 6:var r=dt,o=Hn;dt=null,po(e,t,n),dt=r,Hn=o,dt!==null&&(Hn?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(Hn?(e=dt,n=n.stateNode,e.nodeType===8?Vh(e.parentNode,n):e.nodeType===1&&Vh(e,n),cl(e)):Vh(dt,n.stateNode));break;case 4:r=dt,o=Hn,dt=n.stateNode.containerInfo,Hn=!0,po(e,t,n),dt=r,Hn=o;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Bm(n,t,s),o=o.next}while(o!==r)}po(e,t,n);break;case 1:if(!_t&&(Cs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ue(n,t,a)}po(e,t,n);break;case 21:po(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,po(e,t,n),_t=r):po(e,t,n);break;default:po(e,t,n)}}function $x(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HO),t.forEach(function(r){var o=ZO.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function zn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*VO(r/1960))-r,10e?16:e,vo===null)var r=!1;else{if(e=vo,vo=null,$c=0,(pe&6)!==0)throw Error(O(331));var o=pe;for(pe|=4,H=e.current;H!==null;){var i=H,s=i.child;if((H.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;lGe()-C0?hi(e,0):S0|=n),Jt(e,t)}function Hw(e,t){t===0&&((e.mode&1)===0?t=1:(t=Yu,Yu<<=1,(Yu&130023424)===0&&(Yu=4194304)));var n=Bt();e=Ir(e,t),e!==null&&(wl(e,t,n),Jt(e,n))}function YO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hw(e,n)}function ZO(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Hw(e,n)}var $w;$w=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kt.current)jt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return jt=!1,FO(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Oe&&(t.flags&1048576)!==0&&jk(t,Oc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bc(e,t),e=t.pendingProps;var o=Ls(t,St.current);Ds(t,n),o=v0(null,t,r,e,o,n);var i=x0();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gt(r)?(i=!0,Rc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,h0(t),o.updater=Xc,t.stateNode=o,o._reactInternals=t,Rm(t,r,e,n),t=Om(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&a0(t),Pt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=QO(r),e=Un(r,e),o){case 0:t=Dm(null,t,r,e,n);break e;case 1:t=Bx(null,t,r,e,n);break e;case 11:t=Lx(null,t,r,e,n);break e;case 14:t=Px(null,t,r,Un(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),Dm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),Bx(e,t,r,o,n);case 3:e:{if(Sw(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Xk(e,t),Pc(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=zs(Error(O(423)),t),t=Fx(e,t,r,n,o);break e}else if(r!==o){o=zs(Error(O(424)),t),t=Fx(e,t,r,n,o);break e}else for(on=Eo(t.stateNode.containerInfo.firstChild),sn=t,Oe=!0,$n=null,n=Yk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ps(),r===o){t=Lr(e,t,n);break e}Pt(e,t,r,n)}t=t.child}return t;case 5:return Qk(t),e===null&&Nm(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Em(r,o)?s=null:i!==null&&Em(r,i)&&(t.flags|=32),_w(e,t),Pt(e,t,s,n),t.child;case 6:return e===null&&Nm(t),null;case 13:return Cw(e,t,n);case 4:return m0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bs(t,null,r,n):Pt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),Lx(e,t,r,o,n);case 7:return Pt(e,t,t.pendingProps,n),t.child;case 8:return Pt(e,t,t.pendingProps.children,n),t.child;case 12:return Pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ne(Ic,r._currentValue),r._currentValue=s,i!==null)if(Wn(i.value,s)){if(i.children===o.children&&!Kt.current){t=Lr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Rr(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Am(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(O(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Am(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Pt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ds(t,n),o=xn(o),r=r(o),t.flags|=1,Pt(e,t,r,n),t.child;case 14:return r=t.type,o=Un(r,t.pendingProps),o=Un(r.type,o),Px(e,t,r,o,n);case 15:return ww(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),bc(e,t),t.tag=1,Gt(r)?(e=!0,Rc(t)):e=!1,Ds(t,n),vw(t,r,o),Rm(t,r,o,n),Om(null,t,r,!0,e,n);case 19:return Tw(e,t,n);case 22:return Ew(e,t,n)}throw Error(O(156,t.tag))};function qw(e,t){return gk(e,t)}function XO(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,n,r){return new XO(e,t,n,r)}function M0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QO(e){if(typeof e=="function")return M0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jm)return 11;if(e===Ym)return 14}return 2}function To(e,t){var n=e.alternate;return n===null?(n=yn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xc(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")M0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case bs:return mi(n.children,o,i,t);case Gm:s=8,o|=8;break;case tm:return e=yn(12,n,t,o|2),e.elementType=tm,e.lanes=i,e;case nm:return e=yn(13,n,t,o),e.elementType=nm,e.lanes=i,e;case rm:return e=yn(19,n,t,o),e.elementType=rm,e.lanes=i,e;case Qx:return td(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zx:s=10;break e;case Xx:s=9;break e;case Jm:s=11;break e;case Ym:s=14;break e;case ho:s=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=yn(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function mi(e,t,n,r){return e=yn(7,e,r,t),e.lanes=n,e}function td(e,t,n,r){return e=yn(22,e,r,t),e.elementType=Qx,e.lanes=n,e.stateNode={isHidden:!1},e}function Xh(e,t,n){return e=yn(6,e,null,t),e.lanes=n,e}function Qh(e,t,n){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function e6(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ph(0),this.expirationTimes=Ph(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ph(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function R0(e,t,n,r,o,i,s,a,l){return e=new e6(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=yn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},h0(i),e}function t6(e,t,n){var r=3{"use strict";function Gw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gw)}catch{}}Gw(),Jw.exports=Kw()});var Zw=It(L0=>{"use strict";var Yw=qs();L0.createRoot=Yw.createRoot,L0.hydrateRoot=Yw.hydrateRoot;var j$});var nE=It(sd=>{"use strict";var s6=Se(),a6=Symbol.for("react.element"),l6=Symbol.for("react.fragment"),u6=Object.prototype.hasOwnProperty,c6=s6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d6={key:!0,ref:!0,__self:!0,__source:!0};function tE(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)u6.call(t,r)&&!d6.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:a6,type:e,key:i,ref:s,props:o,_owner:c6.current}}sd.Fragment=l6;sd.jsx=tE;sd.jsxs=tE});var Z=It((Z$,rE)=>{"use strict";rE.exports=nE()});var gE=It(mE=>{"use strict";var Ws=Se();function p6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h6=typeof Object.is=="function"?Object.is:p6,m6=Ws.useState,g6=Ws.useEffect,b6=Ws.useLayoutEffect,y6=Ws.useDebugValue;function v6(e,t){var n=t(),r=m6({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return b6(function(){o.value=n,o.getSnapshot=t,z0(o)&&i({inst:o})},[e,n,t]),g6(function(){return z0(o)&&i({inst:o}),e(function(){z0(o)&&i({inst:o})})},[e]),y6(n),n}function z0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!h6(e,n)}catch{return!0}}function x6(e,t){return t()}var k6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x6:v6;mE.useSyncExternalStore=Ws.useSyncExternalStore!==void 0?Ws.useSyncExternalStore:k6});var ad=It((Sq,bE)=>{"use strict";bE.exports=gE()});var HS=It(US=>{"use strict";var of=Se(),_P=ad();function SP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CP=typeof Object.is=="function"?Object.is:SP,TP=_P.useSyncExternalStore,NP=of.useRef,AP=of.useEffect,MP=of.useMemo,RP=of.useDebugValue;US.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=NP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=MP(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,CP(c,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(c=p,h):(c=p,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=TP(e,i[0],i[1]);return AP(function(){s.hasValue=!0,s.value=a},[a]),RP(a),a}});var qS=It((UW,$S)=>{"use strict";$S.exports=HS()});var dN=It((HG,cN)=>{function XT(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&XT(n)}),e}var tp=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function QT(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Yo(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var YB="
",jT=e=>!!e.scope,ZB=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},T1=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=QT(t)}openNode(t){if(!jT(t))return;let n=ZB(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){jT(t)&&(this.buffer+=YB)}value(){return this.buffer}span(t){this.buffer+=``}},KT=(e={})=>{let t={children:[]};return Object.assign(t,e),t},N1=class e{constructor(){this.rootNode=KT(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=KT({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},A1=class extends N1{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new T1(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function fu(e){return e?typeof e=="string"?e:e.source:null}function eN(e){return Ki("(?=",e,")")}function XB(e){return Ki("(?:",e,")*")}function QB(e){return Ki("(?:",e,")?")}function Ki(...e){return e.map(n=>fu(n)).join("")}function eF(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function R1(...e){return"("+(eF(e).capture?"":"?:")+e.map(r=>fu(r)).join("|")+")"}function tN(e){return new RegExp(e.toString()+"|").exec("").length-1}function tF(e,t){let n=e&&e.exec(t);return n&&n.index===0}var nF=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D1(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,i=fu(r),s="";for(;i.length>0;){let a=nF.exec(i);if(!a){s+=i;break}s+=i.substring(0,a.index),i=i.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+o):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}var rF=/\b\B/,nN="[a-zA-Z]\\w*",O1="[a-zA-Z_]\\w*",rN="\\b\\d+(\\.\\d+)?",oN="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",iN="\\b(0b[01]+)",oF="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",iF=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Ki(t,/.*\b/,e.binary,/\b.*/)),Yo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},pu={begin:"\\\\[\\s\\S]",relevance:0},sF={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[pu]},aF={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[pu]},lF={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},rp=function(e,t,n={}){let r=Yo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=R1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ki(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},uF=rp("//","$"),cF=rp("/\\*","\\*/"),dF=rp("#","$"),fF={scope:"number",begin:rN,relevance:0},pF={scope:"number",begin:oN,relevance:0},hF={scope:"number",begin:iN,relevance:0},mF={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[pu,{begin:/\[/,end:/\]/,relevance:0,contains:[pu]}]},gF={scope:"title",begin:nN,relevance:0},bF={scope:"title",begin:O1,relevance:0},yF={begin:"\\.\\s*"+O1,relevance:0},vF=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},ep=Object.freeze({__proto__:null,APOS_STRING_MODE:sF,BACKSLASH_ESCAPE:pu,BINARY_NUMBER_MODE:hF,BINARY_NUMBER_RE:iN,COMMENT:rp,C_BLOCK_COMMENT_MODE:cF,C_LINE_COMMENT_MODE:uF,C_NUMBER_MODE:pF,C_NUMBER_RE:oN,END_SAME_AS_BEGIN:vF,HASH_COMMENT_MODE:dF,IDENT_RE:nN,MATCH_NOTHING_RE:rF,METHOD_GUARD:yF,NUMBER_MODE:fF,NUMBER_RE:rN,PHRASAL_WORDS_MODE:lF,QUOTE_STRING_MODE:aF,REGEXP_MODE:mF,RE_STARTERS_RE:oF,SHEBANG:iF,TITLE_MODE:gF,UNDERSCORE_IDENT_RE:O1,UNDERSCORE_TITLE_MODE:bF});function xF(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function kF(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function wF(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=xF,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function EF(e,t){Array.isArray(e.illegal)&&(e.illegal=R1(...e.illegal))}function _F(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function SF(e,t){e.relevance===void 0&&(e.relevance=1)}var CF=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ki(n.beforeMatch,eN(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},TF=["of","and","for","in","not","or","if","then","parent","list","value"],NF="keyword";function sN(e,t,n=NF){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(i){Object.assign(r,sN(e[i],t,i))}),r;function o(i,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){let l=a.split("|");r[l[0]]=[i,AF(l[0],l[1])]})}}function AF(e,t){return t?Number(t):MF(e)?0:1}function MF(e){return TF.includes(e.toLowerCase())}var GT={},ji=e=>{},JT=(e,...t)=>{},ma=(e,t)=>{GT[`${e}/${t}`]||(GT[`${e}/${t}`]=!0)},np=new Error;function aN(e,t,{key:n}){let r=0,o=e[n],i={},s={};for(let a=1;a<=t.length;a++)s[a+r]=o[a],i[a+r]=!0,r+=tN(t[a-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function RF(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ji("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),np;if(typeof e.beginScope!="object"||e.beginScope===null)throw ji("beginScope must be object"),np;aN(e,e.begin,{key:"beginScope"}),e.begin=D1(e.begin,{joinWith:""})}}function DF(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ji("skip, excludeEnd, returnEnd not compatible with endScope: {}"),np;if(typeof e.endScope!="object"||e.endScope===null)throw ji("endScope must be object"),np;aN(e,e.end,{key:"endScope"}),e.end=D1(e.end,{joinWith:""})}}function OF(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function IF(e){OF(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),RF(e),DF(e)}function LF(e){function t(s,a){return new RegExp(fu(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=tN(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let a=this.regexes.map(l=>l[1]);this.matcherRe=t(D1(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(a);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];let l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(s){let a=new r;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function i(s,a){let l=s;if(s.isCompiled)return l;[kF,_F,IF,CF].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[wF,EF,SF].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=sN(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=fu(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return PF(c==="self"?s:c)})),s.contains.forEach(function(c){i(c,l)}),s.starts&&i(s.starts,a),l.matcher=o(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Yo(e.classNameAliases||{}),i(e)}function lN(e){return e?e.endsWithParent||lN(e.starts):!1}function PF(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Yo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:lN(e)?Yo(e,{starts:e.starts?Yo(e.starts):null}):Object.isFrozen(e)?Yo(e):e}var BF="11.11.1",M1=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},C1=QT,YT=Yo,ZT=Symbol("nomatch"),FF=7,uN=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:A1};function l(S){return a.noHighlightRe.test(S)}function u(S){let M=S.className+" ";M+=S.parentNode?S.parentNode.className:"";let L=a.languageDetectRe.exec(M);if(L){let K=_(L[1]);return K||(JT(i.replace("{}",L[1])),JT("Falling back to no-highlight mode for this block.",S)),K?L[1]:"no-highlight"}return M.split(/\s+/).find(K=>l(K)||_(K))}function c(S,M,L){let K="",re="";typeof M=="object"?(K=S,L=M.ignoreIllegals,re=M.language):(ma("10.7.0","highlight(lang, code, ...args) has been deprecated."),ma("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&&(L=!0);let fe={code:K,language:re};F("before:highlight",fe);let ye=fe.result?fe.result:d(fe.language,fe.code,L);return ye.code=fe.code,F("after:highlight",ye),ye}function d(S,M,L,K){let re=Object.create(null);function fe(z,Y){return z.keywords[Y]}function ye(){if(!te.keywords){ct.addText(Ce);return}let z=0;te.keywordPatternRe.lastIndex=0;let Y=te.keywordPatternRe.exec(Ce),le="";for(;Y;){le+=Ce.substring(z,Y.index);let ve=hn.case_insensitive?Y[0].toLowerCase():Y[0],xt=fe(te,ve);if(xt){let[Cr,LR]=xt;if(ct.addText(le),le="",re[ve]=(re[ve]||0)+1,re[ve]<=FF&&(Bu+=LR),Cr.startsWith("_"))le+=Y[0];else{let PR=hn.classNameAliases[Cr]||Cr;vt(Y[0],PR)}}else le+=Y[0];z=te.keywordPatternRe.lastIndex,Y=te.keywordPatternRe.exec(Ce)}le+=Ce.substring(z),ct.addText(le)}function yt(){if(Ce==="")return;let z=null;if(typeof te.subLanguage=="string"){if(!t[te.subLanguage]){ct.addText(Ce);return}z=d(te.subLanguage,Ce,!0,Pu[te.subLanguage]),Pu[te.subLanguage]=z._top}else z=p(Ce,te.subLanguage.length?te.subLanguage:null);te.relevance>0&&(Bu+=z.relevance),ct.__addSublanguage(z._emitter,z.language)}function ze(){te.subLanguage!=null?yt():ye(),Ce=""}function vt(z,Y){z!==""&&(ct.startScope(Y),ct.addText(z),ct.endScope())}function uo(z,Y){let le=1,ve=Y.length-1;for(;le<=ve;){if(!z._emit[le]){le++;continue}let xt=hn.classNameAliases[z[le]]||z[le],Cr=Y[le];xt?vt(Cr,xt):(Ce=Cr,ye(),Ce=""),le++}}function Iu(z,Y){return z.scope&&typeof z.scope=="string"&&ct.openNode(hn.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(vt(Ce,hn.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Ce=""):z.beginScope._multi&&(uo(z.beginScope,Y),Ce="")),te=Object.create(z,{parent:{value:te}}),te}function Da(z,Y,le){let ve=tF(z.endRe,le);if(ve){if(z["on:end"]){let xt=new tp(z);z["on:end"](Y,xt),xt.isMatchIgnored&&(ve=!1)}if(ve){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return Da(z.parent,Y,le)}function dh(z){return te.matcher.regexIndex===0?(Ce+=z[0],1):(gh=!0,0)}function fh(z){let Y=z[0],le=z.rule,ve=new tp(le),xt=[le.__beforeBegin,le["on:begin"]];for(let Cr of xt)if(Cr&&(Cr(z,ve),ve.isMatchIgnored))return dh(Y);return le.skip?Ce+=Y:(le.excludeBegin&&(Ce+=Y),ze(),!le.returnBegin&&!le.excludeBegin&&(Ce=Y)),Iu(le,z),le.returnBegin?0:Y.length}function ph(z){let Y=z[0],le=M.substring(z.index),ve=Da(te,z,le);if(!ve)return ZT;let xt=te;te.endScope&&te.endScope._wrap?(ze(),vt(Y,te.endScope._wrap)):te.endScope&&te.endScope._multi?(ze(),uo(te.endScope,z)):xt.skip?Ce+=Y:(xt.returnEnd||xt.excludeEnd||(Ce+=Y),ze(),xt.excludeEnd&&(Ce=Y));do te.scope&&ct.closeNode(),!te.skip&&!te.subLanguage&&(Bu+=te.relevance),te=te.parent;while(te!==ve.parent);return ve.starts&&Iu(ve.starts,z),xt.returnEnd?0:Y.length}function hh(){let z=[];for(let Y=te;Y!==hn;Y=Y.parent)Y.scope&&z.unshift(Y.scope);z.forEach(Y=>ct.openNode(Y))}let fs={};function Lu(z,Y){let le=Y&&Y[0];if(Ce+=z,le==null)return ze(),0;if(fs.type==="begin"&&Y.type==="end"&&fs.index===Y.index&&le===""){if(Ce+=M.slice(Y.index,Y.index+1),!o){let ve=new Error(`0 width match regex (${S})`);throw ve.languageName=S,ve.badRule=fs.rule,ve}return 1}if(fs=Y,Y.type==="begin")return fh(Y);if(Y.type==="illegal"&&!L){let ve=new Error('Illegal lexeme "'+le+'" for mode "'+(te.scope||"")+'"');throw ve.mode=te,ve}else if(Y.type==="end"){let ve=ph(Y);if(ve!==ZT)return ve}if(Y.type==="illegal"&&le==="")return Ce+=` -`,1;if(mh>1e5&&mh>Y.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ce+=le,le.length}let hn=_(S);if(!hn)throw ji(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');let Ee=LF(hn),co="",te=K||Ee,Pu={},ct=new a.__emitter(a);hh();let Ce="",Bu=0,ai=0,mh=0,gh=!1;try{if(hn.__emitTokens)hn.__emitTokens(M,ct);else{for(te.matcher.considerAll();;){mh++,gh?gh=!1:te.matcher.considerAll(),te.matcher.lastIndex=ai;let z=te.matcher.exec(M);if(!z)break;let Y=M.substring(ai,z.index),le=Lu(Y,z);ai=z.index+le}Lu(M.substring(ai))}return ct.finalize(),co=ct.toHTML(),{language:S,value:co,relevance:Bu,illegal:!1,_emitter:ct,_top:te}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:S,value:C1(M),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:ai,context:M.slice(ai-100,ai+100),mode:z.mode,resultSoFar:co},_emitter:ct};if(o)return{language:S,value:C1(M),illegal:!1,relevance:0,errorRaised:z,_emitter:ct,_top:te};throw z}}function f(S){let M={value:C1(S),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return M._emitter.addText(S),M}function p(S,M){M=M||a.languages||Object.keys(t);let L=f(S),K=M.filter(_).filter(C).map(ze=>d(ze,S,!1));K.unshift(L);let re=K.sort((ze,vt)=>{if(ze.relevance!==vt.relevance)return vt.relevance-ze.relevance;if(ze.language&&vt.language){if(_(ze.language).supersetOf===vt.language)return 1;if(_(vt.language).supersetOf===ze.language)return-1}return 0}),[fe,ye]=re,yt=fe;return yt.secondBest=ye,yt}function h(S,M,L){let K=M&&n[M]||L;S.classList.add("hljs"),S.classList.add(`language-${K}`)}function m(S){let M=null,L=u(S);if(l(L)||(F("before:highlightElement",{el:S,language:L}),S.dataset.highlighted))return;if(S.children.length>0&&(a.ignoreUnescapedHTML,a.throwUnescapedHTML))throw new M1("One of your code blocks includes unescaped HTML.",S.innerHTML);M=S;let K=M.textContent,re=L?c(K,{language:L,ignoreIllegals:!0}):p(K);S.innerHTML=re.value,S.dataset.highlighted="yes",h(S,L,re.language),S.result={language:re.language,re:re.relevance,relevance:re.relevance},re.secondBest&&(S.secondBest={language:re.secondBest.language,relevance:re.secondBest.relevance}),F("after:highlightElement",{el:S,result:re,text:K})}function b(S){a=YT(a,S)}let g=()=>{x(),ma("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){x(),ma("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let v=!1;function x(){function S(){x()}if(document.readyState==="loading"){v||window.addEventListener("DOMContentLoaded",S,!1),v=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function k(S,M){let L=null;try{L=M(e)}catch(K){if(ji("Language definition for '{}' could not be registered.".replace("{}",S)),o)ji(K);else throw K;L=s}L.name||(L.name=S),t[S]=L,L.rawDefinition=M.bind(null,e),L.aliases&&T(L.aliases,{languageName:S})}function w(S){delete t[S];for(let M of Object.keys(n))n[M]===S&&delete n[M]}function E(){return Object.keys(t)}function _(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function T(S,{languageName:M}){typeof S=="string"&&(S=[S]),S.forEach(L=>{n[L.toLowerCase()]=M})}function C(S){let M=_(S);return M&&!M.disableAutodetect}function U(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=M=>{S["before:highlightBlock"](Object.assign({block:M.el},M))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=M=>{S["after:highlightBlock"](Object.assign({block:M.el},M))})}function V(S){U(S),r.push(S)}function A(S){let M=r.indexOf(S);M!==-1&&r.splice(M,1)}function F(S,M){let L=S;r.forEach(function(K){K[L]&&K[L](M)})}function R(S){return ma("10.7.0","highlightBlock will be removed entirely in v12.0"),ma("10.7.0","Please use highlightElement now."),m(S)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:x,highlightElement:m,highlightBlock:R,configure:b,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:w,listLanguages:E,getLanguage:_,registerAliases:T,autoDetection:C,inherit:YT,addPlugin:V,removePlugin:A}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=BF,e.regex={concat:Ki,lookahead:eN,either:R1,optional:QB,anyNumberOfTimes:XB};for(let S in ep)typeof ep[S]=="object"&&XT(ep[S]);return Object.assign(e,ep),e},ga=uN({});ga.newInstance=()=>uN({});cN.exports=ga;ga.HighlightJS=ga;ga.default=ga});var D3=It((HQ,R3)=>{var Wy=!0,A3=!1,M3=!1;R3.exports=function(e,t){t&&(Wy=!t.enabled,A3=!!t.label,M3=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function T7(e,t){return O7(e[t])&&I7(e[t-1])&&L7(e[t-2])&&P7(e[t])}function N7(e,t){if(e.children.unshift(A7(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),A3)if(M3){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(D7(e.content,n,t))}else e.children.unshift(M7(t)),e.children.push(R7(t))}function A7(e,t){var n=new t("html_inline","",0),r=Wy?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function M7(e){var t=new e("html_inline","",0);return t.content="",t}function D7(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function O7(e){return e.type==="inline"}function I7(e){return e.type==="paragraph_open"}function L7(e){return e.type==="list_item_open"}function P7(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var OR=P(Zw());var lo=P(Se());var Ei=P(Se()),P0;function Xw(){return P0||(P0=acquireVsCodeApi()),P0}function Qw(){let e=(0,Ei.useRef)(Xw()),t=(0,Ei.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,Ei.useCallback)(r=>{let o=i=>{r(i.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,Ei.useEffect)(()=>{e.current=Xw()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var B0=P(Se());var eE=document.createElement("style");eE.textContent=`.header_TicketHeader { +"use strict";(()=>{var QN=Object.create;var Th=Object.defineProperty;var e3=Object.getOwnPropertyDescriptor;var t3=Object.getOwnPropertyNames;var n3=Object.getPrototypeOf,r3=Object.prototype.hasOwnProperty;var Ot=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bs=(e,t)=>{for(var n in t)Th(e,n,{get:t[n],enumerable:!0})},o3=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of t3(t))!r3.call(e,o)&&o!==n&&Th(e,o,{get:()=>t[o],enumerable:!(r=e3(t,o))||r.enumerable});return e};var P=(e,t,n)=>(n=e!=null?QN(n3(e)):{},o3(t||!e||!e.__esModule?Th(n,"default",{value:e,enumerable:!0}):n,e));var Wy=Ot(ue=>{"use strict";var Fs=Symbol.for("react.element"),a3=Symbol.for("react.portal"),i3=Symbol.for("react.fragment"),s3=Symbol.for("react.strict_mode"),l3=Symbol.for("react.profiler"),u3=Symbol.for("react.provider"),c3=Symbol.for("react.context"),d3=Symbol.for("react.forward_ref"),f3=Symbol.for("react.suspense"),p3=Symbol.for("react.memo"),h3=Symbol.for("react.lazy"),Ry=Symbol.iterator;function m3(e){return e===null||typeof e!="object"?null:(e=Ry&&e[Ry]||e["@@iterator"],typeof e=="function"?e:null)}var By={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fy=Object.assign,zy={};function mi(e,t,n){this.props=e,this.context=t,this.refs=zy,this.updater=n||By}mi.prototype.isReactComponent={};mi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uy(){}Uy.prototype=mi.prototype;function Nh(e,t,n){this.props=e,this.context=t,this.refs=zy,this.updater=n||By}var Dh=Nh.prototype=new Uy;Dh.constructor=Nh;Fy(Dh,mi.prototype);Dh.isPureReactComponent=!0;var Oy=Array.isArray,Hy=Object.prototype.hasOwnProperty,Rh={current:null},qy={key:!0,ref:!0,__self:!0,__source:!0};function $y(e,t,n){var r,o={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Hy.call(t,r)&&!qy.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{"use strict";Ky.exports=Wy()});var nk=Ot(Ie=>{"use strict";function zh(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rZu(s,n))lZu(u,s)?(e[r]=u,e[l]=n,r=l):(e[r]=s,e[i]=n,r=i);else if(lZu(u,n))e[r]=u,e[l]=n,r=l;else break e}}return t}function Zu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Gy=performance,Ie.unstable_now=function(){return Gy.now()}):(Ph=Date,jy=Ph.now(),Ie.unstable_now=function(){return Ph.now()-jy});var Gy,Ph,jy,er=[],po=[],k3=1,gn=null,vt=3,ec=!1,da=!1,Us=!1,Zy=typeof setTimeout=="function"?setTimeout:null,Yy=typeof clearTimeout=="function"?clearTimeout:null,Xy=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Uh(e){for(var t=zn(po);t!==null;){if(t.callback===null)Qu(po);else if(t.startTime<=e)Qu(po),t.sortIndex=t.expirationTime,zh(er,t);else break;t=zn(po)}}function Hh(e){if(Us=!1,Uh(e),!da)if(zn(er)!==null)da=!0,$h(qh);else{var t=zn(po);t!==null&&Vh(Hh,t.startTime-e)}}function qh(e,t){da=!1,Us&&(Us=!1,Yy(Hs),Hs=-1),ec=!0;var n=vt;try{for(Uh(t),gn=zn(er);gn!==null&&(!(gn.expirationTime>t)||e&&!tk());){var r=gn.callback;if(typeof r=="function"){gn.callback=null,vt=gn.priorityLevel;var o=r(gn.expirationTime<=t);t=Ie.unstable_now(),typeof o=="function"?gn.callback=o:gn===zn(er)&&Qu(er),Uh(t)}else Qu(er);gn=zn(er)}if(gn!==null)var a=!0;else{var i=zn(po);i!==null&&Vh(Hh,i.startTime-t),a=!1}return a}finally{gn=null,vt=n,ec=!1}}var tc=!1,Yu=null,Hs=-1,Qy=5,ek=-1;function tk(){return!(Ie.unstable_now()-eke||125r?(e.sortIndex=n,zh(po,e),zn(er)===null&&e===zn(po)&&(Us?(Yy(Hs),Hs=-1):Us=!0,Vh(Hh,n-r))):(e.sortIndex=o,zh(er,e),da||ec||(da=!0,$h(qh))),e};Ie.unstable_shouldYield=tk;Ie.unstable_wrapCallback=function(e){var t=vt;return function(){var n=vt;vt=t;try{return e.apply(this,arguments)}finally{vt=n}}}});var ok=Ot((b$,rk)=>{"use strict";rk.exports=nk()});var lw=Ot(cn=>{"use strict";var v3=ke(),ln=ok();function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pm=Object.prototype.hasOwnProperty,C3=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ak={},ik={};function w3(e){return pm.call(ik,e)?!0:pm.call(ak,e)?!1:C3.test(e)?ik[e]=!0:(ak[e]=!0,!1)}function S3(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function E3(e,t,n,r){if(t===null||typeof t>"u"||S3(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zt(e,t,n,r,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new zt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pt[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var o0=/[\-:]([a-z])/g;function a0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(o0,a0);pt[t]=new zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(o0,a0);pt[t]=new zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(o0,a0);pt[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function i0(e,t,n,r){var o=pt.hasOwnProperty(t)?pt[t]:null;(o!==null?o.type!==0:r||!(2s||o[i]!==a[s]){var l=` +`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{Kh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Js(e):""}function L3(e){switch(e.tag){case 5:return Js(e.type);case 16:return Js("Lazy");case 13:return Js("Suspense");case 19:return Js("SuspenseList");case 0:case 2:case 15:return e=Gh(e.type,!1),e;case 11:return e=Gh(e.type.render,!1),e;case 1:return e=Gh(e.type,!0),e;default:return""}}function bm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yi:return"Fragment";case xi:return"Portal";case hm:return"Profiler";case s0:return"StrictMode";case mm:return"Suspense";case gm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pv:return(e.displayName||"Context")+".Consumer";case fv:return(e._context.displayName||"Context")+".Provider";case l0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case u0:return t=e.displayName||null,t!==null?t:bm(e.type)||"Memo";case mo:t=e._payload,e=e._init;try{return bm(e(t))}catch{}}return null}function I3(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bm(t);case 8:return t===s0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ao(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _3(e){var t=mv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rc(e){e._valueTracker||(e._valueTracker=_3(e))}function gv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=mv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xm(e,t){var n=t.checked;return Be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function lk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ao(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function bv(e,t){t=t.checked,t!=null&&i0(e,"checked",t,!1)}function ym(e,t){bv(e,t);var n=Ao(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?km(e,t.type,n):t.hasOwnProperty("defaultValue")&&km(e,t.type,Ao(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function km(e,t,n){(t!=="number"||Mc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zs=Array.isArray;function Ti(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=oc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var el={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},A3=["Webkit","ms","Moz","O"];Object.keys(el).forEach(function(e){A3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),el[t]=el[e]})});function vv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||el.hasOwnProperty(e)&&el[e]?(""+t).trim():t+"px"}function Cv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var T3=Be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wm(e,t){if(t){if(T3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Sm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Em=null;function c0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lm=null,Mi=null,Ni=null;function fk(e){if(e=_l(e)){if(typeof Lm!="function")throw Error(D(280));var t=e.stateNode;t&&(t=ad(t),Lm(e.stateNode,e.type,t))}}function wv(e){Mi?Ni?Ni.push(e):Ni=[e]:Mi=e}function Sv(){if(Mi){var e=Mi,t=Ni;if(Ni=Mi=null,fk(e),t)for(e=0;e>>=0,e===0?32:31-(H3(e)/q3|0)|0}var ac=64,ic=4194304;function Ys(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~o;s!==0?r=Ys(s):(a&=i,a!==0&&(r=Ys(a)))}else i=n&~o,i!==0?r=Ys(i):a!==0&&(r=Ys(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ll(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vn(t),e[t]=n}function K3(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=nl),vk=" ",Ck=!1;function Vv(e,t){switch(e){case"keyup":return kD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ki=!1;function CD(e,t){switch(e){case"compositionend":return Wv(t);case"keypress":return t.which!==32?null:(Ck=!0,vk);case"textInput":return e=t.data,e===vk&&Ck?null:e;default:return null}}function wD(e,t){if(ki)return e==="compositionend"||!x0&&Vv(e,t)?(e=qv(),Cc=m0=yo=null,ki=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ek(n)}}function Xv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jv(){for(var e=window,t=Mc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mc(e.document)}return t}function y0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ND(e){var t=Jv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xv(n.ownerDocument.documentElement,n)){if(r!==null&&y0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=r.end===void 0?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=Lk(n,a);var i=Lk(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,vi=null,Nm=null,ol=null,Dm=!1;function Ik(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dm||vi==null||vi!==Mc(r)||(r=vi,"selectionStart"in r&&y0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ol&&gl(ol,r)||(ol=r,r=Fc(Nm,"onSelect"),0Si||(e.current=zm[Si],zm[Si]=null,Si--)}function _e(e,t){Si++,zm[Si]=e.current,e.current=t}var To={},Et=No(To),jt=No(!1),ya=To;function Bi(e,t){var n=e.type.contextTypes;if(!n)return To;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in n)o[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xt(e){return e=e.childContextTypes,e!=null}function Uc(){Me(jt),Me(Et)}function Pk(e,t,n){if(Et.current!==To)throw Error(D(168));_e(Et,t),_e(jt,n)}function aC(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,I3(e)||"Unknown",o));return Be({},n,r)}function Hc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||To,ya=Et.current,_e(Et,e),_e(jt,jt.current),!0}function Bk(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=aC(e,t,ya),r.__reactInternalMemoizedMergedChildContext=e,Me(jt),Me(Et),_e(Et,e)):Me(jt),_e(jt,n)}var Ar=null,id=!1,om=!1;function iC(e){Ar===null?Ar=[e]:Ar.push(e)}function qD(e){id=!0,iC(e)}function Do(){if(!om&&Ar!==null){om=!0;var e=0,t=ve;try{var n=Ar;for(ve=1;e>=i,o-=i,Tr=1<<32-Vn(t)+o|n<S?(I=w,w=null):I=w.sibling;var L=f(g,w,y[S],k);if(L===null){w===null&&(w=I);break}e&&w&&L.alternate===null&&t(g,w),x=a(L,x,S),C===null?v=L:C.sibling=L,C=L,w=I}if(S===y.length)return n(g,w),De&&fa(g,S),v;if(w===null){for(;SS?(I=w,w=null):I=w.sibling;var U=f(g,w,L.value,k);if(U===null){w===null&&(w=I);break}e&&w&&U.alternate===null&&t(g,w),x=a(U,x,S),C===null?v=U:C.sibling=U,C=U,w=I}if(L.done)return n(g,w),De&&fa(g,S),v;if(w===null){for(;!L.done;S++,L=y.next())L=d(g,L.value,k),L!==null&&(x=a(L,x,S),C===null?v=L:C.sibling=L,C=L);return De&&fa(g,S),v}for(w=r(g,w);!L.done;S++,L=y.next())L=p(w,g,S,L.value,k),L!==null&&(e&&L.alternate!==null&&w.delete(L.key===null?S:L.key),x=a(L,x,S),C===null?v=L:C.sibling=L,C=L);return e&&w.forEach(function(V){return t(g,V)}),De&&fa(g,S),v}function b(g,x,y,k){if(typeof y=="object"&&y!==null&&y.type===yi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case nc:e:{for(var v=y.key,C=x;C!==null;){if(C.key===v){if(v=y.type,v===yi){if(C.tag===7){n(g,C.sibling),x=o(C,y.props.children),x.return=g,g=x;break e}}else if(C.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===mo&&Uk(v)===C.type){n(g,C.sibling),x=o(C,y.props),x.ref=Ks(g,C,y),x.return=g,g=x;break e}n(g,C);break}else t(g,C);C=C.sibling}y.type===yi?(x=xa(y.props.children,g.mode,k,y.key),x.return=g,g=x):(k=Tc(y.type,y.key,y.props,null,g.mode,k),k.ref=Ks(g,x,y),k.return=g,g=k)}return i(g);case xi:e:{for(C=y.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(g,x.sibling),x=o(x,y.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=fm(y,g.mode,k),x.return=g,g=x}return i(g);case mo:return C=y._init,b(g,x,C(y._payload),k)}if(Zs(y))return h(g,x,y,k);if(qs(y))return m(g,x,y,k);bc(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(g,x.sibling),x=o(x,y),x.return=g,g=x):(n(g,x),x=dm(y,g.mode,k),x.return=g,g=x),i(g)):n(g,x)}return b}var zi=cC(!0),dC=cC(!1),Vc=No(null),Wc=null,Ii=null,w0=null;function S0(){w0=Ii=Wc=null}function E0(e){var t=Vc.current;Me(Vc),e._currentValue=t}function qm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ri(e,t){Wc=e,w0=Ii=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Gt=!0),e.firstContext=null)}function vn(e){var t=e._currentValue;if(w0!==e)if(e={context:e,memoizedValue:t,next:null},Ii===null){if(Wc===null)throw Error(D(308));Ii=e,Wc.dependencies={lanes:0,firstContext:e}}else Ii=Ii.next=e;return t}var ma=null;function L0(e){ma===null?ma=[e]:ma.push(e)}function fC(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,L0(t)):(n.next=o.next,o.next=n),t.interleaved=n,Or(e,r)}function Or(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var go=!1;function I0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pC(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Eo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Or(e,n)}return o=r.interleaved,o===null?(t.next=t,L0(r)):(t.next=o.next,o.next=t),r.interleaved=t,Or(e,n)}function Sc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,f0(e,n)}}function Hk(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?o=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?o=a=t:a=a.next=t}else o=a=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Kc(e,t,n,r){var o=e.updateQueue;go=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=o.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Be({},d,f);break e;case 2:go=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);Ca|=i,e.lanes=i,e.memoizedState=d}}function qk(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=im.transition;im.transition={};try{e(!1),t()}finally{ve=n,im.transition=r}}function TC(){return Cn().memoizedState}function KD(e,t,n){var r=Io(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MC(e))NC(t,n);else if(n=fC(e,t,n,r),n!==null){var o=Ft();Wn(n,e,r,o),DC(n,t,r)}}function GD(e,t,n){var r=Io(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MC(e))NC(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,Kn(s,i)){var l=t.interleaved;l===null?(o.next=o,L0(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=fC(e,t,o,r),n!==null&&(o=Ft(),Wn(n,e,r,o),DC(n,t,r))}}function MC(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function NC(e,t){al=jc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function DC(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,f0(e,n)}}var Xc={readContext:vn,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},jD={readContext:vn,useCallback:function(e,t){return nr().memoizedState=[e,t===void 0?null:t],e},useContext:vn,useEffect:Vk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Lc(4194308,4,EC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Lc(4,2,e,t)},useMemo:function(e,t){var n=nr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=KD.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=nr();return e={current:e},t.memoizedState=e},useState:$k,useDebugValue:O0,useDeferredValue:function(e){return nr().memoizedState=e},useTransition:function(){var e=$k(!1),t=e[0];return e=WD.bind(null,e[1]),nr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,o=nr();if(De){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ot===null)throw Error(D(349));(va&30)!==0||bC(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Vk(yC.bind(null,r,a,e),[e]),r.flags|=2048,Sl(9,xC.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=nr(),t=ot.identifierPrefix;if(De){var n=Mr,r=Tr;n=(r&~(1<<32-Vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[rr]=t,e[yl]=r,$C(e,t,!1,!1),t.stateNode=e;e:{switch(i=Sm(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;oqi&&(t.flags|=128,r=!0,Gs(a,!1),t.lanes=4194304)}else{if(!r)if(e=Gc(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!De)return wt(t),null}else 2*je()-a.renderingStartTime>qi&&n!==1073741824&&(t.flags|=128,r=!0,Gs(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=je(),t.sibling=null,n=Oe.current,_e(Oe,r?n&1|2:n&1),t):(wt(t),null);case 22:case 23:return H0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(on&1073741824)!==0&&(wt(t),t.subtreeFlags&6&&(t.flags|=8192)):wt(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function nR(e,t){switch(v0(t),t.tag){case 1:return Xt(t.type)&&Uc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui(),Me(jt),Me(Et),T0(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return A0(t),null;case 13:if(Me(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Oe),null;case 4:return Ui(),null;case 10:return E0(t.type._context),null;case 22:case 23:return H0(),null;case 24:return null;default:return null}}var yc=!1,St=!1,rR=typeof WeakSet=="function"?WeakSet:Set,H=null;function _i(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function Jm(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var tv=!1;function oR(e,t){if(Rm=Pc,e=Jv(),y0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=i+o),d!==a||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=i),f===a&&++c===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Om={focusedElem:e,selectionRange:n},Pc=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Hn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(k){Ue(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return h=tv,tv=!1,h}function il(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&Jm(t,n,a)}o=o.next}while(o!==r)}}function ud(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function KC(e){var t=e.alternate;t!==null&&(e.alternate=null,KC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rr],delete t[yl],delete t[Fm],delete t[UD],delete t[HD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function GC(e){return e.tag===5||e.tag===3||e.tag===4}function nv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GC(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ym(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=zc));else if(r!==4&&(e=e.child,e!==null))for(Ym(e,t,n),e=e.sibling;e!==null;)Ym(e,t,n),e=e.sibling}function Qm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qm(e,t,n),e=e.sibling;e!==null;)Qm(e,t,n),e=e.sibling}var dt=null,qn=!1;function ho(e,t,n){for(n=n.child;n!==null;)jC(e,t,n),n=n.sibling}function jC(e,t,n){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(td,n)}catch{}switch(n.tag){case 5:St||_i(n,t);case 6:var r=dt,o=qn;dt=null,ho(e,t,n),dt=r,qn=o,dt!==null&&(qn?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(qn?(e=dt,n=n.stateNode,e.nodeType===8?rm(e.parentNode,n):e.nodeType===1&&rm(e,n),hl(e)):rm(dt,n.stateNode));break;case 4:r=dt,o=qn,dt=n.stateNode.containerInfo,qn=!0,ho(e,t,n),dt=r,qn=o;break;case 0:case 11:case 14:case 15:if(!St&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&((a&2)!==0||(a&4)!==0)&&Jm(n,t,i),o=o.next}while(o!==r)}ho(e,t,n);break;case 1:if(!St&&(_i(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ue(n,t,s)}ho(e,t,n);break;case 21:ho(e,t,n);break;case 22:n.mode&1?(St=(r=St)||n.memoizedState!==null,ho(e,t,n),St=r):ho(e,t,n);break;default:ho(e,t,n)}}function rv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rR),t.forEach(function(r){var o=pR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Un(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~a}if(r=o,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iR(r/1960))-r,10e?16:e,ko===null)var r=!1;else{if(e=ko,ko=null,Yc=0,(pe&6)!==0)throw Error(D(331));var o=pe;for(pe|=4,H=e.current;H!==null;){var a=H,i=a.child;if((H.flags&16)!==0){var s=a.deletions;if(s!==null){for(var l=0;lje()-z0?ba(e,0):F0|=n),Jt(e,t)}function nw(e,t){t===0&&((e.mode&1)===0?t=1:(t=ic,ic<<=1,(ic&130023424)===0&&(ic=4194304)));var n=Ft();e=Or(e,t),e!==null&&(Ll(e,t,n),Jt(e,n))}function fR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nw(e,n)}function pR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),nw(e,n)}var rw;rw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Gt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Gt=!1,eR(e,t,n);Gt=(e.flags&131072)!==0}else Gt=!1,De&&(t.flags&1048576)!==0&&sC(t,$c,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ic(e,t),e=t.pendingProps;var o=Bi(t,Et.current);Ri(t,n),o=N0(null,t,r,e,o,n);var a=D0();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xt(r)?(a=!0,Hc(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,I0(t),o.updater=ld,t.stateNode=o,o._reactInternals=t,Vm(t,r,e,n),t=Km(null,t,r,!0,a,n)):(t.tag=0,De&&a&&k0(t),Bt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ic(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=mR(r),e=Hn(r,e),o){case 0:t=Wm(null,t,r,e,n);break e;case 1:t=Yk(null,t,r,e,n);break e;case 11:t=Jk(null,t,r,e,n);break e;case 14:t=Zk(null,t,r,Hn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),Wm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),Yk(e,t,r,o,n);case 3:e:{if(UC(t),e===null)throw Error(D(387));r=t.pendingProps,a=t.memoizedState,o=a.element,pC(e,t),Kc(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Hi(Error(D(423)),t),t=Qk(e,t,r,n,o);break e}else if(r!==o){o=Hi(Error(D(424)),t),t=Qk(e,t,r,n,o);break e}else for(an=So(t.stateNode.containerInfo.firstChild),sn=t,De=!0,$n=null,n=dC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fi(),r===o){t=Pr(e,t,n);break e}Bt(e,t,r,n)}t=t.child}return t;case 5:return hC(t),e===null&&Hm(t),r=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,Pm(r,o)?i=null:a!==null&&Pm(r,a)&&(t.flags|=32),zC(e,t),Bt(e,t,i,n),t.child;case 6:return e===null&&Hm(t),null;case 13:return HC(e,t,n);case 4:return _0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zi(t,null,r,n):Bt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),Jk(e,t,r,o,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,_e(Vc,r._currentValue),r._currentValue=i,a!==null)if(Kn(a.value,i)){if(a.children===o.children&&!jt.current){t=Pr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Nr(-1,n&-n),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),qm(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(D(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),qm(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Bt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ri(t,n),o=vn(o),r=r(o),t.flags|=1,Bt(e,t,r,n),t.child;case 14:return r=t.type,o=Hn(r,t.pendingProps),o=Hn(r.type,o),Zk(e,t,r,o,n);case 15:return BC(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),Ic(e,t),t.tag=1,Xt(r)?(e=!0,Hc(t)):e=!1,Ri(t,n),RC(t,r,o),Vm(t,r,o,n),Km(null,t,r,!0,e,n);case 19:return qC(e,t,n);case 22:return FC(e,t,n)}throw Error(D(156,t.tag))};function ow(e,t){return Mv(e,t)}function hR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,n,r){return new hR(e,t,n,r)}function $0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mR(e){if(typeof e=="function")return $0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l0)return 11;if(e===u0)return 14}return 2}function _o(e,t){var n=e.alternate;return n===null?(n=yn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tc(e,t,n,r,o,a){var i=2;if(r=e,typeof e=="function")$0(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case yi:return xa(n.children,o,a,t);case s0:i=8,o|=8;break;case hm:return e=yn(12,n,t,o|2),e.elementType=hm,e.lanes=a,e;case mm:return e=yn(13,n,t,o),e.elementType=mm,e.lanes=a,e;case gm:return e=yn(19,n,t,o),e.elementType=gm,e.lanes=a,e;case hv:return dd(n,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fv:i=10;break e;case pv:i=9;break e;case l0:i=11;break e;case u0:i=14;break e;case mo:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=yn(i,n,t,o),t.elementType=e,t.type=r,t.lanes=a,t}function xa(e,t,n,r){return e=yn(7,e,r,t),e.lanes=n,e}function dd(e,t,n,r){return e=yn(22,e,r,t),e.elementType=hv,e.lanes=n,e.stateNode={isHidden:!1},e}function dm(e,t,n){return e=yn(6,e,null,t),e.lanes=n,e}function fm(e,t,n){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gR(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xh(0),this.expirationTimes=Xh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xh(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function V0(e,t,n,r,o,a,i,s,l){return e=new gR(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=yn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},I0(a),e}function bR(e,t,n){var r=3{"use strict";function uw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uw)}catch{}}uw(),cw.exports=lw()});var fw=Ot(j0=>{"use strict";var dw=Wi();j0.createRoot=dw.createRoot,j0.hydrateRoot=dw.hydrateRoot;var k$});var bw=Ot(gd=>{"use strict";var CR=ke(),wR=Symbol.for("react.element"),SR=Symbol.for("react.fragment"),ER=Object.prototype.hasOwnProperty,LR=CR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,IR={key:!0,ref:!0,__self:!0,__source:!0};function gw(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)ER.call(t,r)&&!IR.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:wR,type:e,key:a,ref:i,props:o,_owner:LR.current}}gd.Fragment=SR;gd.jsx=gw;gd.jsxs=gw});var Z=Ot((E$,xw)=>{"use strict";xw.exports=bw()});var Mw=Ot(Tw=>{"use strict";var Gi=ke();function AR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TR=typeof Object.is=="function"?Object.is:AR,MR=Gi.useState,NR=Gi.useEffect,DR=Gi.useLayoutEffect,RR=Gi.useDebugValue;function OR(e,t){var n=t(),r=MR({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return DR(function(){o.value=n,o.getSnapshot=t,Y0(o)&&a({inst:o})},[e,n,t]),NR(function(){return Y0(o)&&a({inst:o}),e(function(){Y0(o)&&a({inst:o})})},[e]),RR(n),n}function Y0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!TR(e,n)}catch{return!0}}function PR(e,t){return t()}var BR=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?PR:OR;Tw.useSyncExternalStore=Gi.useSyncExternalStore!==void 0?Gi.useSyncExternalStore:BR});var bd=Ot((Q$,Nw)=>{"use strict";Nw.exports=Mw()});var QE=Ot(YE=>{"use strict";var gf=ke(),$B=bd();function VB(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var WB=typeof Object.is=="function"?Object.is:VB,KB=$B.useSyncExternalStore,GB=gf.useRef,jB=gf.useEffect,XB=gf.useMemo,JB=gf.useDebugValue;YE.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var a=GB(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=XB(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&i.hasValue){var h=i.value;if(o(h,p))return d=h}return d=p}if(h=d,WB(c,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(c=p,h):(c=p,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var s=KB(e,a[0],a[1]);return jB(function(){i.hasValue=!0,i.value=s},[s]),JB(s),s}});var tL=Ot((hK,eL)=>{"use strict";eL.exports=QE()});var w_=Ot((mX,C_)=>{function c_(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&c_(n)}),e}var fp=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function d_(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Zo(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var m5="",o_=e=>!!e.scope,g5=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},H1=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=d_(t)}openNode(t){if(!o_(t))return;let n=g5(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){o_(t)&&(this.buffer+=m5)}value(){return this.buffer}span(t){this.buffer+=``}},a_=(e={})=>{let t={children:[]};return Object.assign(t,e),t},q1=class e{constructor(){this.rootNode=a_(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=a_({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},$1=class extends q1{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new H1(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function gu(e){return e?typeof e=="string"?e:e.source:null}function f_(e){return Ja("(?=",e,")")}function b5(e){return Ja("(?:",e,")*")}function x5(e){return Ja("(?:",e,")?")}function Ja(...e){return e.map(n=>gu(n)).join("")}function y5(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function W1(...e){return"("+(y5(e).capture?"":"?:")+e.map(r=>gu(r)).join("|")+")"}function p_(e){return new RegExp(e.toString()+"|").exec("").length-1}function k5(e,t){let n=e&&e.exec(t);return n&&n.index===0}var v5=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function K1(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,a=gu(r),i="";for(;a.length>0;){let s=v5.exec(a);if(!s){i+=a;break}i+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?i+="\\"+String(Number(s[1])+o):(i+=s[0],s[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(t)}var C5=/\b\B/,h_="[a-zA-Z]\\w*",G1="[a-zA-Z_]\\w*",m_="\\b\\d+(\\.\\d+)?",g_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",b_="\\b(0b[01]+)",w5="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",S5=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Ja(t,/.*\b/,e.binary,/\b.*/)),Zo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},bu={begin:"\\\\[\\s\\S]",relevance:0},E5={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[bu]},L5={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[bu]},I5={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},hp=function(e,t,n={}){let r=Zo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=W1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ja(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},_5=hp("//","$"),A5=hp("/\\*","\\*/"),T5=hp("#","$"),M5={scope:"number",begin:m_,relevance:0},N5={scope:"number",begin:g_,relevance:0},D5={scope:"number",begin:b_,relevance:0},R5={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[bu,{begin:/\[/,end:/\]/,relevance:0,contains:[bu]}]},O5={scope:"title",begin:h_,relevance:0},P5={scope:"title",begin:G1,relevance:0},B5={begin:"\\.\\s*"+G1,relevance:0},F5=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},dp=Object.freeze({__proto__:null,APOS_STRING_MODE:E5,BACKSLASH_ESCAPE:bu,BINARY_NUMBER_MODE:D5,BINARY_NUMBER_RE:b_,COMMENT:hp,C_BLOCK_COMMENT_MODE:A5,C_LINE_COMMENT_MODE:_5,C_NUMBER_MODE:N5,C_NUMBER_RE:g_,END_SAME_AS_BEGIN:F5,HASH_COMMENT_MODE:T5,IDENT_RE:h_,MATCH_NOTHING_RE:C5,METHOD_GUARD:B5,NUMBER_MODE:M5,NUMBER_RE:m_,PHRASAL_WORDS_MODE:I5,QUOTE_STRING_MODE:L5,REGEXP_MODE:R5,RE_STARTERS_RE:w5,SHEBANG:S5,TITLE_MODE:O5,UNDERSCORE_IDENT_RE:G1,UNDERSCORE_TITLE_MODE:P5});function z5(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function U5(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function H5(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=z5,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function q5(e,t){Array.isArray(e.illegal)&&(e.illegal=W1(...e.illegal))}function $5(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function V5(e,t){e.relevance===void 0&&(e.relevance=1)}var W5=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ja(n.beforeMatch,f_(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},K5=["of","and","for","in","not","or","if","then","parent","list","value"],G5="keyword";function x_(e,t,n=G5){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(a){Object.assign(r,x_(e[a],t,a))}),r;function o(a,i){t&&(i=i.map(s=>s.toLowerCase())),i.forEach(function(s){let l=s.split("|");r[l[0]]=[a,j5(l[0],l[1])]})}}function j5(e,t){return t?Number(t):X5(e)?0:1}function X5(e){return K5.includes(e.toLowerCase())}var i_={},Xa=e=>{},s_=(e,...t)=>{},xs=(e,t)=>{i_[`${e}/${t}`]||(i_[`${e}/${t}`]=!0)},pp=new Error;function y_(e,t,{key:n}){let r=0,o=e[n],a={},i={};for(let s=1;s<=t.length;s++)i[s+r]=o[s],a[s+r]=!0,r+=p_(t[s-1]);e[n]=i,e[n]._emit=a,e[n]._multi=!0}function J5(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Xa("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),pp;if(typeof e.beginScope!="object"||e.beginScope===null)throw Xa("beginScope must be object"),pp;y_(e,e.begin,{key:"beginScope"}),e.begin=K1(e.begin,{joinWith:""})}}function Z5(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Xa("skip, excludeEnd, returnEnd not compatible with endScope: {}"),pp;if(typeof e.endScope!="object"||e.endScope===null)throw Xa("endScope must be object"),pp;y_(e,e.end,{key:"endScope"}),e.end=K1(e.end,{joinWith:""})}}function Y5(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Q5(e){Y5(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),J5(e),Z5(e)}function ez(e){function t(i,s){return new RegExp(gu(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=p_(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let s=this.regexes.map(l=>l[1]);this.matcherRe=t(K1(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(s);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];let l=new n;return this.rules.slice(s).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(s);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(i){let s=new r;return i.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),i.terminatorEnd&&s.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&s.addRule(i.illegal,{type:"illegal"}),s}function a(i,s){let l=i;if(i.isCompiled)return l;[U5,$5,Q5,W5].forEach(c=>c(i,s)),e.compilerExtensions.forEach(c=>c(i,s)),i.__beforeBegin=null,[H5,q5,V5].forEach(c=>c(i,s)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=x_(i.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),s&&(i.begin||(i.begin=/\B|\b/),l.beginRe=t(l.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(l.endRe=t(l.end)),l.terminatorEnd=gu(l.end)||"",i.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+s.terminatorEnd)),i.illegal&&(l.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(c){return tz(c==="self"?i:c)})),i.contains.forEach(function(c){a(c,l)}),i.starts&&a(i.starts,s),l.matcher=o(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Zo(e.classNameAliases||{}),a(e)}function k_(e){return e?e.endsWithParent||k_(e.starts):!1}function tz(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Zo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:k_(e)?Zo(e,{starts:e.starts?Zo(e.starts):null}):Object.isFrozen(e)?Zo(e):e}var nz="11.11.1",V1=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},U1=d_,l_=Zo,u_=Symbol("nomatch"),rz=7,v_=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,a="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]},s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:$1};function l(E){return s.noHighlightRe.test(E)}function u(E){let T=E.className+" ";T+=E.parentNode?E.parentNode.className:"";let O=s.languageDetectRe.exec(T);if(O){let G=S(O[1]);return G||(s_(a.replace("{}",O[1])),s_("Falling back to no-highlight mode for this block.",E)),G?O[1]:"no-highlight"}return T.split(/\s+/).find(G=>l(G)||S(G))}function c(E,T,O){let G="",oe="";typeof T=="object"?(G=E,O=T.ignoreIllegals,oe=T.language):(xs("10.7.0","highlight(lang, code, ...args) has been deprecated."),xs("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),oe=E,G=T),O===void 0&&(O=!0);let fe={code:G,language:oe};F("before:highlight",fe);let xe=fe.result?fe.result:d(fe.language,fe.code,O);return xe.code=fe.code,F("after:highlight",xe),xe}function d(E,T,O,G){let oe=Object.create(null);function fe(z,J){return z.keywords[J]}function xe(){if(!te.keywords){ct.addText(Le);return}let z=0;te.keywordPatternRe.lastIndex=0;let J=te.keywordPatternRe.exec(Le),le="";for(;J;){le+=Le.substring(z,J.index);let ye=mn.case_insensitive?J[0].toLowerCase():J[0],kt=fe(te,ye);if(kt){let[Ir,ZN]=kt;if(ct.addText(le),le="",oe[ye]=(oe[ye]||0)+1,oe[ye]<=rz&&(Gu+=ZN),Ir.startsWith("_"))le+=J[0];else{let YN=mn.classNameAliases[Ir]||Ir;yt(J[0],YN)}}else le+=J[0];z=te.keywordPatternRe.lastIndex,J=te.keywordPatternRe.exec(Le)}le+=Le.substring(z),ct.addText(le)}function xt(){if(Le==="")return;let z=null;if(typeof te.subLanguage=="string"){if(!t[te.subLanguage]){ct.addText(Le);return}z=d(te.subLanguage,Le,!0,Ku[te.subLanguage]),Ku[te.subLanguage]=z._top}else z=p(Le,te.subLanguage.length?te.subLanguage:null);te.relevance>0&&(Gu+=z.relevance),ct.__addSublanguage(z._emitter,z.language)}function ze(){te.subLanguage!=null?xt():xe(),Le=""}function yt(z,J){z!==""&&(ct.startScope(J),ct.addText(z),ct.endScope())}function co(z,J){let le=1,ye=J.length-1;for(;le<=ye;){if(!z._emit[le]){le++;continue}let kt=mn.classNameAliases[z[le]]||z[le],Ir=J[le];kt?yt(Ir,kt):(Le=Ir,xe(),Le=""),le++}}function Vu(z,J){return z.scope&&typeof z.scope=="string"&&ct.openNode(mn.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(yt(Le,mn.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Le=""):z.beginScope._multi&&(co(z.beginScope,J),Le="")),te=Object.create(z,{parent:{value:te}}),te}function Ps(z,J,le){let ye=k5(z.endRe,le);if(ye){if(z["on:end"]){let kt=new fp(z);z["on:end"](J,kt),kt.isMatchIgnored&&(ye=!1)}if(ye){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return Ps(z.parent,J,le)}function Sh(z){return te.matcher.regexIndex===0?(Le+=z[0],1):(Ah=!0,0)}function Eh(z){let J=z[0],le=z.rule,ye=new fp(le),kt=[le.__beforeBegin,le["on:begin"]];for(let Ir of kt)if(Ir&&(Ir(z,ye),ye.isMatchIgnored))return Sh(J);return le.skip?Le+=J:(le.excludeBegin&&(Le+=J),ze(),!le.returnBegin&&!le.excludeBegin&&(Le=J)),Vu(le,z),le.returnBegin?0:J.length}function Lh(z){let J=z[0],le=T.substring(z.index),ye=Ps(te,z,le);if(!ye)return u_;let kt=te;te.endScope&&te.endScope._wrap?(ze(),yt(J,te.endScope._wrap)):te.endScope&&te.endScope._multi?(ze(),co(te.endScope,z)):kt.skip?Le+=J:(kt.returnEnd||kt.excludeEnd||(Le+=J),ze(),kt.excludeEnd&&(Le=J));do te.scope&&ct.closeNode(),!te.skip&&!te.subLanguage&&(Gu+=te.relevance),te=te.parent;while(te!==ye.parent);return ye.starts&&Vu(ye.starts,z),kt.returnEnd?0:J.length}function Ih(){let z=[];for(let J=te;J!==mn;J=J.parent)J.scope&&z.unshift(J.scope);z.forEach(J=>ct.openNode(J))}let hi={};function Wu(z,J){let le=J&&J[0];if(Le+=z,le==null)return ze(),0;if(hi.type==="begin"&&J.type==="end"&&hi.index===J.index&&le===""){if(Le+=T.slice(J.index,J.index+1),!o){let ye=new Error(`0 width match regex (${E})`);throw ye.languageName=E,ye.badRule=hi.rule,ye}return 1}if(hi=J,J.type==="begin")return Eh(J);if(J.type==="illegal"&&!O){let ye=new Error('Illegal lexeme "'+le+'" for mode "'+(te.scope||"")+'"');throw ye.mode=te,ye}else if(J.type==="end"){let ye=Lh(J);if(ye!==u_)return ye}if(J.type==="illegal"&&le==="")return Le+=` +`,1;if(_h>1e5&&_h>J.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Le+=le,le.length}let mn=S(E);if(!mn)throw Xa(a.replace("{}",E)),new Error('Unknown language: "'+E+'"');let Se=ez(mn),fo="",te=G||Se,Ku={},ct=new s.__emitter(s);Ih();let Le="",Gu=0,ca=0,_h=0,Ah=!1;try{if(mn.__emitTokens)mn.__emitTokens(T,ct);else{for(te.matcher.considerAll();;){_h++,Ah?Ah=!1:te.matcher.considerAll(),te.matcher.lastIndex=ca;let z=te.matcher.exec(T);if(!z)break;let J=T.substring(ca,z.index),le=Wu(J,z);ca=z.index+le}Wu(T.substring(ca))}return ct.finalize(),fo=ct.toHTML(),{language:E,value:fo,relevance:Gu,illegal:!1,_emitter:ct,_top:te}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:E,value:U1(T),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:ca,context:T.slice(ca-100,ca+100),mode:z.mode,resultSoFar:fo},_emitter:ct};if(o)return{language:E,value:U1(T),illegal:!1,relevance:0,errorRaised:z,_emitter:ct,_top:te};throw z}}function f(E){let T={value:U1(E),illegal:!1,relevance:0,_top:i,_emitter:new s.__emitter(s)};return T._emitter.addText(E),T}function p(E,T){T=T||s.languages||Object.keys(t);let O=f(E),G=T.filter(S).filter(L).map(ze=>d(ze,E,!1));G.unshift(O);let oe=G.sort((ze,yt)=>{if(ze.relevance!==yt.relevance)return yt.relevance-ze.relevance;if(ze.language&&yt.language){if(S(ze.language).supersetOf===yt.language)return 1;if(S(yt.language).supersetOf===ze.language)return-1}return 0}),[fe,xe]=oe,xt=fe;return xt.secondBest=xe,xt}function h(E,T,O){let G=T&&n[T]||O;E.classList.add("hljs"),E.classList.add(`language-${G}`)}function m(E){let T=null,O=u(E);if(l(O)||(F("before:highlightElement",{el:E,language:O}),E.dataset.highlighted))return;if(E.children.length>0&&(s.ignoreUnescapedHTML,s.throwUnescapedHTML))throw new V1("One of your code blocks includes unescaped HTML.",E.innerHTML);T=E;let G=T.textContent,oe=O?c(G,{language:O,ignoreIllegals:!0}):p(G);E.innerHTML=oe.value,E.dataset.highlighted="yes",h(E,O,oe.language),E.result={language:oe.language,re:oe.relevance,relevance:oe.relevance},oe.secondBest&&(E.secondBest={language:oe.secondBest.language,relevance:oe.secondBest.relevance}),F("after:highlightElement",{el:E,result:oe,text:G})}function b(E){s=l_(s,E)}let g=()=>{k(),xs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){k(),xs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function k(){function E(){k()}if(document.readyState==="loading"){y||window.addEventListener("DOMContentLoaded",E,!1),y=!0;return}document.querySelectorAll(s.cssSelector).forEach(m)}function v(E,T){let O=null;try{O=T(e)}catch(G){if(Xa("Language definition for '{}' could not be registered.".replace("{}",E)),o)Xa(G);else throw G;O=i}O.name||(O.name=E),t[E]=O,O.rawDefinition=T.bind(null,e),O.aliases&&I(O.aliases,{languageName:E})}function C(E){delete t[E];for(let T of Object.keys(n))n[T]===E&&delete n[T]}function w(){return Object.keys(t)}function S(E){return E=(E||"").toLowerCase(),t[E]||t[n[E]]}function I(E,{languageName:T}){typeof E=="string"&&(E=[E]),E.forEach(O=>{n[O.toLowerCase()]=T})}function L(E){let T=S(E);return T&&!T.disableAutodetect}function U(E){E["before:highlightBlock"]&&!E["before:highlightElement"]&&(E["before:highlightElement"]=T=>{E["before:highlightBlock"](Object.assign({block:T.el},T))}),E["after:highlightBlock"]&&!E["after:highlightElement"]&&(E["after:highlightElement"]=T=>{E["after:highlightBlock"](Object.assign({block:T.el},T))})}function V(E){U(E),r.push(E)}function A(E){let T=r.indexOf(E);T!==-1&&r.splice(T,1)}function F(E,T){let O=E;r.forEach(function(G){G[O]&&G[O](T)})}function M(E){return xs("10.7.0","highlightBlock will be removed entirely in v12.0"),xs("10.7.0","Please use highlightElement now."),m(E)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:k,highlightElement:m,highlightBlock:M,configure:b,initHighlighting:g,initHighlightingOnLoad:x,registerLanguage:v,unregisterLanguage:C,listLanguages:w,getLanguage:S,registerAliases:I,autoDetection:L,inherit:l_,addPlugin:V,removePlugin:A}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=nz,e.regex={concat:Ja,lookahead:f_,either:W1,optional:x5,anyNumberOfTimes:b5};for(let E in dp)typeof dp[E]=="object"&&c_(dp[E]);return Object.assign(e,dp),e},ys=v_({});ys.newInstance=()=>v_({});C_.exports=ys;ys.HighlightJS=ys;ys.default=ys});var VT=Ot((mee,$T)=>{var ay=!0,HT=!1,qT=!1;$T.exports=function(e,t){t&&(ay=!t.enabled,HT=!!t.label,qT=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function KU(e,t){return YU(e[t])&&QU(e[t-1])&&e7(e[t-2])&&t7(e[t])}function GU(e,t){if(e.children.unshift(jU(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),HT)if(qT){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(ZU(e.content,n,t))}else e.children.unshift(XU(t)),e.children.push(JU(t))}function jU(e,t){var n=new t("html_inline","",0),r=ay?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function XU(e){var t=new e("html_inline","",0);return t.content="",t}function ZU(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function YU(e){return e.type==="inline"}function QU(e){return e.type==="paragraph_open"}function e7(e){return e.type==="list_item_open"}function t7(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var XN=P(fw());var uo=P(ke());var La=P(ke()),X0;function pw(){return X0||(X0=acquireVsCodeApi()),X0}function hw(){let e=(0,La.useRef)(pw()),t=(0,La.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,La.useCallback)(r=>{let o=a=>{r(a.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,La.useEffect)(()=>{e.current=pw()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var J0=P(ke());var mw=document.createElement("style");mw.textContent=`.header_TicketHeader { padding: 16px 20px; border-bottom: 1px solid var(--vscode-panel-border); background-color: var(--vscode-editor-background); @@ -92,7 +92,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& font-weight: 500; } -`;document.head.appendChild(eE);var Ct={header:"header_TicketHeader",headerTop:"headerTop_TicketHeader",issueKey:"issueKey_TicketHeader",typeIcon:"typeIcon_TicketHeader",status:"status_TicketHeader",summary:"summary_TicketHeader",editContainer:"editContainer_TicketHeader",summaryInput:"summaryInput_TicketHeader",metadata:"metadata_TicketHeader",metadataItem:"metadataItem_TicketHeader",label:"label_TicketHeader"};var Je=P(Z()),oE=({issueKey:e,summary:t,statusName:n,statusCategory:r,issueType:o,issueTypeIcon:i,priority:s,reporter:a,onUpdateSummary:l})=>{let[u,c]=(0,B0.useState)(!1),[d,f]=(0,B0.useState)(t),p=()=>{d.trim()&&d!==t&&l(d.trim()),c(!1)},h=()=>{switch(r){case"done":return"#10b981";case"indeterminate":return"#f59e0b";case"new":default:return"#6b7280"}};return(0,Je.jsxs)("div",{className:Ct.header,children:[(0,Je.jsxs)("div",{className:Ct.headerTop,children:[(0,Je.jsxs)("div",{className:Ct.issueKey,children:[i&&(0,Je.jsx)("img",{src:i,alt:o,className:Ct.typeIcon}),(0,Je.jsx)("span",{children:e})]}),(0,Je.jsx)("div",{className:Ct.status,style:{backgroundColor:h()},children:n})]}),u?(0,Je.jsx)("div",{className:Ct.editContainer,children:(0,Je.jsx)("input",{type:"text",value:d,onChange:m=>f(m.target.value),onKeyDown:m=>{m.key==="Enter"&&p(),m.key==="Escape"&&(f(t),c(!1))},onBlur:p,autoFocus:!0,className:Ct.summaryInput})}):(0,Je.jsx)("h1",{className:Ct.summary,onClick:()=>c(!0),title:"Click to edit",children:t}),(0,Je.jsxs)("div",{className:Ct.metadata,children:[(0,Je.jsxs)("div",{className:Ct.metadataItem,children:[(0,Je.jsx)("span",{className:Ct.label,children:"Type:"}),(0,Je.jsx)("span",{children:o})]}),(0,Je.jsxs)("div",{className:Ct.metadataItem,children:[(0,Je.jsx)("span",{className:Ct.label,children:"Priority:"}),(0,Je.jsx)("span",{children:s?.name||"None"})]}),(0,Je.jsxs)("div",{className:Ct.metadataItem,children:[(0,Je.jsx)("span",{className:Ct.label,children:"Reporter:"}),(0,Je.jsx)("span",{children:a.displayName})]})]})]})};var iE=document.createElement("style");iE.textContent=`.badge_Badge { +`;document.head.appendChild(mw);var Lt={header:"header_TicketHeader",headerTop:"headerTop_TicketHeader",issueKey:"issueKey_TicketHeader",typeIcon:"typeIcon_TicketHeader",status:"status_TicketHeader",summary:"summary_TicketHeader",editContainer:"editContainer_TicketHeader",summaryInput:"summaryInput_TicketHeader",metadata:"metadata_TicketHeader",metadataItem:"metadataItem_TicketHeader",label:"label_TicketHeader"};var Xe=P(Z()),yw=({issueKey:e,summary:t,statusName:n,statusCategory:r,issueType:o,issueTypeIcon:a,priority:i,reporter:s,onUpdateSummary:l})=>{let[u,c]=(0,J0.useState)(!1),[d,f]=(0,J0.useState)(t),p=()=>{d.trim()&&d!==t&&l(d.trim()),c(!1)},h=()=>{switch(r){case"done":return"#10b981";case"indeterminate":return"#f59e0b";case"new":default:return"#6b7280"}};return(0,Xe.jsxs)("div",{className:Lt.header,children:[(0,Xe.jsxs)("div",{className:Lt.headerTop,children:[(0,Xe.jsxs)("div",{className:Lt.issueKey,children:[a&&(0,Xe.jsx)("img",{src:a,alt:o,className:Lt.typeIcon}),(0,Xe.jsx)("span",{children:e})]}),(0,Xe.jsx)("div",{className:Lt.status,style:{backgroundColor:h()},children:n})]}),u?(0,Xe.jsx)("div",{className:Lt.editContainer,children:(0,Xe.jsx)("input",{type:"text",value:d,onChange:m=>f(m.target.value),onKeyDown:m=>{m.key==="Enter"&&p(),m.key==="Escape"&&(f(t),c(!1))},onBlur:p,autoFocus:!0,className:Lt.summaryInput})}):(0,Xe.jsx)("h1",{className:Lt.summary,onClick:()=>c(!0),title:"Click to edit",children:t}),(0,Xe.jsxs)("div",{className:Lt.metadata,children:[(0,Xe.jsxs)("div",{className:Lt.metadataItem,children:[(0,Xe.jsx)("span",{className:Lt.label,children:"Type:"}),(0,Xe.jsx)("span",{children:o})]}),(0,Xe.jsxs)("div",{className:Lt.metadataItem,children:[(0,Xe.jsx)("span",{className:Lt.label,children:"Priority:"}),(0,Xe.jsx)("span",{children:i?.name||"None"})]}),(0,Xe.jsxs)("div",{className:Lt.metadataItem,children:[(0,Xe.jsx)("span",{className:Lt.label,children:"Reporter:"}),(0,Xe.jsx)("span",{children:s.displayName})]})]})]})};var kw=document.createElement("style");kw.textContent=`.badge_Badge { display: inline-flex; align-items: center; gap: 4px; @@ -144,7 +144,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& background-color: rgba(0, 0, 0, 0.15); } -`;document.head.appendChild(iE);var Vs={badge:"badge_Badge",default:"default_Badge",status:"status_Badge",priority:"priority_Badge",removable:"removable_Badge",removeButton:"removeButton_Badge"};var _i=P(Z()),F0=({children:e,variant:t="default",color:n,className:r,onRemove:o})=>{let i=Vs[t]||Vs.default,s=n?{backgroundColor:`${n}20`,color:n,borderColor:`${n}40`}:{};return(0,_i.jsxs)("span",{className:`${Vs.badge} ${i} ${o?Vs.removable:""} ${r||""}`,style:s,children:[e,o&&(0,_i.jsx)("button",{type:"button",className:Vs.removeButton,onClick:a=>{a.stopPropagation(),o()},title:"Remove",children:(0,_i.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,_i.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,_i.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};var sE=document.createElement("style");sE.textContent=`.container_TicketMetadata { +`;document.head.appendChild(kw);var Ki={badge:"badge_Badge",default:"default_Badge",status:"status_Badge",priority:"priority_Badge",removable:"removable_Badge",removeButton:"removeButton_Badge"};var Ia=P(Z()),Z0=({children:e,variant:t="default",color:n,className:r,onRemove:o})=>{let a=Ki[t]||Ki.default,i=n?{backgroundColor:`${n}20`,color:n,borderColor:`${n}40`}:{};return(0,Ia.jsxs)("span",{className:`${Ki.badge} ${a} ${o?Ki.removable:""} ${r||""}`,style:i,children:[e,o&&(0,Ia.jsx)("button",{type:"button",className:Ki.removeButton,onClick:s=>{s.stopPropagation(),o()},title:"Remove",children:(0,Ia.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ia.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Ia.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};var vw=document.createElement("style");vw.textContent=`.container_TicketMetadata { padding: 16px 20px; border-bottom: 1px solid var(--vscode-panel-border); } @@ -189,7 +189,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& flex-wrap: wrap; } -`;document.head.appendChild(sE);var Tt={container:"container_TicketMetadata",section:"section_TicketMetadata",heading:"heading_TicketMetadata",metadataGrid:"metadataGrid_TicketMetadata",metadataItem:"metadataItem_TicketMetadata",label:"label_TicketMetadata",labels:"labels_TicketMetadata"};var He=P(Z()),aE=({created:e,updated:t,projectName:n,dueDate:r,labels:o})=>{let i=s=>new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});return(0,He.jsxs)("div",{className:Tt.container,children:[(0,He.jsxs)("div",{className:Tt.section,children:[(0,He.jsx)("h3",{className:Tt.heading,children:"Details"}),(0,He.jsxs)("div",{className:Tt.metadataGrid,children:[(0,He.jsxs)("div",{className:Tt.metadataItem,children:[(0,He.jsx)("span",{className:Tt.label,children:"Project:"}),(0,He.jsx)("span",{children:n})]}),(0,He.jsxs)("div",{className:Tt.metadataItem,children:[(0,He.jsx)("span",{className:Tt.label,children:"Created:"}),(0,He.jsx)("span",{children:i(e)})]}),(0,He.jsxs)("div",{className:Tt.metadataItem,children:[(0,He.jsx)("span",{className:Tt.label,children:"Updated:"}),(0,He.jsx)("span",{children:i(t)})]}),r&&(0,He.jsxs)("div",{className:Tt.metadataItem,children:[(0,He.jsx)("span",{className:Tt.label,children:"Due Date:"}),(0,He.jsx)("span",{children:i(r)})]})]})]}),o&&o.length>0&&(0,He.jsxs)("div",{className:Tt.section,children:[(0,He.jsx)("h3",{className:Tt.heading,children:"Labels"}),(0,He.jsx)("div",{className:Tt.labels,children:o.map(s=>(0,He.jsx)(F0,{color:"#6366f1",children:s},s))})]})]})};var oi=P(Se());var lE=document.createElement("style");lE.textContent=`.button_Button { +`;document.head.appendChild(vw);var It={container:"container_TicketMetadata",section:"section_TicketMetadata",heading:"heading_TicketMetadata",metadataGrid:"metadataGrid_TicketMetadata",metadataItem:"metadataItem_TicketMetadata",label:"label_TicketMetadata",labels:"labels_TicketMetadata"};var He=P(Z()),Cw=({created:e,updated:t,projectName:n,dueDate:r,labels:o})=>{let a=i=>new Date(i).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});return(0,He.jsxs)("div",{className:It.container,children:[(0,He.jsxs)("div",{className:It.section,children:[(0,He.jsx)("h3",{className:It.heading,children:"Details"}),(0,He.jsxs)("div",{className:It.metadataGrid,children:[(0,He.jsxs)("div",{className:It.metadataItem,children:[(0,He.jsx)("span",{className:It.label,children:"Project:"}),(0,He.jsx)("span",{children:n})]}),(0,He.jsxs)("div",{className:It.metadataItem,children:[(0,He.jsx)("span",{className:It.label,children:"Created:"}),(0,He.jsx)("span",{children:a(e)})]}),(0,He.jsxs)("div",{className:It.metadataItem,children:[(0,He.jsx)("span",{className:It.label,children:"Updated:"}),(0,He.jsx)("span",{children:a(t)})]}),r&&(0,He.jsxs)("div",{className:It.metadataItem,children:[(0,He.jsx)("span",{className:It.label,children:"Due Date:"}),(0,He.jsx)("span",{children:a(r)})]})]})]}),o&&o.length>0&&(0,He.jsxs)("div",{className:It.section,children:[(0,He.jsx)("h3",{className:It.heading,children:"Labels"}),(0,He.jsx)("div",{className:It.labels,children:o.map(i=>(0,He.jsx)(Z0,{color:"#6366f1",children:i},i))})]})]})};var aa=P(ke());var ww=document.createElement("style");ww.textContent=`.button_Button { padding: 8px 16px; border-radius: 4px; border: 1px solid transparent; @@ -222,7 +222,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& background-color: #45494e; } -`;document.head.appendChild(lE);var f6=P(Z());var uE=document.createElement("style");uE.textContent=`.container_Input { +`;document.head.appendChild(ww);var _R=P(Z());var Sw=document.createElement("style");Sw.textContent=`.container_Input { margin-bottom: 16px; } @@ -257,7 +257,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& margin-top: 4px; } -`;document.head.appendChild(uE);var cE=P(Z());var dE=document.createElement("style");dE.textContent=`.container_Select { +`;document.head.appendChild(Sw);var Ew=P(Z());var Lw=document.createElement("style");Lw.textContent=`.container_Select { margin-bottom: 16px; } @@ -293,7 +293,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& margin-top: 4px; } -`;document.head.appendChild(dE);var fE=P(Z());var pE=document.createElement("style");pE.textContent=`.container_TextArea { +`;document.head.appendChild(Lw);var Iw=P(Z());var _w=document.createElement("style");_w.textContent=`.container_TextArea { margin-bottom: 16px; } @@ -330,19 +330,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`),re=S,K=M),L===void 0&& margin-top: 4px; } -`;document.head.appendChild(pE);var hE=P(Z());var Aa=P(Se());var Ql=P(Se(),1),qo=P(Se(),1),KS=P(qs(),1),GS=P(ad(),1),Gr=P(Z(),1);function Nt(e){this.content=e}Nt.prototype={constructor:Nt,find:function(e){for(var t=0;t>1}};Nt.from=function(e){if(e instanceof Nt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Nt(t)};var U0=Nt;function TE(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=TE(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function NE(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;ut&&r(l,o+a,i||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,o+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?ld(n+1,i):ld(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};de.none=[];var Ti=class extends Error{},B=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=ME(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(AE(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(N.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new e(t,r,o)}};B.empty=new B(N.empty,0,0);function AE(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(AE(i.content,t-o-1,n-o-1)))}function ME(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ME(s.content,t-i-1,n,s);return a&&e.replaceChild(o,s.copy(a))}function w6(e,t,n){if(n.openStart>e.depth)throw new Ti("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ti("Inconsistent open depths");return RE(e,t,n,0)}function RE(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Cl(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Si(e.nodeAfter,r),i++));for(let a=i;ao&&q0(e,t,o+1),s=r.depth>o&&q0(n,r,o+1),a=[];return Cl(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(DE(i,s),Si(Ci(i,OE(e,t,n,r,o+1)),a)):(i&&Si(Ci(i,dd(e,t,o+1)),a),Cl(t,n,o,a),s&&Si(Ci(s,dd(n,r,o+1)),a)),Cl(r,null,o,a),new N(a)}function dd(e,t,n){let r=[];if(Cl(null,e,n,r),e.depth>n){let o=q0(e,t,n+1);Si(Ci(o,dd(e,t,n+1)),r)}return Cl(t,null,n,r),new N(r)}function E6(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(N.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var fd=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ni(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,a,o+l),!u||(s=s.child(a),s.isText))break;i=u-1,o+=l+1}return new e(n,r,i)}static resolveCached(t,n){let r=yE.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),IE(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=N.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=N.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Yt.prototype.text=void 0;var W0=class e extends Yt{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):IE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function IE(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Ai=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new j0(t,n);if(r.next==null)return e.empty;let o=LE(r);r.next&&r.err("Unexpected trailing text");let i=D6(R6(o));return O6(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` -`)}};Ai.empty=new Ai(!0);var j0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function LE(e){let t=[];do t.push(C6(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function C6(e){let t=[];do t.push(T6(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function T6(e){let t=M6(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=N6(e,t);else break;return t}function vE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function N6(e,t){let n=vE(e),r=n;return e.eat(",")&&(e.next!="}"?r=vE(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function A6(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function M6(e){if(e.eat("(")){let t=LE(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=A6(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function R6(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],a);if(l==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c{u||o.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new Ai(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:FE(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Yt(this,this.computeAttrs(t),N.from(n),de.setFrom(r))}createChecked(t=null,n,r){return n=N.from(n),this.checkContent(n),new Yt(this,this.computeAttrs(t),n,de.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=N.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(N.empty,!0);return i?new Yt(this,t,n.append(i),de.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new e(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function I6(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var K0=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?I6(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},Nl=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=UE(t,o.attrs),this.excluded=null;let i=BE(this.attrs);this.instance=i?new de(this,i):null}create(t=null){return!t&&this.instance?this.instance:new de(this,FE(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new e(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}},Oo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=U0.from(t.nodes),n.marks=U0.from(t.marks||{}),this.nodes=pd.compile(this.spec.nodes,this),this.marks=Nl.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Ai.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?kE(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:kE(this,s.split(" "))}this.nodeFromJSON=o=>Yt.fromJSON(this,o),this.markFromJSON=o=>de.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof pd){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new W0(r,r.defaultAttrs,t,de.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function kE(e,t){let n=[];for(let r=0;r-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function L6(e){return e.tag!=null}function P6(e){return e.style!=null}var wn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(L6(o))this.tags.push(o);else if(P6(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new hd(this,n,!1);return r.addAll(t,de.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new hd(this,n,!0);return r.addAll(t,de.none,n.from,n.to),B.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=EE(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=EE(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},HE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},B6={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$E={ol:!0,ul:!0},Al=1,G0=2,Tl=4;function wE(e,t,n){return t!=null?(t?Al:0)|(t==="full"?G0:0):e&&e.whitespace=="pre"?Al|G0:n&~Tl}var js=class{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=de.none,this.match=i||(s&Tl?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Al)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=N.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!HE.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},hd=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=wE(null,n.preserveWhitespace,0)|(r?Tl:0);o?i=new js(o.type,o.attrs,de.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new js(null,null,de.none,!0,null,s):i=new js(t.schema.topNodeType,null,de.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&G0?"full":this.localPreserveWS||(o.options&Al)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` -`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}i&&this.sync(a)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=o==null?null:t.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(t);if(u&&(!o||o.length>u.length+a)&&(o=u,i=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(u.type):_E(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new js(t,n,l,o,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Al)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let c=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function F6(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&$E.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function z6(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function EE(e){let t={};for(let n in e)t[n]=e[n];return t}function _E(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let l=0;l{if(i.length||s.marks.length){let a=0,l=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&ud($0(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return ud(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=SE(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return SE(t.marks)}};function SE(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function $0(e){return e.document||window.document}var CE=new WeakMap;function U6(e){let t=CE.get(e);return t===void 0&&CE.set(e,t=H6(e)),t}function H6(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=ud(e,f,n,r);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}var WE=65535,jE=Math.pow(2,16);function $6(e,t){return e+t*jE}function qE(e){return e&WE}function q6(e){return(e-(e&WE))/jE}var KE=1,GE=2,md=4,JE=8,Dl=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&JE)>0}get deletedBefore(){return(this.delInfo&(KE|md))>0}get deletedAfter(){return(this.delInfo&(GE|md))>0}get deletedAcross(){return(this.delInfo&md)>0}},Fr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=qE(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[a+i],c=this.ranges[a+s],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+o+(f<0?0:c);if(r)return p;let h=t==(n<0?l:d)?null:$6(a/3,t-l),m=t==l?GE:t==d?KE:md;return(n<0?t!=l:t!=d)&&(m|=JE),new Dl(p,m,h)}o+=c-u}return r?t+o:new Dl(t+o,0,null)}touches(t,n){let r=0,o=qE(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+i],c=l+u;if(t<=c&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return ht.fromReplace(t,this.from,this.to,i)}invert(){return new zr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};it.jsonID("addMark",Il);var zr=class e extends it{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new B(eg(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return ht.fromReplace(t,this.from,this.to,r)}invert(){return new Il(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};it.jsonID("removeMark",zr);var Ll=class e extends it{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return ht.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ht.fromReplace(t,this.pos,this.pos+1,new B(N.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};it.jsonID("replaceAround",Xe);function X0(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function V6(e,t,n,r){let o=[],i=[],s,a;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let m=0;me.step(l)),i.forEach(l=>e.step(l))}function W6(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof Nl){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let c=0;ce.step(new zr(s.from,s.to,s.style)))}function tg(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l=0;l--)e.step(s[l])}function j6(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ur(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,i=0;;--r){let s=e.$from.node(r),a=e.$from.index(r)+o,l=e.$to.indexAfter(r)-i;if(rn;h--)m||r.index(h)>0?(m=!0,c=N.from(r.node(h).copy(c)),d++):l--;let f=N.empty,p=0;for(let h=i,m=!1;h>n;h--)m||o.after(h+1)=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=N.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new Xe(o,i,o,i,new B(r,0,0),n.length,!0))}function Z6(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&X6(e.doc,e.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&ZE(e,s,a,i),tg(e,e.mapping.slice(i).map(a,1),r,void 0,u===null);let c=e.mapping.slice(i),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new Xe(d,f,d+1,f-1,new B(N.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&YE(e,s,a,i),!1}})}function YE(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function ZE(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` -`))}})}function X6(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function Q6(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Xe(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new B(N.from(s),0,0),1,!0))}function cn(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function e4(e,t,n=1,r){let o=e.doc.resolve(t),i=N.empty,s=N.empty;for(let a=o.depth,l=o.depth-n,u=n-1;a>l;a--,u--){i=N.from(o.node(a).copy(i));let c=r&&r[u];s=N.from(c?c.type.create(c.attrs,s):o.node(a).copy(s))}e.step(new At(t,t,new B(i.append(s),n,n),!0))}function En(e,t){let n=e.resolve(t),r=n.index();return XE(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function t4(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&XE(i,s)&&r.node(o).canReplace(a,a+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function n4(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);ZE(e,c.node(),c.before(),a)}s.inlineContent&&tg(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new At(u,l.map(t+n,-1),B.empty,!0)),r===!0){let c=e.doc.resolve(u);YE(e,c.node(),c.before(),e.steps.length)}return e}function r4(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(l,l,o);else{let d=u.contentMatchAt(l).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Pl(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return QE(o,i,r)?new At(t,n,r):new Q0(o,i,r).fit()}function QE(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var Q0=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=N.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=N.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new B(i,s,a);return t>-1?new Xe(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new At(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Y0(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(N.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Y0(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Y0(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new B(Ml(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new B(Ml(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m1||l==0||m.content.size)&&(d=b,c.push(e2(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let h=u==a.childCount;h||(p=-1),this.placed=Rl(this.placed,n,N.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;a--){let{match:l,type:u}=this.frontier[a],c=Z0(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Rl(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Rl(this.placed,this.depth,N.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(N.empty,!0);n.childCount&&(this.placed=Rl(this.placed,this.frontier.length,n))}};function Ml(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Ml(e.firstChild.content,t-1,n)))}function Rl(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Rl(e.lastChild.content,t-1,n)))}function Y0(e,t){for(let n=0;n1&&(r=r.replaceChild(0,e2(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(N.empty,!0)))),e.copy(r)}function Z0(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!o4(n,i.content,s)?a:null}function o4(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:o.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=i4(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(a)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),n=i.after(p))}}function t2(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(N.empty,!0))}return e}function a4(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=r4(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new B(N.from(r),0,0))}function l4(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=n2(r,o);for(let s=0;s0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function n2(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}var gd=class e extends it{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return ht.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return ht.fromReplace(t,this.pos,this.pos+1,new B(N.from(o),0,n.isLeaf?0:1))}getMap(){return Fr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};it.jsonID("attr",gd);var bd=class e extends it{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return ht.ok(r)}getMap(){return Fr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};it.jsonID("docAttr",bd);var Gs=class extends Error{};Gs=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Gs.prototype=Object.create(Error.prototype);Gs.prototype.constructor=Gs;Gs.prototype.name="TransformError";var Io=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ol}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Gs(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=B.empty){let o=Pl(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new B(N.from(r),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return s4(this,t,n,r),this}replaceRangeWith(t,n,r){return a4(this,t,n,r),this}deleteRange(t,n){return l4(this,t,n),this}lift(t,n){return K6(this,t,n),this}join(t,n=1){return n4(this,t,n),this}wrap(t,n){return Y6(this,t,n),this}setBlockType(t,n=t,r,o=null){return Z6(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return Q6(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new gd(t,n,r)),this}setDocAttribute(t,n){return this.step(new bd(t,n)),this}addNodeMark(t,n){return this.step(new Ll(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof de)n.isInSet(r.marks)&&this.step(new Ks(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new Ks(t,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return e4(this,t,n,r),this}addMark(t,n,r){return V6(this,t,n,r),this}removeMark(t,n,r){return W6(this,t,n,r),this}clearIncompatible(t,n,r){return tg(this,t,n,r),this}};var ng=Object.create(null),G=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Zs(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?Ys(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):Ys(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new zt(t.node(0))}static atStart(t){return Ys(t,t,0,0,1)||new zt(t)}static atEnd(t){return Ys(t,t,t.content.size,t.childCount,-1)||new zt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ng[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in ng)throw new RangeError("Duplicate use of selection JSON ID "+t);return ng[t]=n,n.prototype.jsonID=t,n}getBookmark(){return q.between(this.$anchor,this.$head).getBookmark()}};G.prototype.visible=!0;var Zs=class{constructor(t,n){this.$from=t,this.$to=n}},r2=!1;function o2(e){!r2&&!e.parent.inlineContent&&(r2=!0)}var q=class e extends G{constructor(t,n=t){o2(t),o2(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return G.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new xd(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=G.findFrom(n,r,!0)||G.findFrom(n,-r,!0);if(i)n=i.$head;else return G.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(G.findFrom(t,-r,!0)||G.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&$.isSelectable(a))return $.create(e,n-(o<0?a.nodeSize:0))}else{let l=Ys(e,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function i2(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(G.near(e.doc.resolve(s),n))}var s2=1,vd=2,a2=4,ig=class extends Io{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=vd,this}ensureMarks(t){return de.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&vd)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~vd,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||de.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(G.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=a2,this}get scrolledIntoView(){return(this.updated&a2)>0}};function l2(e,t){return!t||!e?e:e.bind(t)}var Ri=class{constructor(t,n,r){this.name=t,this.init=l2(n.init,r),this.apply=l2(n.apply,r)}},c4=[new Ri("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Ri("selection",{init(e,t){return e.selection||G.atStart(t.doc)},apply(e){return e.selection}}),new Ri("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Ri("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Bl=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=c4.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ri(r.key,r.spec.state,r))})}},kd=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Bl(t.schema,t.plugins),i=new e(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Yt.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=G.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(l,t,n[a],i);return}}i[s.name]=s.init(t,i)}}),i}};function u2(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=u2(o,t,{})),n[r]=o}return n}var W=class{constructor(t){this.spec=t,this.props={},t.props&&u2(t.props,this,this.props),this.key=t.key?t.key.key:c2("plugin")}getState(t){return t[this.key]}},rg=Object.create(null);function c2(e){return e in rg?e+"$"+ ++rg[e]:(rg[e]=0,e+"$")}var X=class{constructor(t="key"){this.key=c2(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var wd=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function f2(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var ag=(e,t,n)=>{let r=f2(e,n);if(!r)return!1;let o=ug(r);if(!o){let s=r.blockRange(),a=s&&Ur(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(k2(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Xs(i,"end")||$.isSelectable(i)))for(let s=r.depth;;s--){let a=Pl(e.doc,r.before(s),r.after(s),B.empty);if(a&&a.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},p2=(e,t,n)=>{let r=f2(e,n);if(!r)return!1;let o=ug(r);return o?m2(e,o,t):!1},h2=(e,t,n)=>{let r=g2(e,n);if(!r)return!1;let o=fg(r);return o?m2(e,o,t):!1};function m2(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let s=t.nodeAfter,a=s,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=Pl(e.doc,i,l,B.empty);if(!u||u.from!=i||u instanceof At&&u.slice.size>=l-i)return!1;if(n){let c=e.tr.step(u);c.setSelection(q.create(c.doc,i)),n(c.scrollIntoView())}return!0}function Xs(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var lg=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=ug(r)}let s=i&&i.nodeBefore;return!s||!$.isSelectable(s)?!1:(t&&t(e.tr.setSelection($.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function ug(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function g2(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=g2(e,n);if(!r)return!1;let o=fg(r);if(!o)return!1;let i=o.nodeAfter;if(k2(e,o,t,1))return!0;if(r.parent.content.size==0&&(Xs(i,"start")||$.isSelectable(i))){let s=Pl(e.doc,r.before(),r.after(),B.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof $,o;if(r){if(n.node.isTextblock||!En(e.doc,n.from))return!1;o=n.from}else if(o=Mi(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection($.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},y2=(e,t)=>{let n=e.selection,r;if(n instanceof $){if(n.node.isTextblock||!En(e.doc,n.to))return!1;r=n.to}else if(r=Mi(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},v2=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Ur(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},pg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function hg(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=hg(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(G.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},gg=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof zt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=hg(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(cn(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ur(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function d4(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof $&&t.selection.node.isBlock)return!r.parentOffset||!cn(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,a,l=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),a=hg(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,l,r);i.unshift(m||(l&&a?{type:a}:null)),s=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof q||t.selection instanceof zt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=cn(c.doc,d,i.length,i);if(f||(i[0]=a?{type:a}:null,f=cn(c.doc,d,i.length,i)),!f)return!1;if(c.split(d,i.length,i),!l&&u&&r.node(s).type!=a){let p=c.mapping.map(r.before(s)),h=c.doc.resolve(p);a&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,a)&&c.setNodeMarkup(c.mapping.map(r.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}var f4=d4();var x2=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection($.create(e.doc,o))),!0)},p4=(e,t)=>(t&&t(e.tr.setSelection(new zt(e.doc))),!0);function h4(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||En(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function k2(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&h4(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&a.matchType(s[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,h=N.empty;for(let g=s.length-1;g>=0;g--)h=N.from(s[g].create(null,h));h=N.from(o.copy(h));let m=e.tr.step(new Xe(t.pos-1,p,t.pos,p,new B(h,1,0),s.length,!0)),b=m.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&En(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&l?null:G.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Ur(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&Xs(i,"start",!0)&&Xs(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=i,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=N.empty;for(let v=h.length-1;v>=0;v--)g=N.from(h[v].copy(g));let y=e.tr.step(new Xe(t.pos-h.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new B(g,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function w2(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(q.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}var yg=w2(-1),vg=w2(1);function E2(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&Js(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function xg(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);i=new Ni(l,l,t.depth),t.endIndex=0;c--)i=N.from(n[c].type.create(n[c].attrs,i));e.step(new Xe(t.start-(r?2:0),t.end,t.start,t.end,new B(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?y4(t,n,e,i):v4(t,n,i):!0:!1}}function y4(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);im;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(a?0:1),c+1,s.content.append(l?N.empty:N.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new Xe(d-(a?1:0),f+(l?1:0),d+1,f-1,new B((a?N.empty:N.from(o.copy(N.empty))).append(l?N.empty:N.from(o.copy(N.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function C2(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=N.from(u?e.create():null),d=new B(N.from(e.create(null,N.from(a.type.create(null,c)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new Xe(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var mt=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},ra=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Tg=null,$r=function(e,t,n){let r=Tg||(Tg=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},x4=function(){Tg=null},Fi=function(e,t,n,r){return n&&(T2(e,t,n,r,-1)||T2(e,t,n,r,1))},k4=/^(img|br|input|textarea|hr)$/i;function T2(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Sn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Wl(e)||k4.test(e.nodeName)||e.contentEditable=="false")return!1;t=mt(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?Sn(e):0}else return!1}}function Sn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function w4(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Sn(e)}else if(e.parentNode&&!Wl(e))t=mt(e),e=e.parentNode;else return null}}function E4(e,t){for(;;){if(e.nodeType==3&&t2),_n=oa||(ir?/Mac/.test(ir.platform):!1),l_=ir?/Win/.test(ir.platform):!1,qr=/Android \d/.test(Ho),jl=!!N2&&"webkitFontSmoothing"in N2.documentElement.style,T4=jl?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function N4(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Hr(e,t){return typeof e=="number"?e:e[t]}function A4(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function A2(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=ra(s);continue}let a=s,l=a==i.body,u=l?N4(i):A4(a),c=0,d=0;if(t.topu.bottom-Hr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Hr(o,"top")-u.top:t.bottom-u.bottom+Hr(o,"bottom")),t.leftu.right-Hr(r,"right")&&(c=t.right-u.right+Hr(o,"right")),c||d)if(l)i.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,b=a.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:ra(s)}}function M4(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:u_(e.dom)}}function u_(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=ra(r));return t}function R4({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;c_(n,r==0?0:r-t)}function c_(e,t){for(let n=0;n=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?O4(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:d_(n,o)}function O4(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let i=0;i=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function Wg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function I4(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function P4(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?o=a.posBefore:(!s&&l.right-1?o:e.docView.posFromDOM(t,n,-1)}function f_(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;jl&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=P4(e,r,o,t))}a==null&&(a=L4(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function M2(e){return e.top=0&&o==r.nodeValue.length?(l--,c=1):n<0?l--:u++,Fl(Po($r(r,l,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Sn(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return wg(l.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==Sn(r))){let l=r.childNodes[o-1],u=l.nodeType==3?$r(l,Sn(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Fl(Po(u,1),!1)}if(i==null&&o=0)}function Fl(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function wg(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function h_(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function z4(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return h_(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=p_(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=$r(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var U4=/[\u0590-\u08ac]/;function H4(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return a?!U4.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:h_(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var R2=null,D2=null,O2=!1;function $4(e,t,n){return R2==t&&D2==n?O2:(R2=t,D2=n,O2=n=="up"||n=="down"?z4(e,t,n):H4(e,t,n))}var Tn=0,I2=1,Oi=2,sr=3,zi=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Tn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nmt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof Sd){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Ed&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?mt(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=mt(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;ch&&sn){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let a=r+i.border,l=s-i.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?Oi:I2,t==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=sr:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Oi:sr}r=s}this.dirty=Oi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Oi:I2;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Tn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Rg=class extends zi{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},ia=class e extends zi{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Br.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&sr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=sr&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Tn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=Lg(i,0,t,r));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Br.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=b_(c,r,n),u?l=new Dg(t,n,r,o,c,d||null,f,u,i,s+1):n.isText?new _d(t,n,r,o,c,f,i):new e(t,n,r,o,c,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>N.empty)}return t}matchesNode(t,n,r){return this.dirty==Tn&&t.eq(this.node)&&Cd(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new Ig(this,s&&s.node,t);j4(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?de.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,o)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,t);let p;l.findNodeMatch(u,c,d,f)||a&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,o)||l.addNode(u,c,d,t,o),o+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Oi)&&(s&&this.protectLocalComposition(t,s),m_(this.contentDOM,this.children,t),oa&&K4(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof q)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,a=G4(this.node.content,s,r-n,o-n);return a<0?null:{node:i,pos:a,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new Rg(this,i,n,o);t.input.compositionNodes.push(s),this.children=Lg(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==sr||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Tn}updateOuterDeco(t){if(Cd(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=g_(this.dom,this.nodeDOM,Og(this.outerDeco,this.node,n),Og(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function L2(e,t,n,r,o){b_(r,t,e);let i=new Uo(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}var _d=class e extends Uo{constructor(t,n,r,o,i,s,a){super(t,n,r,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==sr||this.dirty!=Tn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Tn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Tn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=sr)}get domAtom(){return!1}isText(t){return this.node.text==t}},Sd=class extends zi{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Tn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},Dg=class extends Uo{constructor(t,n,r,o,i,s,a,l,u,c){super(t,n,r,o,i,s,a,u,c),this.spec=l}update(t,n,r,o){if(this.dirty==sr)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function m_(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=ia.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof ia)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function W4(e,t){return e.type.side-t.type.side}function j4(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)a.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):a.slice();r(f,m,t.forChild(i,f),p),i=h}}function K4(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function G4(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let u=a=0&&u+t.length+a>=n)return a+u;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}function Lg(e,t,n,r,o){let i=[];for(let s=0,a=0;s=n||c<=t?i.push(l):(un&&i.push(l.slice(n-u,l.size,r)))}return i}function jg(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,u;if(Od(n)){for(l=s;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&$.isSelectable(d)&&o.parent&&!(d.isInline&&_4(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new $(s==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!y_(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function Y4(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,mt(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Zt&&zo<=11&&(n.disabled=!0,n.disabled=!1)}function v_(e,t){if(t instanceof $){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(U2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else U2(e)}function U2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Kg(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||q.between(t,n,r)}function H2(e){return e.editable&&!e.hasFocus()?!1:x_(e)}function x_(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Z4(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Fi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Pg(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&G.findFrom(i,t)}function Bo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function $2(e,t,n){let r=e.state.selection;if(r instanceof q)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Bo(e,new q(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=Pg(e.state,t);return o&&o instanceof $?Bo(e,o):!1}else if(!(_n&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?$.isSelectable(i)?Bo(e,new $(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):jl?Bo(e,new q(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $&&r.node.isInline)return Bo(e,new q(t>0?r.$to:r.$from));{let o=Pg(e.state,t);return o?Bo(e,o):!1}}}function Td(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ul(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ea(e,t){return t<0?X4(e):Q4(e)}function X4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(Cn&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ul(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(k_(n))break;{let a=n.previousSibling;for(;a&&Ul(a,-1);)o=n.parentNode,i=mt(a),a=a.previousSibling;if(a)n=a,r=Td(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Bg(e,n,r):o&&Bg(e,o,i)}function Q4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Td(n),i,s;for(;;)if(r{e.state==o&&Vr(e)},50)}function q2(e,t){let n=e.state.doc.resolve(t);if(!(st||l_)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function V2(e,t,n){let r=e.state.selection;if(r instanceof q&&!r.empty||n.indexOf("s")>-1||_n&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Pg(e.state,t);if(s&&s instanceof $)return Bo(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof zt?G.near(s,t):G.findFrom(s,t);return a?Bo(e,a):!1}return!1}function W2(e,t){if(!(e.state.selection instanceof q))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function j2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function nI(e){if(!Rt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;j2(e,r,"true"),setTimeout(()=>j2(e,r,"false"),20)}return!1}function rI(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function oI(e,t){let n=t.keyCode,r=rI(t);if(n==8||_n&&n==72&&r=="c")return W2(e,-1)||ea(e,-1);if(n==46&&!t.shiftKey||_n&&n==68&&r=="c")return W2(e,1)||ea(e,1);if(n==13||n==27)return!0;if(n==37||_n&&n==66&&r=="c"){let o=n==37?q2(e,e.state.selection.from)=="ltr"?-1:1:-1;return $2(e,o,r)||ea(e,o)}else if(n==39||_n&&n==70&&r=="c"){let o=n==39?q2(e,e.state.selection.from)=="ltr"?1:-1:1;return $2(e,o,r)||ea(e,o)}else{if(n==38||_n&&n==80&&r=="c")return V2(e,-1,r)||ea(e,-1);if(n==40||_n&&n==78&&r=="c")return nI(e)||V2(e,1,r)||ea(e,1);if(r==(_n?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Gg(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Br.fromSchema(e.state.schema),a=T_(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=C_[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=a.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` +`;document.head.appendChild(_w);var Aw=P(Z());var Ns=P(ke());var ru=P(ke(),1),Vo=P(ke(),1),aL=P(Wi(),1),iL=P(bd(),1),Xr=P(Z(),1);function _t(e){this.content=e}_t.prototype={constructor:_t,find:function(e){for(var t=0;t>1}};_t.from=function(e){if(e instanceof _t)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new _t(t)};var Q0=_t;function qw(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o==a){n+=o.nodeSize;continue}if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let i=0;o.text[i]==a.text[i];i++)n++;return n}if(o.content.size||a.content.size){let i=qw(o.content,a.content,n+1);if(i!=null)return i}n+=o.nodeSize}}function $w(e,t,n,r){for(let o=e.childCount,a=t.childCount;;){if(o==0||a==0)return o==a?null:{a:n,b:r};let i=e.child(--o),s=t.child(--a),l=i.nodeSize;if(i==s){n-=l,r-=l;continue}if(!i.sameMarkup(s))return{a:n,b:r};if(i.isText&&i.text!=s.text){let u=0,c=Math.min(i.text.length,s.text.length);for(;ut&&r(l,o+s,a||null,i)!==!1&&l.content.size){let c=s+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,o+c)}s=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let a="",i=!0;return this.nodesBetween(t,n,(s,l)=>{let u=s.isText?s.text.slice(Math.max(t,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&r&&(i?i=!1:a+=r),a+=u},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),a=1);at)for(let a=0,i=0;it&&((in)&&(s.isText?s=s.cut(Math.max(0,t-i),Math.min(s.text.length,n-i)):s=s.cut(Math.max(0,t-i-1),Math.min(s.content.size,n-i-1))),r.push(s),o+=s.nodeSize),i=l}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),a=r+o.nodeSize;if(a>=t)return a==t?xd(n+1,a):xd(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};de.none=[];var Ta=class extends Error{},B=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Ww(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Vw(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(_.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}};B.empty=new B(_.empty,0,0);function Vw(e,t,n){let{index:r,offset:o}=e.findIndex(t),a=e.maybeChild(r),{index:i,offset:s}=e.findIndex(n);if(o==t||a.isText){if(s!=n&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(Vw(a.content,t-o-1,n-o-1)))}function Ww(e,t,n,r){let{index:o,offset:a}=e.findIndex(t),i=e.maybeChild(o);if(a==t||i.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=Ww(i.content,t-a-1,n,i);return s&&e.replaceChild(o,i.copy(s))}function FR(e,t,n){if(n.openStart>e.depth)throw new Ta("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ta("Inconsistent open depths");return Kw(e,t,n,0)}function Kw(e,t,n,r){let o=e.index(r),a=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Tl(e,t,n,r){let o=(t||e).node(n),a=0,i=t?t.index(n):o.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(_a(e.nodeAfter,r),a++));for(let s=a;so&&ng(e,t,o+1),i=r.depth>o&&ng(n,r,o+1),s=[];return Tl(null,e,o,s),a&&i&&t.index(o)==n.index(o)?(Gw(a,i),_a(Aa(a,jw(e,t,n,r,o+1)),s)):(a&&_a(Aa(a,vd(e,t,o+1)),s),Tl(t,n,o,s),i&&_a(Aa(i,vd(n,r,o+1)),s)),Tl(r,null,o,s),new _(s)}function vd(e,t,n){let r=[];if(Tl(null,e,n,r),e.depth>n){let o=ng(e,t,n+1);_a(Aa(o,vd(e,t,n+1)),r)}return Tl(t,null,n,r),new _(r)}function zR(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)o=t.node(a).copy(_.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Cd=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let a=0;a0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ma(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,a=n;for(let i=t;;){let{index:s,offset:l}=i.content.findIndex(a),u=a-l;if(r.push(i,s,o+l),!u||(i=i.child(s),i.isText))break;a=u-1,o+=l+1}return new e(n,r,a)}static resolveCached(t,n){let r=Dw.get(t);if(r)for(let a=0;at&&this.nodesBetween(t,n,a=>(r.isInSet(a.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Xw(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=_.empty,o=0,a=r.childCount){let i=this.contentMatchAt(t).matchFragment(r,o,a),s=i&&i.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=_.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,o,r);return a.type.checkAttrs(a.attrs),a}};Zt.prototype.text=void 0;var og=class e extends Zt{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Xw(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function Xw(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Na=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new ag(t,n);if(r.next==null)return e.empty;let o=Jw(r);r.next&&r.err("Unexpected trailing text");let a=jR(GR(o));return XR(a,r),a}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let a=o+(r.validEnd?"*":" ")+" ";for(let i=0;i"+t.indexOf(r.next[i].next);return a}).join(` +`)}};Na.empty=new Na(!0);var ag=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function Jw(e){let t=[];do t.push(qR(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function qR(e){let t=[];do t.push($R(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function $R(e){let t=KR(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=VR(e,t);else break;return t}function Rw(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function VR(e,t){let n=Rw(e),r=n;return e.eat(",")&&(e.next!="}"?r=Rw(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function WR(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let a in n){let i=n[a];i.isInGroup(t)&&o.push(i)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function KR(e){if(e.eat("(")){let t=Jw(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=WR(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function GR(e){let t=[[]];return o(a(e,0),n()),t;function n(){return t.push([])-1}function r(i,s,l){let u={term:l,to:s};return t[i].push(u),u}function o(i,s){i.forEach(l=>l.to=s)}function a(i,s){if(i.type=="choice")return i.exprs.reduce((l,u)=>l.concat(a(u,s)),[]);if(i.type=="seq")for(let l=0;;l++){let u=a(i.exprs[l],s);if(l==i.exprs.length-1)return u;o(u,s=n())}else if(i.type=="star"){let l=n();return r(s,l),o(a(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return o(a(i.expr,s),l),o(a(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(s)].concat(a(i.expr,s));if(i.type=="range"){let l=s;for(let u=0;u{e[i].forEach(({term:s,to:l})=>{if(!s)return;let u;for(let c=0;c{u||o.push([s,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=t[r.join(",")]=new Na(r.indexOf(e.length-1)>-1);for(let i=0;i-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Qw(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Zt(this,this.computeAttrs(t),_.from(n),de.setFrom(r))}createChecked(t=null,n,r){return n=_.from(n),this.checkContent(n),new Zt(this,this.computeAttrs(t),n,de.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=_.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let o=this.contentMatch.matchFragment(n),a=o&&o.fillBefore(_.empty,!0);return a?new Zt(this,t,n.append(a),de.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[a]=new e(a,n,i));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let a in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function JR(e,t,n){let r=n.split("|");return o=>{let a=o===null?"null":typeof o;if(r.indexOf(a)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${a}`)}}var ig=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?JR(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},Nl=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=tS(t,o.attrs),this.excluded=null;let a=Yw(this.attrs);this.instance=a?new de(this,a):null}create(t=null){return!t&&this.instance?this.instance:new de(this,Qw(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((a,i)=>r[a]=new e(a,o++,n,i)),r}removeFromSet(t){for(var n=0;n-1}},Ro=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Q0.from(t.nodes),n.marks=Q0.from(t.marks||{}),this.nodes=wd.compile(this.spec.nodes,this),this.marks=Nl.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let a=this.nodes[o],i=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=r[i]||(r[i]=Na.parse(i,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?Pw(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let o in this.marks){let a=this.marks[o],i=a.spec.excludes;a.excluded=i==null?[a]:i==""?[]:Pw(this,i.split(" "))}this.nodeFromJSON=o=>Zt.fromJSON(this,o),this.markFromJSON=o=>de.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof wd){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new og(r,r.defaultAttrs,t,de.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Pw(e,t){let n=[];for(let r=0;r-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function ZR(e){return e.tag!=null}function YR(e){return e.style!=null}var wn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(ZR(o))this.tags.push(o);else if(YR(o)){let a=/[^=]*/.exec(o.style)[0];r.indexOf(a)<0&&r.push(a),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let a=t.nodes[o.node];return a.contentMatch.matchType(a)})}parse(t,n={}){let r=new Sd(this,n,!1);return r.addAll(t,de.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Sd(this,n,!0);return r.addAll(t,de.none,n.from,n.to),B.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(t){let n=[];function r(o){let a=o.priority==null?50:o.priority,i=0;for(;i{r(i=Fw(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in t.nodes){let a=t.nodes[o].spec.parseDOM;a&&a.forEach(i=>{r(i=Fw(i)),i.node||i.ignore||i.mark||(i.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},nS={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},QR={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},rS={ol:!0,ul:!0},Dl=1,sg=2,Ml=4;function Bw(e,t,n){return t!=null?(t?Dl:0)|(t==="full"?sg:0):e&&e.whitespace=="pre"?Dl|sg:n&~Ml}var ji=class{constructor(t,n,r,o,a,i){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=de.none,this.match=a||(i&Ml?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(_.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Dl)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let a=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-o[0].length))}}let n=_.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(_.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!nS.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Sd=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,a,i=Bw(null,n.preserveWhitespace,0)|(r?Ml:0);o?a=new ji(o.type,o.attrs,de.none,!0,n.topMatch||o.type.contentMatch,i):r?a=new ji(null,null,de.none,!0,null,i):a=new ji(t.schema.topNodeType,null,de.none,!0,null,i),this.nodes=[a],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,a=o.options&sg?"full":this.localPreserveWS||(o.options&Dl)>0,{schema:i}=this.parser;if(a==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(a)if(a==="full")r=r.replace(/\r\n?/g,` +`);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let s=r.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(t,n,r,o){let a,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(i,n.attrs||null,r,n.preserveWhitespace);l&&(a=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}a&&this.sync(s)&&this.open--}addAll(t,n,r,o){let a=r||0;for(let i=r?t.childNodes[r]:t.firstChild,s=o==null?null:t.childNodes[o];i!=s;i=i.nextSibling,++a)this.findAtPoint(t,a),this.addDOM(i,n);this.findAtPoint(t,a)}findPlace(t,n,r){let o,a;for(let i=this.open,s=0;i>=0;i--){let l=this.nodes[i],u=l.findWrapping(t);if(u&&(!o||o.length>u.length+s)&&(o=u,a=l,!u.length))break;if(l.solid){if(r)break;s+=2}}if(!o)return null;this.sync(a);for(let i=0;i(i.type?i.type.allowsMarkType(u.type):zw(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new ji(t,n,l,o,null,s)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Dl)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),a=-(r?r.depth+1:0)+(o?0:1),i=(s,l)=>{for(;s>=0;s--){let u=n[s];if(u==""){if(s==n.length-1||s==0)continue;for(;l>=a;l--)if(i(s-1,l))return!0;return!1}else{let c=l>0||l==0&&o?this.nodes[l].type:r&&l>=a?r.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function eO(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&rS.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function tO(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Fw(e){let t={};for(let n in e)t[n]=e[n];return t}function zw(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let a=[],i=s=>{a.push(s);for(let l=0;l{if(a.length||i.marks.length){let s=0,l=0;for(;s=0;o--){let a=this.serializeMark(t.marks[o],t.isInline,n);a&&((a.contentDOM||a.dom).appendChild(r),r=a.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&yd(tg(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return yd(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Uw(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Uw(t.marks)}};function Uw(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function tg(e){return e.document||window.document}var Hw=new WeakMap;function nO(e){let t=Hw.get(e);return t===void 0&&Hw.set(e,t=rO(e)),t}function rO(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s,l=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=yd(e,f,n,r);if(l.appendChild(p),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:l,contentDOM:s}}var iS=65535,sS=Math.pow(2,16);function oO(e,t){return e+t*sS}function oS(e){return e&iS}function aO(e){return(e-(e&iS))/sS}var lS=1,uS=2,Ed=4,cS=8,Pl=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&cS)>0}get deletedBefore(){return(this.delInfo&(lS|Ed))>0}get deletedAfter(){return(this.delInfo&(uS|Ed))>0}get deletedAcross(){return(this.delInfo&Ed)>0}},zr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=oS(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[s+a],c=this.ranges[s+i],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+o+(f<0?0:c);if(r)return p;let h=t==(n<0?l:d)?null:oO(s/3,t-l),m=t==l?uS:t==d?lS:Ed;return(n<0?t!=l:t!=d)&&(m|=cS),new Pl(p,m,h)}o+=c-u}return r?t+o:new Pl(t+o,0,null)}touches(t,n){let r=0,o=oS(n),a=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;st)break;let u=this.ranges[s+a],c=l+u;if(t<=c&&s==o*3)return!0;r+=this.ranges[s+i]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,a=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ra&&l!i.isAtom||!s.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),n.openStart,n.openEnd);return ht.fromReplace(t,this.from,this.to,a)}invert(){return new Ur(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};at.jsonID("addMark",Fl);var Ur=class e extends at{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new B(pg(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return ht.fromReplace(t,this.from,this.to,r)}invert(){return new Fl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};at.jsonID("removeMark",Ur);var zl=class e extends at{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return ht.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ht.fromReplace(t,this.pos,this.pos+1,new B(_.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,a,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};at.jsonID("replaceAround",Ye);function dg(e,t,n){let r=e.resolve(t),o=n-t,a=r.depth;for(;o>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,o--;if(o>0){let i=r.node(a).maybeChild(r.indexAfter(a));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function iO(e,t,n,r){let o=[],a=[],i,s;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let m=0;me.step(l)),a.forEach(l=>e.step(l))}function sO(e,t,n,r){let o=[],a=0;e.doc.nodesBetween(t,n,(i,s)=>{if(!i.isInline)return;a++;let l=null;if(r instanceof Nl){let u=i.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let u=Math.min(s+i.nodeSize,n);for(let c=0;ce.step(new Ur(i.from,i.to,i.style)))}function hg(e,t,n,r=n.contentMatch,o=!0){let a=e.doc.nodeAt(t),i=[],s=t+1;for(let l=0;l=0;l--)e.step(i[l])}function lO(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Hr(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,a=0;;--r){let i=e.$from.node(r),s=e.$from.index(r)+o,l=e.$to.indexAfter(r)-a;if(rn;h--)m||r.index(h)>0?(m=!0,c=_.from(r.node(h).copy(c)),d++):l--;let f=_.empty,p=0;for(let h=a,m=!1;h>n;h--)m||o.after(h+1)=0;i--){if(r.size){let s=n[i].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=_.from(n[i].type.create(n[i].attrs,r))}let o=t.start,a=t.end;e.step(new Ye(o,a,o,a,new B(r,0,0),n.length,!0))}function pO(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,(i,s)=>{let l=typeof o=="function"?o(i):o;if(i.isTextblock&&!i.hasMarkup(r,l)&&hO(e.doc,e.mapping.slice(a).map(s),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&fS(e,i,s,a),hg(e,e.mapping.slice(a).map(s,1),r,void 0,u===null);let c=e.mapping.slice(a),d=c.map(s,1),f=c.map(s+i.nodeSize,1);return e.step(new Ye(d,f,d+1,f-1,new B(_.from(r.create(l,null,i.marks)),0,0),1,!0)),u===!0&&dS(e,i,s,a),!1}})}function dS(e,t,n,r){t.forEach((o,a)=>{if(o.isText){let i,s=/\r?\n|\r/g;for(;i=s.exec(o.text);){let l=e.mapping.slice(r).map(n+1+a+i.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function fS(e,t,n,r){t.forEach((o,a)=>{if(o.type==o.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(` +`))}})}function hO(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function mO(e,t,n,r,o){let a=e.doc.nodeAt(t);if(!a)throw new RangeError("No node at given position");n||(n=a.type);let i=n.create(r,null,o||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,i);if(!n.validContent(a.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Ye(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new B(_.from(i),0,0),1,!0))}function dn(e,t,n=1,r){let o=e.resolve(t),a=o.depth-n,i=r&&r[r.length-1]||o.parent;if(a<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>a;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let s=o.indexAfter(a),l=r&&r[0];return o.node(a).canReplaceWith(s,s,l?l.type:o.node(a+1).type)}function gO(e,t,n=1,r){let o=e.doc.resolve(t),a=_.empty,i=_.empty;for(let s=o.depth,l=o.depth-n,u=n-1;s>l;s--,u--){a=_.from(o.node(s).copy(a));let c=r&&r[u];i=_.from(c?c.type.create(c.attrs,i):o.node(s).copy(i))}e.step(new At(t,t,new B(a.append(i),n,n),!0))}function Sn(e,t){let n=e.resolve(t),r=n.index();return pS(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function bO(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(a=r.node(o+1),s++,i=r.node(o).maybeChild(s)):(a=r.node(o).maybeChild(s-1),i=r.node(o+1)),a&&!a.isTextblock&&pS(a,i)&&r.node(o).canReplace(s,s+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function xO(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,a=e.doc.resolve(t-n),i=a.node().type;if(o&&i.inlineContent){let c=i.whitespace=="pre",d=!!i.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let s=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);fS(e,c.node(),c.before(),s)}i.inlineContent&&hg(e,t+n-1,i,a.node().contentMatchAt(a.index()),r==null);let l=e.mapping.slice(s),u=l.map(t-n);if(e.step(new At(u,l.map(t+n,-1),B.empty,!0)),r===!0){let c=e.doc.resolve(u);dS(e,c.node(),c.before(),e.steps.length)}return e}function yO(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let a=r.index(o);if(r.node(o).canReplaceWith(a,a,n))return r.before(o+1);if(a>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let a=r.indexAfter(o);if(r.node(o).canReplaceWith(a,a,n))return r.after(o+1);if(a=0;i--){let s=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,l=r.index(i)+(s>0?1:0),u=r.node(i),c=!1;if(a==1)c=u.canReplace(l,l,o);else{let d=u.contentMatchAt(l).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return s==0?r.pos:s<0?r.before(i+1):r.after(i+1)}return null}function Ul(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),a=e.resolve(n);return hS(o,a,r)?new At(t,n,r):new fg(o,a,r).fit()}function hS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var fg=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=_.empty;for(let o=0;o<=t.depth;o++){let a=t.node(o);this.frontier.push({type:a.type,match:a.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=_.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let a=this.placed,i=r.depth,s=o.depth;for(;i&&s&&a.childCount==1;)a=a.firstChild.content,i--,s--;let l=new B(a,i,s);return t>-1?new Ye(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new At(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),a.type.spec.isolating&&o<=r){t=r;break}n=a.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,a=null;r?(a=ug(this.unplaced.content,r-1).firstChild,o=a.content):o=this.unplaced.content;let i=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:u}=this.frontier[s],c,d=null;if(n==1&&(i?u.matchType(i.type)||(d=u.fillBefore(_.from(i),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:r,frontierDepth:s,parent:a,inject:d};if(n==2&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:s,parent:a,wrap:c};if(a&&u.matchType(a.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ug(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ug(t,n);if(o.childCount<=1&&n>0){let a=t.size-n<=n+o.size;this.unplaced=new B(Rl(t,n-1,1),n-1,a?n-1:r)}else this.unplaced=new B(Rl(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:a}){for(;this.depth>n;)this.closeFrontierNode();if(a)for(let m=0;m1||l==0||m.content.size)&&(d=b,c.push(mS(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==s.childCount?p:-1)))}let h=u==s.childCount;h||(p=-1),this.placed=Ol(this.placed,n,_.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=s;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],a=n=0;s--){let{match:l,type:u}=this.frontier[s],c=cg(t,s,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:i,move:a?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ol(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),a=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,a)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Ol(this.placed,this.depth,_.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(_.empty,!0);n.childCount&&(this.placed=Ol(this.placed,this.frontier.length,n))}};function Rl(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Rl(e.firstChild.content,t-1,n)))}function Ol(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ol(e.lastChild.content,t-1,n)))}function ug(e,t){for(let n=0;n1&&(r=r.replaceChild(0,mS(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(_.empty,!0)))),e.copy(r)}function cg(e,t,n,r,o){let a=e.node(t),i=o?e.indexAfter(t):e.index(t);if(i==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,i);return s&&!kO(n,a.content,i)?s:null}function kO(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;i.indexOf(f)>-1?s=f:o.before(f)==p&&i.splice(1,0,-f)}let l=i.indexOf(s),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=vO(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(s)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=i[f];p<0||(t=o.before(p),n=a.after(p))}}function gS(e,t,n,r,o){if(tr){let a=o.contentMatchAt(0),i=a.fillBefore(e).append(e);e=i.append(a.matchFragment(i).fillBefore(_.empty,!0))}return e}function wO(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=yO(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new B(_.from(r),0,0))}function SO(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),a=bS(r,o);for(let i=0;i0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return e.delete(r.before(i),n);e.delete(t,n)}function bS(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let a=e.start(o);if(at.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(a==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==a-1)&&n.push(o)}return n}var Ld=class e extends at{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return ht.fail("No node at attribute step's position");let r=Object.create(null);for(let a in n.attrs)r[a]=n.attrs[a];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return ht.fromReplace(t,this.pos,this.pos+1,new B(_.from(o),0,n.isLeaf?0:1))}getMap(){return zr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};at.jsonID("attr",Ld);var Id=class e extends at{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return ht.ok(r)}getMap(){return zr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};at.jsonID("docAttr",Id);var Ji=class extends Error{};Ji=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Ji.prototype=Object.create(Error.prototype);Ji.prototype.constructor=Ji;Ji.prototype.name="TransformError";var Oo=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Bl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Ji(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=B.empty){let o=Ul(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new B(_.from(r),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return CO(this,t,n,r),this}replaceRangeWith(t,n,r){return wO(this,t,n,r),this}deleteRange(t,n){return SO(this,t,n),this}lift(t,n){return uO(this,t,n),this}join(t,n=1){return xO(this,t,n),this}wrap(t,n){return fO(this,t,n),this}setBlockType(t,n=t,r,o=null){return pO(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return mO(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Ld(t,n,r)),this}setDocAttribute(t,n){return this.step(new Id(t,n)),this}addNodeMark(t,n){return this.step(new zl(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof de)n.isInSet(r.marks)&&this.step(new Xi(t,n));else{let o=r.marks,a,i=[];for(;a=n.isInSet(o);)i.push(new Xi(t,a)),o=a.removeFromSet(o);for(let s=i.length-1;s>=0;s--)this.step(i[s])}return this}split(t,n=1,r){return gO(this,t,n,r),this}addMark(t,n,r){return iO(this,t,n,r),this}removeMark(t,n,r){return sO(this,t,n,r),this}clearIncompatible(t,n,r){return hg(this,t,n,r),this}};var mg=Object.create(null),j=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Qi(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;a--){let i=n<0?Yi(t.node(0),t.node(a),t.before(a+1),t.index(a),n,r):Yi(t.node(0),t.node(a),t.after(a+1),t.index(a)+1,n,r);if(i)return i}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ut(t.node(0))}static atStart(t){return Yi(t,t,0,0,1)||new Ut(t)}static atEnd(t){return Yi(t,t,t.content.size,t.childCount,-1)||new Ut(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=mg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in mg)throw new RangeError("Duplicate use of selection JSON ID "+t);return mg[t]=n,n.prototype.jsonID=t,n}getBookmark(){return $.between(this.$anchor,this.$head).getBookmark()}};j.prototype.visible=!0;var Qi=class{constructor(t,n){this.$from=t,this.$to=n}},xS=!1;function yS(e){!xS&&!e.parent.inlineContent&&(xS=!0)}var $=class e extends j{constructor(t,n=t){yS(t),yS(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return j.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Td(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let a=j.findFrom(n,r,!0)||j.findFrom(n,-r,!0);if(a)n=a.$head;else return j.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(j.findFrom(t,-r,!0)||j.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?i=0;i+=o){let s=t.child(i);if(s.isAtom){if(!a&&q.isSelectable(s))return q.create(e,n-(o<0?s.nodeSize:0))}else{let l=Yi(e,s,n+o,o<0?s.childCount:0,o,a);if(l)return l}n+=s.nodeSize*o}return null}function kS(e,t,n){let r=e.steps.length-1;if(r{i==null&&(i=c)}),e.setSelection(j.near(e.doc.resolve(i),n))}var vS=1,Ad=2,CS=4,xg=class extends Oo{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Ad,this}ensureMarks(t){return de.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ad)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Ad,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||de.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let a=this.storedMarks;if(!a){let i=this.doc.resolve(n);a=r==n?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,a)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(j.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=CS,this}get scrolledIntoView(){return(this.updated&CS)>0}};function wS(e,t){return!t||!e?e:e.bind(t)}var Ra=class{constructor(t,n,r){this.name=t,this.init=wS(n.init,r),this.apply=wS(n.apply,r)}},LO=[new Ra("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Ra("selection",{init(e,t){return e.selection||j.atStart(t.doc)},apply(e){return e.selection}}),new Ra("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Ra("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Hl=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=LO.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ra(r.key,r.spec.state,r))})}},Md=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],a=o.spec.state;a&&a.toJSON&&(n[r]=a.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Hl(t.schema,t.plugins),a=new e(o);return o.fields.forEach(i=>{if(i.name=="doc")a.doc=Zt.fromJSON(t.schema,n.doc);else if(i.name=="selection")a.selection=j.fromJSON(a.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],u=l.spec.state;if(l.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){a[i.name]=u.fromJSON.call(l,t,n[s],a);return}}a[i.name]=i.init(t,a)}}),a}};function SS(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=SS(o,t,{})),n[r]=o}return n}var W=class{constructor(t){this.spec=t,this.props={},t.props&&SS(t.props,this,this.props),this.key=t.key?t.key.key:ES("plugin")}getState(t){return t[this.key]}},gg=Object.create(null);function ES(e){return e in gg?e+"$"+ ++gg[e]:(gg[e]=0,e+"$")}var Y=class{constructor(t="key"){this.key=ES(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var Nd=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function IS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var kg=(e,t,n)=>{let r=IS(e,n);if(!r)return!1;let o=Cg(r);if(!o){let i=r.blockRange(),s=i&&Hr(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)}let a=o.nodeBefore;if(PS(e,o,t,-1))return!0;if(r.parent.content.size==0&&(es(a,"end")||q.isSelectable(a)))for(let i=r.depth;;i--){let s=Ul(e.doc,r.before(i),r.after(i),B.empty);if(s&&s.slice.size1)break}return a.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),!0):!1},_S=(e,t,n)=>{let r=IS(e,n);if(!r)return!1;let o=Cg(r);return o?TS(e,o,t):!1},AS=(e,t,n)=>{let r=MS(e,n);if(!r)return!1;let o=Eg(r);return o?TS(e,o,t):!1};function TS(e,t,n){let r=t.nodeBefore,o=r,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let i=t.nodeAfter,s=i,l=t.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let c=s.firstChild;if(!c)return!1;s=c}let u=Ul(e.doc,a,l,B.empty);if(!u||u.from!=a||u instanceof At&&u.slice.size>=l-a)return!1;if(n){let c=e.tr.step(u);c.setSelection($.create(c.doc,a)),n(c.scrollIntoView())}return!0}function es(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var vg=(e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=Cg(r)}let i=a&&a.nodeBefore;return!i||!q.isSelectable(i)?!1:(t&&t(e.tr.setSelection(q.create(e.doc,a.pos-i.nodeSize)).scrollIntoView()),!0)};function Cg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function MS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=MS(e,n);if(!r)return!1;let o=Eg(r);if(!o)return!1;let a=o.nodeAfter;if(PS(e,o,t,1))return!0;if(r.parent.content.size==0&&(es(a,"start")||q.isSelectable(a))){let i=Ul(e.doc,r.before(),r.after(),B.empty);if(i&&i.slice.size{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof q,o;if(r){if(n.node.isTextblock||!Sn(e.doc,n.from))return!1;o=n.from}else if(o=Da(e.doc,n.from,-1),o==null)return!1;if(t){let a=e.tr.join(o);r&&a.setSelection(q.create(a.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(a.scrollIntoView())}return!0},DS=(e,t)=>{let n=e.selection,r;if(n instanceof q){if(n.node.isTextblock||!Sn(e.doc,n.to))return!1;r=n.to}else if(r=Da(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},RS=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),a=o&&Hr(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)},Lg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function Ig(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),a=n.indexAfter(-1),i=Ig(o.contentMatchAt(a));if(!i||!o.canReplaceWith(a,a,i))return!1;if(t){let s=n.after(),l=e.tr.replaceWith(s,s,i.createAndFill());l.setSelection(j.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},Ag=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Ut||r.parent.inlineContent||o.parent.inlineContent)return!1;let a=Ig(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let i=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let a=n.before();if(dn(e.doc,a))return t&&t(e.tr.split(a).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Hr(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function IO(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof q&&t.selection.node.isBlock)return!r.parentOffset||!dn(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],i,s,l=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),s=Ig(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,l,r);a.unshift(m||(l&&s?{type:s}:null)),i=p;break}else{if(p==1)return!1;a.unshift(null)}let c=t.tr;(t.selection instanceof $||t.selection instanceof Ut)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=dn(c.doc,d,a.length,a);if(f||(a[0]=s?{type:s}:null,f=dn(c.doc,d,a.length,a)),!f)return!1;if(c.split(d,a.length,a),!l&&u&&r.node(i).type!=s){let p=c.mapping.map(r.before(i)),h=c.doc.resolve(p);s&&r.node(i-1).canReplaceWith(h.index(),h.index()+1,s)&&c.setNodeMarkup(c.mapping.map(r.before(i)),s)}return n&&n(c.scrollIntoView()),!0}}var _O=IO();var OS=(e,t)=>{let{$from:n,to:r}=e.selection,o,a=n.sharedDepth(r);return a==0?!1:(o=n.before(a),t&&t(e.tr.setSelection(q.create(e.doc,o))),!0)},AO=(e,t)=>(t&&t(e.tr.setSelection(new Ut(e.doc))),!0);function TO(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,a=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(o.isTextblock||Sn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function PS(e,t,n,r){let o=t.nodeBefore,a=t.nodeAfter,i,s,l=o.type.spec.isolating||a.type.spec.isolating;if(!l&&TO(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(s=o.contentMatchAt(o.childCount)).findWrapping(a.type))&&s.matchType(i[0]||a.type).validEnd){if(n){let p=t.pos+a.nodeSize,h=_.empty;for(let g=i.length-1;g>=0;g--)h=_.from(i[g].create(null,h));h=_.from(o.copy(h));let m=e.tr.step(new Ye(t.pos-1,p,t.pos,p,new B(h,1,0),i.length,!0)),b=m.doc.resolve(p+2*i.length);b.nodeAfter&&b.nodeAfter.type==o.type&&Sn(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=a.type.spec.isolating||r>0&&l?null:j.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Hr(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&es(a,"start",!0)&&es(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=a,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=_.empty;for(let y=h.length-1;y>=0;y--)g=_.from(h[y].copy(g));let x=e.tr.step(new Ye(t.pos-h.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new B(g,h.length,0),0,!0));n(x.scrollIntoView())}return!0}}return!1}function BS(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return o.node(a).isTextblock?(n&&n(t.tr.setSelection($.create(t.doc,e<0?o.start(a):o.end(a)))),!0):!1}}var Mg=BS(-1),Ng=BS(1);function FS(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),s=i&&Zi(i,e,t);return s?(r&&r(n.tr.wrap(i,s).scrollIntoView()),!0):!1}}function Dg(e,t=null){return function(n,r){let o=!1;for(let a=0;a{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let a=n.tr;for(let i=0;i=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=i.resolve(t.start-2);a=new Ma(l,l,t.depth),t.endIndex=0;c--)a=_.from(n[c].type.create(n[c].attrs,a));e.step(new Ye(t.start-(r?2:0),t.end,t.start,t.end,new B(a,0,0),n.length,!0));let i=0;for(let c=0;ci.childCount>0&&i.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?RO(t,n,e,a):OO(t,n,a):!0:!1}}function RO(e,t,n,r){let o=e.tr,a=r.end,i=r.$to.end(r.depth);am;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let a=r.doc.resolve(n.start),i=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,l=n.endIndex==o.childCount,u=a.node(-1),c=a.index(-1);if(!u.canReplace(c+(s?0:1),c+1,i.content.append(l?_.empty:_.from(o))))return!1;let d=a.pos,f=d+i.nodeSize;return r.step(new Ye(d-(s?1:0),f+(l?1:0),d+1,f-1,new B((s?_.empty:_.from(o.copy(_.empty))).append(l?_.empty:_.from(o.copy(_.empty))),s?0:1,l?0:1),s?0:1)),t(r.scrollIntoView()),!0}function HS(e){return function(t,n){let{$from:r,$to:o}=t.selection,a=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!a)return!1;let i=a.startIndex;if(i==0)return!1;let s=a.parent,l=s.child(i-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==s.type,c=_.from(u?e.create():null),d=new B(_.from(e.create(null,_.from(s.type.create(null,c)))),u?3:1,0),f=a.start,p=a.end;n(t.tr.step(new Ye(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var mt=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},is=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Ug=null,$r=function(e,t,n){let r=Ug||(Ug=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},PO=function(){Ug=null},Ha=function(e,t,n,r){return n&&(qS(e,t,n,r,-1)||qS(e,t,n,r,1))},BO=/^(img|br|input|textarea|hr)$/i;function qS(e,t,n,r,o){for(var a;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ln(e))){let i=e.parentNode;if(!i||i.nodeType!=1||Xl(e)||BO.test(e.nodeName)||e.contentEditable=="false")return!1;t=mt(e)+(o<0?0:1),e=i}else if(e.nodeType==1){let i=e.childNodes[t+(o<0?-1:0)];if(i.nodeType==1&&i.contentEditable=="false")if(!((a=i.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)t+=o;else return!1;else e=i,t=o<0?Ln(e):0}else return!1}}function Ln(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function FO(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Ln(e)}else if(e.parentNode&&!Xl(e))t=mt(e),e=e.parentNode;else return null}}function zO(e,t){for(;;){if(e.nodeType==3&&t2),En=ss||(ir?/Mac/.test(ir.platform):!1),w2=ir?/Win/.test(ir.platform):!1,Vr=/Android \d/.test(qo),Jl=!!$S&&"webkitFontSmoothing"in $S.documentElement.style,$O=Jl?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function VO(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function qr(e,t){return typeof e=="number"?e:e[t]}function WO(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function VS(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,a=e.dom.ownerDocument;for(let i=n||e.dom;i;){if(i.nodeType!=1){i=is(i);continue}let s=i,l=s==a.body,u=l?VO(a):WO(s),c=0,d=0;if(t.topu.bottom-qr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+qr(o,"top")-u.top:t.bottom-u.bottom+qr(o,"bottom")),t.leftu.right-qr(r,"right")&&(c=t.right-u.right+qr(o,"right")),c||d)if(l)a.defaultView.scrollBy(c,d);else{let p=s.scrollLeft,h=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);let m=s.scrollLeft-p,b=s.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=l?"fixed":getComputedStyle(i).position;if(/^(fixed|sticky)$/.test(f))break;i=f=="absolute"?i.offsetParent:is(i)}}function KO(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let a=(t.left+t.right)/2,i=n+1;i=n-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:S2(e.dom)}}function S2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=is(r));return t}function GO({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;E2(n,r==0?0:r-t)}function E2(e,t){for(let n=0;n=s){i=Math.max(h.bottom,i),s=Math.min(h.top,s);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(a=d+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?XO(n,o):!n||r&&n.nodeType==1?{node:e,offset:a}:L2(n,o)}function XO(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let a=0;a=(i.left+i.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function ob(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function JO(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(i.left+i.right)/2?1:-1}return e.docView.posFromDOM(r,o,a)}function YO(e,t,n,r){let o=-1;for(let a=t,i=!1;a!=e.dom;){let s=e.docView.nearestDesc(a,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!i&&l.left>r.left||l.top>r.top?o=s.posBefore:(!i&&l.right-1?o:e.docView.posFromDOM(t,n,-1)}function I2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;Jl&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=YO(e,r,o,t))}s==null&&(s=ZO(e,i,t));let l=e.docView.nearestDesc(i,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function WS(e){return e.top=0&&o==r.nodeValue.length?(l--,c=1):n<0?l--:u++,ql(Bo($r(r,l,u),c),c<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&o&&(n<0||o==Ln(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Og(l.getBoundingClientRect(),!1)}if(a==null&&o=0)}if(a==null&&o&&(n<0||o==Ln(r))){let l=r.childNodes[o-1],u=l.nodeType==3?$r(l,Ln(l)-(i?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return ql(Bo(u,1),!1)}if(a==null&&o=0)}function ql(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Og(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function A2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function tP(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return A2(e,t,()=>{let{node:a}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(a,!0);if(!s)break;if(s.node.isBlock){a=s.contentDOM||s.dom;break}a=s.dom.parentNode}let i=_2(e,o.pos,1);for(let s=a.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=$r(s,0,s.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?i.top-c.top>(c.bottom-i.top)*2:c.bottom-i.bottom>(i.bottom-c.top)*2))return!1}}return!0})}var nP=/[\u0590-\u08ac]/;function rP(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,a=!o,i=o==r.parent.content.size,s=e.domSelection();return s?!nP.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?a:i:A2(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{s.collapse(c,d),l&&(l!=c||u!=d)&&s.extend&&s.extend(l,u)}catch{}return f!=null&&(s.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var KS=null,GS=null,jS=!1;function oP(e,t,n){return KS==t&&GS==n?jS:(KS=t,GS=n,jS=n=="up"||n=="down"?tP(e,t,n):rP(e,t,n))}var _n=0,XS=1,Pa=2,sr=3,qa=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=_n,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nmt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let a=t;;a=a.parentNode){if(a==this.dom){o=!1;break}if(a.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let a=t;;a=a.parentNode){if(a==this.dom){o=!0;break}if(a.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let a=this.getDesc(o),i;if(a&&(!n||a.node))if(r&&(i=a.nodeDOM)&&!(i.nodeType==1?i.contains(t.nodeType==1?t:t.parentNode):i==t))r=!1;else return a}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let a=this.getDesc(o);if(a)return a.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||i instanceof Od){o=t-a;break}a=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let a;r&&!(a=this.children[r-1]).size&&a instanceof Dd&&a.side>=0;r--);if(n<=0){let a,i=!0;for(;a=r?this.children[r-1]:null,!(!a||a.dom.parentNode==this.contentDOM);r--,i=!1);return a&&n&&i&&!a.border&&!a.domAtom?a.domFromPos(a.size,n):{node:this.contentDOM,offset:a?mt(a.dom)+1:0}}else{let a,i=!0;for(;a=r=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=i;for(let d=s;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=mt(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||s==this.children.length-1)){n=u;for(let c=s+1;ch&&in){let h=s;s=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(s.node,s.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let s=r+a.border,l=i-a.border;if(t>=s&&n<=l){this.dirty=t==r||n==i?Pa:XS,t==s&&n==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=sr:a.markDirty(t-s,n-s);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Pa:sr}r=i}this.dirty=Pa}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Pa:XS;n.dirty{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)})),!n.type.spec.raw){if(i.nodeType!=1){let s=document.createElement("span");s.appendChild(i),i=s}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=n,this.widget=n,a=this}matchesWidget(t){return this.dirty==_n&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Vg=class extends qa{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},ls=class e extends qa{constructor(t,n,r,o,a){super(t,[],r,o),this.mark=n,this.spec=a}static create(t,n,r,o){let a=o.nodeViews[n.type.name],i=a&&a(n,o,r);return(!i||!i.dom)&&(i=Fr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,i.dom,i.contentDOM||i.dom,i)}parseRule(){return this.dirty&sr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=sr&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=_n){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(a=jg(a,0,t,r));for(let s=0;s{if(!l)return i;if(l.parent)return l.parent.posBeforeChild(l)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Fr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=N2(c,r,n),u?l=new Wg(t,n,r,o,c,d||null,f,u,a,i+1):n.isText?new Rd(t,n,r,o,c,f,a):new e(t,n,r,o,c,d||null,f,a,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>_.empty)}return t}matchesNode(t,n,r){return this.dirty==_n&&t.eq(this.node)&&Pd(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,a=t.composing?this.localCompositionInfo(t,n):null,i=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new Gg(this,i&&i.node,t);lP(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?de.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,o)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,t);let p;l.findNodeMatch(u,c,d,f)||s&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,o)||l.addNode(u,c,d,t,o),o+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Pa)&&(i&&this.protectLocalComposition(t,i),T2(this.contentDOM,this.children,t),ss&&uP(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof $)||rn+this.node.content.size)return null;let a=t.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let i=a.nodeValue,s=cP(this.node.content,i,r-n,o-n);return s<0?null:{node:a,pos:s,text:i}}else return{node:a,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let a=n;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let i=new Vg(this,a,n,o);t.input.compositionNodes.push(i),this.children=jg(this.children,r,r+o.length,t,i)}update(t,n,r,o){return this.dirty==sr||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=_n}updateOuterDeco(t){if(Pd(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=M2(this.dom,this.nodeDOM,Kg(this.outerDeco,this.node,n),Kg(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function JS(e,t,n,r,o){N2(r,t,e);let a=new Ho(void 0,e,t,n,r,r,r,o,0);return a.contentDOM&&a.updateChildren(o,0),a}var Rd=class e extends Ho{constructor(t,n,r,o,a,i,s){super(t,n,r,o,a,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==sr||this.dirty!=_n&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=_n||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=_n,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),a=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,a,a,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=sr)}get domAtom(){return!1}isText(t){return this.node.text==t}},Od=class extends qa{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==_n&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},Wg=class extends Ho{constructor(t,n,r,o,a,i,s,l,u,c){super(t,n,r,o,a,i,s,u,c),this.spec=l}update(t,n,r,o){if(this.dirty==sr)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let a=this.spec.update(t,n,r);return a&&this.updateInner(t,n,r,o),a}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function T2(e,t,n){let r=e.firstChild,o=!1;for(let a=0;a>1,i=Math.min(a,t.length);for(;o-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=ls.create(this.top,t[a],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,a++}}findNodeMatch(t,n,r,o){let a=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(t,n,r))a=this.top.children.indexOf(i,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s0;){let s;for(;;)if(r){let u=n.children[r-1];if(u instanceof ls)n=u,r=u.children.length;else{s=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,a.set(s,o),i.push(s)}}return{index:o,matched:a,matches:i.reverse()}}function sP(e,t){return e.type.side-t.type.side}function lP(e,t,n,r){let o=t.locals(e),a=0;if(o.length==0){for(let u=0;ua;)s.push(o[i++]);let h=a+f.nodeSize;if(f.isText){let b=h;i!b.inline):s.slice();r(f,m,t.forChild(a,f),p),a=h}}function uP(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function cP(e,t,n,r){for(let o=0,a=0;o=n){if(a>=r&&l.slice(r-t.length-s,r-s)==t)return r-t.length;let u=s=0&&u+t.length+s>=n)return s+u;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function jg(e,t,n,r,o){let a=[];for(let i=0,s=0;i=n||c<=t?a.push(l):(un&&a.push(l.slice(n-u,l.size,r)))}return a}function ab(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&o.size==0,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let s=r.resolve(i),l,u;if($d(n)){for(l=i;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&q.isSelectable(d)&&o.parent&&!(d.isInline&&UO(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new q(i==f?s:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=i,f=i;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!D2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function fP(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,mt(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Yt&&Uo<=11&&(n.disabled=!0,n.disabled=!1)}function R2(e,t){if(t instanceof q){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(t2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else t2(e)}function t2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ib(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||$.between(t,n,r)}function n2(e){return e.editable&&!e.hasFocus()?!1:O2(e)}function O2(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function pP(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ha(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Xg(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&j.findFrom(a,t)}function Fo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function r2(e,t,n){let r=e.state.selection;if(r instanceof $)if(n.indexOf("s")>-1){let{$head:o}=r,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let i=e.state.doc.resolve(o.pos+a.nodeSize*(t<0?-1:1));return Fo(e,new $(r.$anchor,i))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=Xg(e.state,t);return o&&o instanceof q?Fo(e,o):!1}else if(!(En&&n.indexOf("m")>-1)){let o=r.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,i;if(!a||a.isText)return!1;let s=t<0?o.pos-a.nodeSize:o.pos;return a.isAtom||(i=e.docView.descAt(s))&&!i.contentDOM?q.isSelectable(a)?Fo(e,new q(t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):Jl?Fo(e,new $(e.state.doc.resolve(t<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(r instanceof q&&r.node.isInline)return Fo(e,new $(t>0?r.$to:r.$from));{let o=Xg(e.state,t);return o?Fo(e,o):!1}}}function Bd(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Vl(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ns(e,t){return t<0?hP(e):mP(e)}function hP(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=!1;for(In&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Vl(s,-1))o=n,a=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(P2(n))break;{let s=n.previousSibling;for(;s&&Vl(s,-1);)o=n.parentNode,a=mt(s),s=s.previousSibling;if(s)n=s,r=Bd(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}i?Jg(e,n,r):o&&Jg(e,o,a)}function mP(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Bd(n),a,i;for(;;)if(r{e.state==o&&Wr(e)},50)}function o2(e,t){let n=e.state.doc.resolve(t);if(!(it||w2)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let a=e.coordsAtPos(t-1),i=(a.top+a.bottom)/2;if(i>o.top&&i1)return a.lefto.top&&i1)return a.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function a2(e,t,n){let r=e.state.selection;if(r instanceof $&&!r.empty||n.indexOf("s")>-1||En&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let i=Xg(e.state,t);if(i&&i instanceof q)return Fo(e,i)}if(!o.parent.inlineContent){let i=t<0?o:a,s=r instanceof Ut?j.near(i,t):j.findFrom(i,t);return s?Fo(e,s):!1}return!1}function i2(e,t){if(!(e.state.selection instanceof $))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let i=e.state.tr;return t<0?i.delete(n.pos-a.nodeSize,n.pos):i.delete(n.pos,n.pos+a.nodeSize),e.dispatch(i),!0}return!1}function s2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function xP(e){if(!Mt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;s2(e,r,"true"),setTimeout(()=>s2(e,r,"false"),20)}return!1}function yP(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function kP(e,t){let n=t.keyCode,r=yP(t);if(n==8||En&&n==72&&r=="c")return i2(e,-1)||ns(e,-1);if(n==46&&!t.shiftKey||En&&n==68&&r=="c")return i2(e,1)||ns(e,1);if(n==13||n==27)return!0;if(n==37||En&&n==66&&r=="c"){let o=n==37?o2(e,e.state.selection.from)=="ltr"?-1:1:-1;return r2(e,o,r)||ns(e,o)}else if(n==39||En&&n==70&&r=="c"){let o=n==39?o2(e,e.state.selection.from)=="ltr"?1:-1:1;return r2(e,o,r)||ns(e,o)}else{if(n==38||En&&n==80&&r=="c")return a2(e,-1,r)||ns(e,-1);if(n==40||En&&n==78&&r=="c")return xP(e)||a2(e,1,r)||ns(e,1);if(r==(En?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function sb(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:a}=t;for(;o>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,a--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let i=e.someProp("clipboardSerializer")||Fr.fromSchema(e.state.schema),s=q2(),l=s.createElement("div");l.appendChild(i.serializeFragment(r,{document:s}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=H2[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=s.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${a}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` -`);return{dom:l,text:f,slice:t}}function w_(e,t,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=!!t&&(r||i||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return a=new B(N.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)a=d;else{let f=o.marks(),{schema:p}=e.state,h=Br.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=lI(n),jl&&uI(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||wn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!iI.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=cI(K2(a,+c[1],+c[2]),c[4]);else if(a=B.maxOpen(sI(a.content,o),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d{a=d(a,e,l)}),a}var iI=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function sI(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&i.length&&__(l,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=S_(s[s.length-1],i.length));let c=E_(a,l);s.push(c),o=o.matchType(c.type),i=l}}),s)return N.from(s)}return e}function E_(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,N.from(e));return e}function __(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function K2(e,t,n){return tn})),_g.createHTML(e)):e}function lI(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=T_().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&C_[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=aI(e),o)for(let i=0;i=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=N.from(l.create(r[a+1],o)),i++,s++}return new B(o,i,s)}var Ut={},Ht={},dI={touchstart:!0,touchmove:!0},zg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function fI(e){for(let t in Ut){let n=Ut[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{hI(e,r)&&!Jg(e,r)&&(e.editable||!(r.type in Ht))&&n(e,r)},dI[t]?{passive:!0}:void 0)}Rt&&e.dom.addEventListener("input",()=>null),Ug(e)}function Fo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function pI(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Ug(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Jg(e,r))})}function Jg(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function hI(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function mI(e,t){!Jg(e,t)&&Ut[t.type]&&(e.editable||!(t.type in Ht))&&Ut[t.type](e,t)}Ht.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!A_(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(qr&&st&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),oa&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Di(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||oI(e,n)?n.preventDefault():Fo(e,"key")};Ht.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Ht.keypress=(e,t)=>{let n=t;if(A_(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||_n&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof q)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function Id(e){return{left:e.clientX,top:e.clientY}}function gI(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Yg(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,n,i.nodeAfter,i.before(s),o,!0):a(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function na(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function bI(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(na(e,new $(n),"pointer"),!0):!1}function yI(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof $&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if($.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(na(e,$.create(e.state.doc,o),"pointer"),!0):!1}function vI(e,t,n,r,o){return Yg(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?yI(e,n):bI(e,n))}function xI(e,t,n,r){return Yg(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function kI(e,t,n,r){return Yg(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||wI(e,n,r)}function wI(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(na(e,q.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)na(e,q.create(r,a+1,a+1+s.content.size),"pointer");else if($.isSelectable(s))na(e,$.create(r,a),"pointer");else continue;return!0}}function Zg(e){return Nd(e)}var N_=_n?"metaKey":"ctrlKey";Ut.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Zg(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&gI(n,e.input.lastClick)&&!n[N_]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(Id(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Hg(e,s,n,!!r)):(i=="doubleClick"?xI:kI)(e,s.pos,s.inside,n)?n.preventDefault():Fo(e,"pointer"))};var Hg=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[N_],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}let a=o?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof $&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Cn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Fo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Vr(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Id(t))),this.updateAllowDefault(t),this.allowDefault||!n?Fo(this.view,"pointer"):vI(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Rt&&this.mightDrag&&!this.mightDrag.node.isAtom||st&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(na(this.view,G.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Fo(this.view,"pointer")}move(t){this.updateAllowDefault(t),Fo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Ut.touchstart=e=>{e.input.lastTouch=Date.now(),Zg(e),Fo(e,"pointer")};Ut.touchmove=e=>{e.input.lastTouch=Date.now(),Fo(e,"pointer")};Ut.contextmenu=e=>Zg(e);function A_(e,t){return e.composing?!0:Rt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var EI=qr?5e3:-1;Ht.compositionstart=Ht.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof q&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||st&&l_&&_I(e)))e.markCursor=e.state.storedMarks||n.marks(),Nd(e,!0),e.markCursor=null;else if(Nd(e,!t.selection.empty),Cn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}M_(e,EI)};function _I(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Ht.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,M_(e,20))};function M_(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Nd(e),t))}function R_(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=CI());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function SI(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=w4(t.focusNode,t.focusOffset),r=E4(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function CI(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Nd(e,t=!1){if(!(qr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),R_(e),t||e.docView&&e.docView.dirty){let n=jg(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function TI(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var Hl=Zt&&zo<15||oa&&T4<604;Ut.copy=Ht.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=Hl?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Gg(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):TI(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function NI(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function AI(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?$l(e,r.value,null,o,t):$l(e,r.textContent,r.innerHTML,o,t)},50)}function $l(e,t,n,r,o){let i=w_(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||B.empty)))return!0;if(!i)return!1;let s=NI(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function D_(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ht.paste=(e,t)=>{let n=t;if(e.composing&&!qr)return;let r=Hl?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&$l(e,D_(r),r.getData("text/html"),o,n)?n.preventDefault():AI(e,n)};var Ad=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},MI=_n?"altKey":"ctrlKey";function O_(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[MI]}Ut.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Id(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof $?o.to-1:o.to))){if(r&&r.mightDrag)s=$.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=$.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:u,slice:c}=Gg(e,a);(!n.dataTransfer.files.length||!st||a_>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Hl?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Hl||n.dataTransfer.setData("text/plain",u),e.dragging=new Ad(c,O_(e,n),s)};Ut.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Ht.dragover=Ht.dragenter=(e,t)=>t.preventDefault();Ht.drop=(e,t)=>{try{RI(e,t,e.dragging)}finally{e.dragging=null}};function RI(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Id(t));if(!r)return;let o=e.state.doc.resolve(r.pos),i=n&&n.slice;i?e.someProp("transformPasted",p=>{i=p(i,e,!1)}):i=w_(e,D_(t.dataTransfer),Hl?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&O_(e,t));if(e.someProp("handleDrop",p=>p(e,t,i||B.empty,s))){t.preventDefault();return}if(!i)return;t.preventDefault();let a=i?yd(e.state.doc,o.pos,i):o.pos;a==null&&(a=o.pos);let l=e.state.tr;if(s){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let u=l.mapping.map(a),c=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,i.content.firstChild):l.replaceRange(u,u,i),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&$.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new $(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),l.setSelection(Kg(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Ut.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Vr(e)},20))};Ut.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Ut.beforeinput=(e,t)=>{if(st&&qr&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Di(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Ht)Ut[e]=Ht[e];function ql(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var Md=class e{constructor(t,n){this.toDOM=t,this.spec=n||Pi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Ie(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ql(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},Li=class e{constructor(t,n){this.attrs=t,this.spec=n||Pi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Ie(i,s,this)}valid(t,n){return n.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,o+a,i)}}map(t,n,r){return this==Mt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Pi)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=l+r,c;if(c=L_(n,a,u)){for(o||(o=this.children.slice());ia&&d.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let i=t+1,s=i+n.content.size;for(let a=0;ai&&l.type instanceof Li){let u=Math.max(i,l.from)-i,c=Math.min(s,l.to)-i;uo.map(t,n,Pi));return e.from(r)}forChild(t,n){if(n.isLeaf)return ke.empty;let r=[];for(let o=0;on instanceof ke)?t:t.reduce((n,r)=>n.concat(r instanceof ke?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-h-(p-f);for(let g=0;gy+c-d)continue;let v=a[g]+c-d;p>=v?a[g+1]=f<=v?-2:-1:f>=c&&b&&(a[g]+=b,a[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u=r.content.size){l=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=a[u+2].mapInner(n,b,c+1,e[u]+i+1,s);g!=Mt?(a[u]=d,a[u+1]=p,a[u+2]=g):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=OI(a,e,t,n,o,i,s),c=Dd(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=L_(e,a,l+n);if(u){i=!0;let c=Dd(u,a,n+l+1,r);c!=Mt&&o.push(l,l+a.nodeSize,c)}});let s=I_(i?P_(e):e,-n).sort(Bi);for(let a=0;a0;)t++;e.splice(t,0,n)}function Sg(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Mt&&t.push(r)}),e.cursorWrapper&&t.push(ke.create(e.state.doc,[e.cursorWrapper.deco])),Rd.from(t)}var II={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},LI=Zt&&zo<=11,qg=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},Vg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new qg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),LI&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,II)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(H2(this.view)){if(this.suppressingSelectionUpdates)return Vr(this.view);if(Zt&&zo<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Fi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=ra(i))n.add(i);for(let i=t.anchorNode;i;i=ra(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&H2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||FI(t,d)!=p)&&f.remove()}}}else if((st||Rt)&&l.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),PI(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Vr(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let g=r.childNodes[b-1],y=g.pmViewDesc;if(g.nodeName=="BR"&&!y){i=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||wn.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:UI,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+s,head:g+s}}return{doc:m,sel:h,from:s,to:a}}function UI(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Rt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Rt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var HI=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function $I(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let E=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,_=jg(e,E);if(_&&!e.state.selection.eq(_)){if(st&&qr&&e.input.lastKeyCode===13&&Date.now()-100C(e,Di(13,"Enter"))))return;let T=e.state.tr.setSelection(_);E=="pointer"?T.setMeta("pointer",!0):E=="key"&&T.scrollIntoView(),i&&T.setMeta("composition",i),e.dispatch(T)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,u=zI(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||qr)&&o.some(E=>E.nodeType==1&&!HI.test(E.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",E=>E(e,Di(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&l instanceof q&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let E=Q2(e,e.state.doc,u.sel);if(E&&!E.eq(e.state.selection)){let _=e.state.tr.setSelection(E);i&&_.setMeta("composition",i),e.dispatch(_)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Zt&&zo<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),y=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if((oa&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!y&&m.posE(e,Di(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&VI(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",E=>E(e,Di(8,"Backspace")))){qr&&st&&e.domObserver.suppressSelectionUpdates();return}st&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),qr&&!y&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(E){return E(e,Di(13,"Enter"))})},20));let v=h.start,x=h.endA,k=E=>{let _=E||e.state.tr.replace(v,x,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let T=Q2(e,_.doc,u.sel);T&&!(st&&e.composing&&T.empty&&(h.start!=h.endB||e.input.lastChromeDeleteVr(e),20));let E=k(e.state.tr.delete(v,x)),_=c.resolve(h.start).marksAcross(c.resolve(h.endA));_&&E.ensureMarks(_),e.dispatch(E)}else if(h.endA==h.endB&&(w=qI(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let E=k(e.state.tr);w.type=="add"?E.addMark(v,x,w.mark):E.removeMark(v,x,w.mark),e.dispatch(E)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let E=m.parent.textBetween(m.parentOffset,b.parentOffset),_=()=>k(e.state.tr.insertText(E,v,x));e.someProp("handleTextInput",T=>T(e,v,x,E,_))||e.dispatch(_())}else e.dispatch(k());else e.dispatch(k())}function Q2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Kg(e,t.resolve(n.anchor),t.resolve(n.head))}function qI(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,a,l;for(let c=0;cc.mark(a.addToSet(c.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||Cg(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function WI(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));r-=s+l-i}if(s=s?i-r:0;i-=l,i&&i=a?i-r:0;i-=l,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}var Vl=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new zg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(i_),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=r_(this),n_(this),this.nodeViews=o_(this),this.docView=L2(this.state.doc,t_(this),Sg(this),this.dom,this),this.domObserver=new Vg(this,(r,o,i,s)=>$I(this,r,o,i,s)),this.domObserver.start(),fI(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ug(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(i_),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(R_(this),s=!0),this.state=t;let a=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=o_(this);KI(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ug(this),this.editable=r_(this),n_(this);let l=Sg(this),u=t_(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(o.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&M4(this);if(s){this.domObserver.stop();let p=d&&(Zt||st)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&jI(o.selection,t.selection);if(d){let h=st?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=SI(this)),(i||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=L2(t.doc,u,l,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Z4(this))?Vr(this,p):(v_(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&R4(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof $){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&A2(this,n.getBoundingClientRect(),t)}else A2(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new Ad(t.slice,t.move,o<0?void 0:$.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return B4(this,t)}coordsAtPos(t,n=1){return p_(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return $4(this,n||this.state,t)}pasteHTML(t,n){return $l(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return $l(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Gg(this,t)}destroy(){this.docView&&(pI(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Sg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,x4())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return mI(this,t)}domSelectionRange(){let t=this.domSelection();return t?Rt&&this.root.nodeType===11&&S4(this.dom.ownerDocument)==this.dom&&BI(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};Vl.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function t_(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Ie.node(0,e.state.doc.content.size,t)]}function n_(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Ie.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function r_(e){return!e.someProp("editable",t=>t(e.state)===!1)}function jI(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function o_(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function KI(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function i_(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Wr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Pd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},GI=typeof navigator<"u"&&/Mac/.test(navigator.platform),JI=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Qe=0;Qe<10;Qe++)Wr[48+Qe]=Wr[96+Qe]=String(Qe);var Qe;for(Qe=1;Qe<=24;Qe++)Wr[Qe+111]="F"+Qe;var Qe;for(Qe=65;Qe<=90;Qe++)Wr[Qe]=String.fromCharCode(Qe+32),Pd[Qe]=String.fromCharCode(Qe);var Qe;for(Ld in Wr)Pd.hasOwnProperty(Ld)||(Pd[Ld]=Wr[Ld]);var Ld;function B_(e){var t=GI&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||JI&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Pd:Wr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var YI=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),ZI=typeof navigator<"u"&&/Win/.test(navigator.platform);function XI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a{for(var n in t)eL(e,n,{get:t[n],enumerable:!0})};function qd(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var Vd=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,(...u)=>{let c=a(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!e,l=e||o.tr,u=()=>(!a&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(l,t),b=f(...h)(m);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>l(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:qd({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)(s)]))}};return s}},K_={};ib(K_,{blur:()=>tL,clearContent:()=>nL,clearNodes:()=>rL,command:()=>oL,createParagraphNear:()=>iL,cut:()=>sL,deleteCurrentNode:()=>aL,deleteNode:()=>lL,deleteRange:()=>uL,deleteSelection:()=>cL,enter:()=>dL,exitCode:()=>fL,extendMarkRange:()=>pL,first:()=>hL,focus:()=>mL,forEach:()=>gL,insertContent:()=>bL,insertContentAt:()=>xL,joinBackward:()=>EL,joinDown:()=>wL,joinForward:()=>_L,joinItemBackward:()=>SL,joinItemForward:()=>CL,joinTextblockBackward:()=>TL,joinTextblockForward:()=>NL,joinUp:()=>kL,keyboardShortcut:()=>ML,lift:()=>RL,liftEmptyBlock:()=>DL,liftListItem:()=>OL,newlineInCode:()=>IL,resetAttributes:()=>LL,scrollIntoView:()=>PL,selectAll:()=>BL,selectNodeBackward:()=>FL,selectNodeForward:()=>zL,selectParentNode:()=>UL,selectTextblockEnd:()=>HL,selectTextblockStart:()=>$L,setContent:()=>qL,setMark:()=>r8,setMeta:()=>o8,setNode:()=>i8,setNodeSelection:()=>s8,setTextDirection:()=>a8,setTextSelection:()=>l8,sinkListItem:()=>u8,splitBlock:()=>c8,splitListItem:()=>d8,toggleList:()=>f8,toggleMark:()=>p8,toggleNode:()=>h8,toggleWrap:()=>m8,undoInputRule:()=>g8,unsetAllMarks:()=>b8,unsetMark:()=>y8,unsetTextDirection:()=>v8,updateAttributes:()=>x8,wrapIn:()=>k8,wrapInList:()=>w8});var tL=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),nL=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),rL=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(a,l)=>{if(a.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Ur(p);if(a.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},oL=e=>t=>e(t),iL=()=>({state:e,dispatch:t})=>gg(e,t),sL=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new q(r.doc.resolve(Math.max(s-1,0)))),!0},aL=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){let a=o.before(i),l=o.after(i);e.delete(a,l).scrollIntoView()}return!0}return!1};function $e(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var lL=e=>({tr:t,state:n,dispatch:r})=>{let o=$e(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let l=i.before(s),u=i.after(s);t.delete(l,u).scrollIntoView()}return!0}return!1},uL=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},cL=()=>({state:e,dispatch:t})=>wd(e,t),dL=()=>({commands:e})=>e.keyboardShortcut("Enter"),fL=()=>({state:e,dispatch:t})=>mg(e,t);function sb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function $d(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:sb(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function G_(e,t,n={}){return e.find(r=>r.type===t&&$d(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function z_(e,t,n={}){return!!G_(e,t,n)}function ab(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!G_([...o.node.marks],t,n)))return;let s=o.index,a=e.start()+o.offset,l=s+1,u=a+o.node.nodeSize;for(;s>0&&z_([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l({tr:n,state:r,dispatch:o})=>{let i=Kr(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(o){let d=ab(l,i,t);if(d&&d.from<=u&&d.to>=c){let f=q.create(s,d.from,d.to);n.setSelection(f)}}return!0},hL=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};let s=()=>{(jd()||Y_())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!Wd(n.state.selection))return s(),!0;let a=J_(o.doc,e)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},gL=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),bL=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),Z_=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&Z_(r)}return e};function Bd(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return Z_(n)}function Gl(e,t,n){if(e instanceof Yt||e instanceof N)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return N.fromArray(e.map(a=>t.nodeFromJSON(a)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return Gl("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="",l=new Oo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?wn.fromSchema(l).parseSlice(Bd(e),n.parseOptions):wn.fromSchema(l).parse(Bd(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let i=wn.fromSchema(t);return n.slice?i.parseSlice(Bd(e),n.parseOptions).content:i.parse(Bd(e),n.parseOptions)}return Gl("",t,n)}function yL(e,t,n){let r=e.steps.length-1;if(r{s===0&&(s=c)}),e.setSelection(G.near(e.doc.resolve(s),n))}var vL=e=>!("type"in e),xL=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a,l=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Gl(t,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){l(b)}try{a=Gl(t,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return l(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((vL(a)?a:[a]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof N){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else{m=a;let b=r.doc.resolve(c),g=b.node(),y=b.parentOffset===0,v=g.isText||g.isTextblock,x=g.content.size>0;y&&v&&x&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&yL(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},kL=()=>({state:e,dispatch:t})=>b2(e,t),wL=()=>({state:e,dispatch:t})=>y2(e,t),EL=()=>({state:e,dispatch:t})=>ag(e,t),_L=()=>({state:e,dispatch:t})=>cg(e,t),SL=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Mi(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},CL=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Mi(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},TL=()=>({state:e,dispatch:t})=>p2(e,t),NL=()=>({state:e,dispatch:t})=>h2(e,t);function X_(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function AL(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:o})=>{let i=AL(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function ar(e,t,n={}){let{from:r,to:o,empty:i}=e.selection,s=t?$e(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);a.push({node:d,from:p,to:h})});let l=o-r,u=a.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>$d(d.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var RL=(e,t={})=>({state:n,dispatch:r})=>{let o=$e(e,n.schema);return ar(n,o,t)?v2(n,r):!1},DL=()=>({state:e,dispatch:t})=>bg(e,t),OL=e=>({state:t,dispatch:n})=>{let r=$e(e,t.schema);return S2(r)(t,n)},IL=()=>({state:e,dispatch:t})=>pg(e,t);function Kd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function U_(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var LL=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,a=Kd(typeof e=="string"?e:e.name,r.schema);if(!a)return!1;a==="node"&&(i=$e(e,r.schema)),a==="mark"&&(s=Kr(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{i&&i===c.type&&(l=!0,o&&n.setNodeMarkup(d,void 0,U_(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(l=!0,o&&n.addMark(d,d+c.nodeSize,s.create(U_(f.attrs,t))))})})}),l},PL=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),BL=()=>({tr:e,dispatch:t})=>{if(t){let n=new zt(e.doc);e.setSelection(n)}return!0},FL=()=>({state:e,dispatch:t})=>lg(e,t),zL=()=>({state:e,dispatch:t})=>dg(e,t),UL=()=>({state:e,dispatch:t})=>x2(e,t),HL=()=>({state:e,dispatch:t})=>vg(e,t),$L=()=>({state:e,dispatch:t})=>yg(e,t);function rb(e,t,n={},r={}){return Gl(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var qL=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{let{doc:l}=i;if(r.preserveWhitespace!=="full"){let u=rb(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function Q_(e,t){let n=Kr(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});let a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function lb(e,t){let n=new Io(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function VL(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function eS(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function ub(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Jd(e){return t=>ub(t.$from,e)}function J(e,t,n){return e.config[t]===void 0&&e.parent?J(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?J(e.parent,t,n):null}):e.config[t]}function cb(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=J(t,"addExtensions",n);return r?[t,...cb(r())]:t}).flat(10)}function ua(e,t){let n=Br.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function tS(e){return typeof e=="function"}function he(e,t=void 0,...n){return tS(e)?t?e.bind(t)(...n):e(...n):e}function WL(e={}){return Object.keys(e).length===0&&e.constructor===Object}function aa(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function nS(e){let t=[],{nodeExtensions:n,markExtensions:r}=aa(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{let a={name:s.name,options:s.options,storage:s.storage,extensions:o},l=J(s,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(s=>{let a={name:s.name,options:s.options,storage:s.storage},l=J(s,"addAttributes",a);if(!l)return;let u=l();Object.entries(u).forEach(([c,d])=>{let f={...i,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:s.name,name:c,attribute:f})})}),t}function ne(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let a=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],u=a.filter(c=>!l.includes(c));r[o]=[...l,...u].join(" ")}else if(o==="style"){let a=i?i.split(";").map(c=>c.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),a.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function la(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>ne(n,r),{})}function jL(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function H_(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((i,s)=>{let a=s.attribute.parseHTML?s.attribute.parseHTML(n):jL(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function $_(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&WL(n)?!1:n!=null))}function q_(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function KL(e,t){var n;let r=nS(e),{nodeExtensions:o,markExtensions:i}=aa(e),s=(n=o.find(u=>J(u,"topNode")))==null?void 0:n.name,a=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,y)=>{let v=J(y,"extendNodeSchema",d);return{...g,...v?v(u):{}}},{}),p=$_({...f,content:he(J(u,"content",d)),marks:he(J(u,"marks",d)),group:he(J(u,"group",d)),inline:he(J(u,"inline",d)),atom:he(J(u,"atom",d)),selectable:he(J(u,"selectable",d)),draggable:he(J(u,"draggable",d)),code:he(J(u,"code",d)),whitespace:he(J(u,"whitespace",d)),linebreakReplacement:he(J(u,"linebreakReplacement",d)),defining:he(J(u,"defining",d)),isolating:he(J(u,"isolating",d)),attrs:Object.fromEntries(c.map(q_))}),h=he(J(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>H_(g,c)));let m=J(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:la(g,c)}));let b=J(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),l=Object.fromEntries(i.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let y=J(g,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=$_({...f,inclusive:he(J(u,"inclusive",d)),excludes:he(J(u,"excludes",d)),group:he(J(u,"group",d)),spanning:he(J(u,"spanning",d)),code:he(J(u,"code",d)),attrs:Object.fromEntries(c.map(q_))}),h=he(J(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>H_(b,c)));let m=J(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:la(b,c)})),[u.name,p]}));return new Oo({topNode:s,nodes:a,marks:l})}function GL(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function db(e){return e.sort((n,r)=>{let o=J(n,"priority")||100,i=J(r,"priority")||100;return o>i?-1:or.name)).length,t}function oS(e,t,n){let{from:r,to:o}=t,{blockSeparator:i=` +`);return{dom:l,text:f,slice:t}}function B2(e,t,n,r,o){let a=o.parent.type.spec.code,i,s;if(!n&&!t)return null;let l=!!t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,a||r,e)}),a)return s=new B(_.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp("transformPasted",f=>{s=f(s,e,!0)}),s;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)s=d;else{let f=o.marks(),{schema:p}=e.state,h=Fr.fromSchema(p);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=i.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),i=SP(n),Jl&&EP(i);let u=i&&i.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||wn.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!vP.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)s=LP(l2(s,+c[1],+c[2]),c[4]);else if(s=B.maxOpen(CP(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let p=s.content.firstChild;d{s=d(s,e,l)}),s}var vP=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function CP(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),a,i=[];if(e.forEach(s=>{if(!i)return;let l=o.findWrapping(s.type),u;if(!l)return i=null;if(u=i.length&&a.length&&z2(l,a,s,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=U2(i[i.length-1],a.length));let c=F2(s,l);i.push(c),o=o.matchType(c.type),a=l}}),i)return _.from(i)}return e}function F2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,_.from(e));return e}function z2(e,t,n,r,o){if(o1&&(a=0),o=n&&(s=t<0?i.contentMatchAt(0).fillBefore(s,a<=o).append(s):s.append(i.contentMatchAt(i.childCount).fillBefore(_.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(s))}function l2(e,t,n){return tn})),Bg.createHTML(e)):e}function SP(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=q2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&H2[r[1].toLowerCase()])&&(e=o.map(a=>"<"+a+">").join("")+e+o.map(a=>"").reverse().join("")),n.innerHTML=wP(e),o)for(let a=0;a=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=_.from(l.create(r[s+1],o)),a++,i++}return new B(o,a,i)}var Ht={},qt={},IP={touchstart:!0,touchmove:!0},Yg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function _P(e){for(let t in Ht){let n=Ht[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{TP(e,r)&&!lb(e,r)&&(e.editable||!(r.type in qt))&&n(e,r)},IP[t]?{passive:!0}:void 0)}Mt&&e.dom.addEventListener("input",()=>null),Qg(e)}function zo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function AP(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Qg(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>lb(e,r))})}function lb(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function TP(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function MP(e,t){!lb(e,t)&&Ht[t.type]&&(e.editable||!(t.type in qt))&&Ht[t.type](e,t)}qt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!V2(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Vr&&it&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),ss&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Oa(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||kP(e,n)?n.preventDefault():zo(e,"key")};qt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};qt.keypress=(e,t)=>{let n=t;if(V2(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||En&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof $)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),a=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o,a))&&e.dispatch(a()),n.preventDefault()}};function Vd(e){return{left:e.clientX,top:e.clientY}}function NP(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function ub(e,t,n,r,o){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let i=a.depth+1;i>0;i--)if(e.someProp(t,s=>i>a.depth?s(e,n,a.nodeAfter,a.before(i),o,!0):s(e,n,a.node(i),a.before(i),o,!1)))return!0;return!1}function as(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function DP(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&q.isSelectable(r)?(as(e,new q(n),"pointer"),!0):!1}function RP(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof q&&(r=n.node);let a=e.state.doc.resolve(t);for(let i=a.depth+1;i>0;i--){let s=i>a.depth?a.nodeAfter:a.node(i);if(q.isSelectable(s)){r&&n.$from.depth>0&&i>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?o=a.before(n.$from.depth):o=a.before(i);break}}return o!=null?(as(e,q.create(e.state.doc,o),"pointer"),!0):!1}function OP(e,t,n,r,o){return ub(e,"handleClickOn",t,n,r)||e.someProp("handleClick",a=>a(e,t,r))||(o?RP(e,n):DP(e,n))}function PP(e,t,n,r){return ub(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function BP(e,t,n,r){return ub(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||FP(e,n,r)}function FP(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(as(e,$.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let a=o.depth+1;a>0;a--){let i=a>o.depth?o.nodeAfter:o.node(a),s=o.before(a);if(i.inlineContent)as(e,$.create(r,s+1,s+1+i.content.size),"pointer");else if(q.isSelectable(i))as(e,q.create(r,s),"pointer");else continue;return!0}}function cb(e){return Fd(e)}var $2=En?"metaKey":"ctrlKey";Ht.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=cb(e),o=Date.now(),a="singleClick";o-e.input.lastClick.time<500&&NP(n,e.input.lastClick)&&!n[$2]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?a="doubleClick":e.input.lastClick.type=="doubleClick"&&(a="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:a,button:n.button};let i=e.posAtCoords(Vd(n));i&&(a=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eb(e,i,n,!!r)):(a=="doubleClick"?PP:BP)(e,i.pos,i.inside,n)?n.preventDefault():zo(e,"pointer"))};var eb=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[$2],this.allowDefault=r.shiftKey;let a,i;if(n.inside>-1)a=t.state.doc.nodeAt(n.inside),i=n.inside;else{let c=t.state.doc.resolve(n.pos);a=c.parent,i=c.depth?c.before():0}let s=o?null:r.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||u instanceof q&&u.from<=i&&u.to>i)&&(this.mightDrag={node:a,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&In&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),zo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Wr(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Vd(t))),this.updateAllowDefault(t),this.allowDefault||!n?zo(this.view,"pointer"):OP(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Mt&&this.mightDrag&&!this.mightDrag.node.isAtom||it&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(as(this.view,j.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):zo(this.view,"pointer")}move(t){this.updateAllowDefault(t),zo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Ht.touchstart=e=>{e.input.lastTouch=Date.now(),cb(e),zo(e,"pointer")};Ht.touchmove=e=>{e.input.lastTouch=Date.now(),zo(e,"pointer")};Ht.contextmenu=e=>cb(e);function V2(e,t){return e.composing?!0:Mt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var zP=Vr?5e3:-1;qt.compositionstart=qt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof $&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||it&&w2&&UP(e)))e.markCursor=e.state.storedMarks||n.marks(),Fd(e,!0),e.markCursor=null;else if(Fd(e,!t.selection.empty),In&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,a=r.focusOffset;o&&o.nodeType==1&&a!=0;){let i=a<0?o.lastChild:o.childNodes[a-1];if(!i)break;if(i.nodeType==3){let s=e.domSelection();s&&s.collapse(i,i.nodeValue.length);break}else o=i,a=-1}}e.input.composing=!0}W2(e,zP)};function UP(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}qt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,W2(e,20))};function W2(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Fd(e),t))}function K2(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=qP());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function HP(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=FO(t.focusNode,t.focusOffset),r=zO(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,a=e.domObserver.lastChangedTextNode;if(n==a||r==a)return a;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let i=n.pmViewDesc;if(!(!i||!i.isText(n.nodeValue)))return r}}return n||r}function qP(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Fd(e,t=!1){if(!(Vr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),K2(e),t||e.docView&&e.docView.dirty){let n=ab(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function $P(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var Wl=Yt&&Uo<15||ss&&$O<604;Ht.copy=qt.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let a=Wl?null:n.clipboardData,i=r.content(),{dom:s,text:l}=sb(e,i);a?(n.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):$P(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function VP(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function WP(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Kl(e,r.value,null,o,t):Kl(e,r.textContent,r.innerHTML,o,t)},50)}function Kl(e,t,n,r,o){let a=B2(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,a||B.empty)))return!0;if(!a)return!1;let i=VP(a),s=i?e.state.tr.replaceSelectionWith(i,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function G2(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}qt.paste=(e,t)=>{let n=t;if(e.composing&&!Vr)return;let r=Wl?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Kl(e,G2(r),r.getData("text/html"),o,n)?n.preventDefault():WP(e,n)};var zd=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},KP=En?"altKey":"ctrlKey";function j2(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[KP]}Ht.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,a=o.empty?null:e.posAtCoords(Vd(n)),i;if(!(a&&a.pos>=o.from&&a.pos<=(o instanceof q?o.to-1:o.to))){if(r&&r.mightDrag)i=q.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(i=q.create(e.state.doc,d.posBefore))}}let s=(i||e.state.selection).content(),{dom:l,text:u,slice:c}=sb(e,s);(!n.dataTransfer.files.length||!it||C2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Wl?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Wl||n.dataTransfer.setData("text/plain",u),e.dragging=new zd(c,j2(e,n),i)};Ht.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};qt.dragover=qt.dragenter=(e,t)=>t.preventDefault();qt.drop=(e,t)=>{try{GP(e,t,e.dragging)}finally{e.dragging=null}};function GP(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Vd(t));if(!r)return;let o=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp("transformPasted",p=>{a=p(a,e,!1)}):a=B2(e,G2(t.dataTransfer),Wl?null:t.dataTransfer.getData("text/html"),!1,o);let i=!!(n&&j2(e,t));if(e.someProp("handleDrop",p=>p(e,t,a||B.empty,i))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?_d(e.state.doc,o.pos,a):o.pos;s==null&&(s=o.pos);let l=e.state.tr;if(i){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let u=l.mapping.map(s),c=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,a.content.firstChild):l.replaceRange(u,u,a),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&q.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))l.setSelection(new q(f));else{let p=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),l.setSelection(ib(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Ht.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Wr(e)},20))};Ht.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Ht.beforeinput=(e,t)=>{if(it&&Vr&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",a=>a(e,Oa(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in qt)Ht[e]=qt[e];function Gl(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var Ud=class e{constructor(t,n){this.toDOM=t,this.spec=n||za,this.side=this.spec.side||0}map(t,n,r,o){let{pos:a,deleted:i}=t.mapResult(n.from+o,this.side<0?-1:1);return i?null:new Re(a-r,a-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Gl(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},Fa=class e{constructor(t,n){this.attrs=t,this.spec=n||za}map(t,n,r,o){let a=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,i=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return a>=i?null:new Re(a,i,this)}valid(t,n){return n.from=t&&(!a||a(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let i=0;it){let s=this.children[i]+1;this.children[i+2].findInner(t-s,n-s,r,o+s,a)}}map(t,n,r){return this==Tt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||za)}mapInner(t,n,r,o,a){let i;for(let s=0;s{let u=l+r,c;if(c=J2(n,s,u)){for(o||(o=this.children.slice());as&&d.to=t){this.children[s]==t&&(r=this.children[s+2]);break}let a=t+1,i=a+n.content.size;for(let s=0;sa&&l.type instanceof Fa){let u=Math.max(a,l.from)-a,c=Math.min(i,l.to)-a;uo.map(t,n,za));return e.from(r)}forChild(t,n){if(n.isLeaf)return Ce.empty;let r=[];for(let o=0;on instanceof Ce)?t:t.reduce((n,r)=>n.concat(r instanceof Ce?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-h-(p-f);for(let g=0;gx+c-d)continue;let y=s[g]+c-d;p>=y?s[g+1]=f<=y?-2:-1:f>=c&&b&&(s[g]+=b,s[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u=r.content.size){l=!0;continue}let f=n.map(e[u+1]+a,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=s[u+2].mapInner(n,b,c+1,e[u]+a+1,i);g!=Tt?(s[u]=d,s[u+1]=p,s[u+2]=g):(s[u+1]=-2,l=!0)}else l=!0}if(l){let u=XP(s,e,t,n,o,a,i),c=qd(u,r,0,i);t=c.local;for(let d=0;dn&&i.to{let u=J2(e,s,l+n);if(u){a=!0;let c=qd(u,s,n+l+1,r);c!=Tt&&o.push(l,l+s.nodeSize,c)}});let i=X2(a?Z2(e):e,-n).sort(Ua);for(let s=0;s0;)t++;e.splice(t,0,n)}function Fg(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Tt&&t.push(r)}),e.cursorWrapper&&t.push(Ce.create(e.state.doc,[e.cursorWrapper.deco])),Hd.from(t)}var JP={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ZP=Yt&&Uo<=11,nb=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},rb=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new nb,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),ZP&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,JP)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(n2(this.view)){if(this.suppressingSelectionUpdates)return Wr(this.view);if(Yt&&Uo<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Ha(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let a=t.focusNode;a;a=is(a))n.add(a);for(let a=t.anchorNode;a;a=is(a))if(n.has(a)){r=a;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&n2(t)&&!this.ignoreSelectionChange(r),a=-1,i=-1,s=!1,l=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||e6(t,d)!=p)&&f.remove()}}}else if((it||Mt)&&l.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;a<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(a>-1&&(t.docView.markDirty(a,i),YP(t)),this.handleDOMChange(a,i,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Wr(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let g=r.childNodes[b-1],x=g.pmViewDesc;if(g.nodeName=="BR"&&!x){a=b;break}if(!x||x.size)break}let d=e.state.doc,f=e.someProp("domParser")||wn.fromSchema(e.state.schema),p=d.resolve(i),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:a,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:n6,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+i,head:g+i}}return{doc:m,sel:h,from:i,to:s}}function n6(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Mt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Mt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var r6=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function o6(e,t,n,r,o){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let w=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,S=ab(e,w);if(S&&!e.state.selection.eq(S)){if(it&&Vr&&e.input.lastKeyCode===13&&Date.now()-100L(e,Oa(13,"Enter"))))return;let I=e.state.tr.setSelection(S);w=="pointer"?I.setMeta("pointer",!0):w=="key"&&I.scrollIntoView(),a&&I.setMeta("composition",a),e.dispatch(I)}return}let i=e.state.doc.resolve(t),s=i.sharedDepth(n);t=i.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l=e.state.selection,u=t6(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Vr)&&o.some(w=>w.nodeType==1&&!r6.test(w.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",w=>w(e,Oa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&l instanceof $&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let w=h2(e,e.state.doc,u.sel);if(w&&!w.eq(e.state.selection)){let S=e.state.tr.setSelection(w);a&&S.setMeta("composition",a),e.dispatch(S)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Yt&&Uo<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),x=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if((ss&&e.input.lastIOSEnter>Date.now()-225&&(!x||o.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!x&&m.posw(e,Oa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&i6(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",w=>w(e,Oa(8,"Backspace")))){Vr&&it&&e.domObserver.suppressSelectionUpdates();return}it&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),Vr&&!x&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(w){return w(e,Oa(13,"Enter"))})},20));let y=h.start,k=h.endA,v=w=>{let S=w||e.state.tr.replace(y,k,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let I=h2(e,S.doc,u.sel);I&&!(it&&e.composing&&I.empty&&(h.start!=h.endB||e.input.lastChromeDeleteWr(e),20));let w=v(e.state.tr.delete(y,k)),S=c.resolve(h.start).marksAcross(c.resolve(h.endA));S&&w.ensureMarks(S),e.dispatch(w)}else if(h.endA==h.endB&&(C=a6(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let w=v(e.state.tr);C.type=="add"?w.addMark(y,k,C.mark):w.removeMark(y,k,C.mark),e.dispatch(w)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let w=m.parent.textBetween(m.parentOffset,b.parentOffset),S=()=>v(e.state.tr.insertText(w,y,k));e.someProp("handleTextInput",I=>I(e,y,k,w,S))||e.dispatch(S())}else e.dispatch(v());else e.dispatch(v())}function h2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ib(e,t.resolve(n.anchor),t.resolve(n.head))}function a6(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,a=r,i,s,l;for(let c=0;cc.mark(s.addToSet(c.marks));else if(o.length==0&&a.length==1)s=a[0],i="remove",l=c=>c.mark(s.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||zg(i,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let a=e.node(r).maybeChild(e.indexAfter(r));for(;a&&!a.isLeaf;)a=a.firstChild,o++}return o}function s6(e,t,n,r,o){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:i,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,a-Math.min(i,s));r-=i+l-a}if(i=i?a-r:0;a-=l,a&&a=s?a-r:0;a-=l,a&&a=56320&&t<=57343&&n>=55296&&n<=56319}var jl=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Yg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(k2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=x2(this),b2(this),this.nodeViews=y2(this),this.docView=JS(this.state.doc,g2(this),Fg(this),this.dom,this),this.domObserver=new rb(this,(r,o,a,i)=>o6(this,r,o,a,i)),this.domObserver.start(),_P(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Qg(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(k2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,a=!1,i=!1;t.storedMarks&&this.composing&&(K2(this),i=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=y2(this);u6(p,this.nodeViews)&&(this.nodeViews=p,a=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&Qg(this),this.editable=x2(this),b2(this);let l=Fg(this),u=g2(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=a||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(o.selection))&&(i=!0);let f=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&KO(this);if(i){this.domObserver.stop();let p=d&&(Yt||it)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&l6(o.selection,t.selection);if(d){let h=it?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=HP(this)),(a||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=JS(t.doc,u,l,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&pP(this))?Wr(this,p):(R2(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&GO(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof q){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&VS(this,n.getBoundingClientRect(),t)}else VS(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(a))==r.node&&(o=a)}this.dragging=new zd(t.slice,t.move,o<0?void 0:q.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let i=0;in.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return QO(this,t)}coordsAtPos(t,n=1){return _2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return oP(this,n||this.state,t)}pasteHTML(t,n){return Kl(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Kl(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return sb(this,t)}destroy(){this.docView&&(AP(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Fg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,PO())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return MP(this,t)}domSelectionRange(){let t=this.domSelection();return t?Mt&&this.root.nodeType===11&&HO(this.dom.ownerDocument)==this.dom&&QP(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};jl.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function g2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Re.node(0,e.state.doc.content.size,t)]}function b2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Re.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function x2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function l6(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function y2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function u6(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function k2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Kr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Kd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c6=typeof navigator<"u"&&/Mac/.test(navigator.platform),d6=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Qe=0;Qe<10;Qe++)Kr[48+Qe]=Kr[96+Qe]=String(Qe);var Qe;for(Qe=1;Qe<=24;Qe++)Kr[Qe+111]="F"+Qe;var Qe;for(Qe=65;Qe<=90;Qe++)Kr[Qe]=String.fromCharCode(Qe+32),Kd[Qe]=String.fromCharCode(Qe);var Qe;for(Wd in Kr)Kd.hasOwnProperty(Wd)||(Kd[Wd]=Kr[Wd]);var Wd;function Y2(e){var t=c6&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||d6&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Kd:Kr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var f6=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),p6=typeof navigator<"u"&&/Win/.test(navigator.platform);function h6(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,a,i;for(let s=0;s{for(var n in t)g6(e,n,{get:t[n],enumerable:!0})};function Qd(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,a=n.storedMarks,n}}}var ef=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,a=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([i,s])=>[i,(...u)=>{let c=s(...u)(a);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i=[],s=!!e,l=e||o.tr,u=()=>(!s&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(l),i.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(l,t),b=f(...h)(m);return i.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,a=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...u)=>l(...u)({...a,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i={tr:e,editor:r,view:a,state:Qd({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([s,l])=>[s,(...u)=>l(...u)(i)]))}};return i}},lE={};xb(lE,{blur:()=>b6,clearContent:()=>x6,clearNodes:()=>y6,command:()=>k6,createParagraphNear:()=>v6,cut:()=>C6,deleteCurrentNode:()=>w6,deleteNode:()=>S6,deleteRange:()=>E6,deleteSelection:()=>L6,enter:()=>I6,exitCode:()=>_6,extendMarkRange:()=>A6,first:()=>T6,focus:()=>M6,forEach:()=>N6,insertContent:()=>D6,insertContentAt:()=>P6,joinBackward:()=>z6,joinDown:()=>F6,joinForward:()=>U6,joinItemBackward:()=>H6,joinItemForward:()=>q6,joinTextblockBackward:()=>$6,joinTextblockForward:()=>V6,joinUp:()=>B6,keyboardShortcut:()=>K6,lift:()=>G6,liftEmptyBlock:()=>j6,liftListItem:()=>X6,newlineInCode:()=>J6,resetAttributes:()=>Z6,scrollIntoView:()=>Y6,selectAll:()=>Q6,selectNodeBackward:()=>e4,selectNodeForward:()=>t4,selectParentNode:()=>n4,selectTextblockEnd:()=>r4,selectTextblockStart:()=>o4,setContent:()=>a4,setMark:()=>y4,setMeta:()=>k4,setNode:()=>v4,setNodeSelection:()=>C4,setTextDirection:()=>w4,setTextSelection:()=>S4,sinkListItem:()=>E4,splitBlock:()=>L4,splitListItem:()=>I4,toggleList:()=>_4,toggleMark:()=>A4,toggleNode:()=>T4,toggleWrap:()=>M4,undoInputRule:()=>N4,unsetAllMarks:()=>D4,unsetMark:()=>R4,unsetTextDirection:()=>O4,updateAttributes:()=>P4,wrapIn:()=>B4,wrapInList:()=>F4});var b6=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),x6=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),y6=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:a,$to:i})=>{e.doc.nodesBetween(a.pos,i.pos,(s,l)=>{if(s.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+s.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Hr(p);if(s.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},k6=e=>t=>e(t),v6=()=>({state:e,dispatch:t})=>Ag(e,t),C6=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,a=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let i=r.mapping.map(t);return r.insert(i,a.content),r.setSelection(new $(r.doc.resolve(Math.max(i-1,0)))),!0},w6=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===r.type){if(t){let s=o.before(a),l=o.after(a);e.delete(s,l).scrollIntoView()}return!0}return!1};function qe(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var S6=e=>({tr:t,state:n,dispatch:r})=>{let o=qe(e,n.schema),a=t.selection.$anchor;for(let i=a.depth;i>0;i-=1)if(a.node(i).type===o){if(r){let l=a.before(i),u=a.after(i);t.delete(l,u).scrollIntoView()}return!0}return!1},E6=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},L6=()=>({state:e,dispatch:t})=>Nd(e,t),I6=()=>({commands:e})=>e.keyboardShortcut("Enter"),_6=()=>({state:e,dispatch:t})=>_g(e,t);function yb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Yd(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:yb(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function uE(e,t,n={}){return e.find(r=>r.type===t&&Yd(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function eE(e,t,n={}){return!!uE(e,t,n)}function kb(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!uE([...o.node.marks],t,n)))return;let i=o.index,s=e.start()+o.offset,l=i+1,u=s+o.node.nodeSize;for(;i>0&&eE([...e.parent.child(i-1).marks],t,n);)i-=1,s-=e.parent.child(i).nodeSize;for(;l({tr:n,state:r,dispatch:o})=>{let a=jr(e,r.schema),{doc:i,selection:s}=n,{$from:l,from:u,to:c}=s;if(o){let d=kb(l,a,t);if(d&&d.from<=u&&d.to>=c){let f=$.create(i,d.from,d.to);n.setSelection(f)}}return!0},T6=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:a})=>{t={scrollIntoView:!0,...t};let i=()=>{(nf()||dE())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(a&&e===null&&!tf(n.state.selection))return i(),!0;let s=cE(o.doc,e)||n.state.selection,l=n.state.selection.eq(s);return a&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},N6=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),D6=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),fE=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&fE(r)}return e};function Gd(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return fE(n)}function Yl(e,t,n){if(e instanceof Zt||e instanceof _)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return _.fromArray(e.map(s=>t.nodeFromJSON(s)));let i=t.nodeFromJSON(e);return n.errorOnInvalidContent&&i.check(),i}catch(a){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return Yl("",t,n)}if(o){if(n.errorOnInvalidContent){let i=!1,s="",l=new Ro({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(i=!0,s=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?wn.fromSchema(l).parseSlice(Gd(e),n.parseOptions):wn.fromSchema(l).parse(Gd(e),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}let a=wn.fromSchema(t);return n.slice?a.parseSlice(Gd(e),n.parseOptions).content:a.parse(Gd(e),n.parseOptions)}return Yl("",t,n)}function R6(e,t,n){let r=e.steps.length-1;if(r{i===0&&(i=c)}),e.setSelection(j.near(e.doc.resolve(i),n))}var O6=e=>!("type"in e),P6=(e,t,n)=>({tr:r,dispatch:o,editor:a})=>{var i;if(o){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s,l=b=>{a.emit("contentError",{editor:a,error:b,disableCollaboration:()=>{"collaboration"in a.storage&&typeof a.storage.collaboration=="object"&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{Yl(t,a.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){l(b)}try{s=Yl(t,a.schema,{parseOptions:u,errorOnInvalidContent:(i=n.errorOnInvalidContent)!=null?i:a.options.enableContentCheck})}catch(b){return l(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((O6(s)?s:[s]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof _){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else{m=s;let b=r.doc.resolve(c),g=b.node(),x=b.parentOffset===0,y=g.isText||g.isTextblock,k=g.content.size>0;x&&y&&k&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&R6(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},B6=()=>({state:e,dispatch:t})=>NS(e,t),F6=()=>({state:e,dispatch:t})=>DS(e,t),z6=()=>({state:e,dispatch:t})=>kg(e,t),U6=()=>({state:e,dispatch:t})=>wg(e,t),H6=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Da(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},q6=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Da(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},$6=()=>({state:e,dispatch:t})=>_S(e,t),V6=()=>({state:e,dispatch:t})=>AS(e,t);function pE(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function W6(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,a,i;for(let s=0;s({editor:t,view:n,tr:r,dispatch:o})=>{let a=W6(e).split(/-(?!$)/),i=a.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),s=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,s))});return l?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function lr(e,t,n={}){let{from:r,to:o,empty:a}=e.selection,i=t?qe(t,e.schema):null,s=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);s.push({node:d,from:p,to:h})});let l=o-r,u=s.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>Yd(d.node.attrs,n,{strict:!1}));return a?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var G6=(e,t={})=>({state:n,dispatch:r})=>{let o=qe(e,n.schema);return lr(n,o,t)?RS(n,r):!1},j6=()=>({state:e,dispatch:t})=>Tg(e,t),X6=e=>({state:t,dispatch:n})=>{let r=qe(e,t.schema);return US(r)(t,n)},J6=()=>({state:e,dispatch:t})=>Lg(e,t);function rf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function tE(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var Z6=(e,t)=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null,s=rf(typeof e=="string"?e:e.name,r.schema);if(!s)return!1;s==="node"&&(a=qe(e,r.schema)),s==="mark"&&(i=jr(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{a&&a===c.type&&(l=!0,o&&n.setNodeMarkup(d,void 0,tE(c.attrs,t))),i&&c.marks.length&&c.marks.forEach(f=>{i===f.type&&(l=!0,o&&n.addMark(d,d+c.nodeSize,i.create(tE(f.attrs,t))))})})}),l},Y6=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Q6=()=>({tr:e,dispatch:t})=>{if(t){let n=new Ut(e.doc);e.setSelection(n)}return!0},e4=()=>({state:e,dispatch:t})=>vg(e,t),t4=()=>({state:e,dispatch:t})=>Sg(e,t),n4=()=>({state:e,dispatch:t})=>OS(e,t),r4=()=>({state:e,dispatch:t})=>Ng(e,t),o4=()=>({state:e,dispatch:t})=>Mg(e,t);function gb(e,t,n={},r={}){return Yl(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var a4=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:a,dispatch:i,commands:s})=>{let{doc:l}=a;if(r.preserveWhitespace!=="full"){let u=gb(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return i&&a.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return i&&a.setMeta("preventUpdate",!n),s.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function hE(e,t){let n=jr(t,e.schema),{from:r,to:o,empty:a}=e.selection,i=[];a?(e.storedMarks&&i.push(...e.storedMarks),i.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{i.push(...l.marks)});let s=i.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function vb(e,t){let n=new Oo(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function i4(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function mE(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,a)=>{n(o)&&r.push({node:o,pos:a})}),r}function Cb(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function af(e){return t=>Cb(t.$from,e)}function X(e,t,n){return e.config[t]===void 0&&e.parent?X(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?X(e.parent,t,n):null}):e.config[t]}function wb(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=X(t,"addExtensions",n);return r?[t,...wb(r())]:t}).flat(10)}function fs(e,t){let n=Fr.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function gE(e){return typeof e=="function"}function he(e,t=void 0,...n){return gE(e)?t?e.bind(t)(...n):e(...n):e}function s4(e={}){return Object.keys(e).length===0&&e.constructor===Object}function cs(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function bE(e){let t=[],{nodeExtensions:n,markExtensions:r}=cs(e),o=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(i=>{let s={name:i.name,options:i.options,storage:i.storage,extensions:o},l=X(i,"addGlobalAttributes",s);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...a,...p}})})})})}),o.forEach(i=>{let s={name:i.name,options:i.options,storage:i.storage},l=X(i,"addAttributes",s);if(!l)return;let u=l();Object.entries(u).forEach(([c,d])=>{let f={...a,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:i.name,name:c,attribute:f})})}),t}function re(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,a])=>{if(!r[o]){r[o]=a;return}if(o==="class"){let s=a?String(a).split(" "):[],l=r[o]?r[o].split(" "):[],u=s.filter(c=>!l.includes(c));r[o]=[...l,...u].join(" ")}else if(o==="style"){let s=a?a.split(";").map(c=>c.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),s.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=a}),r},{})}function ds(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>re(n,r),{})}function l4(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function nE(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((a,i)=>{let s=i.attribute.parseHTML?i.attribute.parseHTML(n):l4(n.getAttribute(i.name));return s==null?a:{...a,[i.name]:s}},{});return{...r,...o}}}}function rE(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&s4(n)?!1:n!=null))}function oE(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function u4(e,t){var n;let r=bE(e),{nodeExtensions:o,markExtensions:a}=cs(e),i=(n=o.find(u=>X(u,"topNode")))==null?void 0:n.name,s=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,x)=>{let y=X(x,"extendNodeSchema",d);return{...g,...y?y(u):{}}},{}),p=rE({...f,content:he(X(u,"content",d)),marks:he(X(u,"marks",d)),group:he(X(u,"group",d)),inline:he(X(u,"inline",d)),atom:he(X(u,"atom",d)),selectable:he(X(u,"selectable",d)),draggable:he(X(u,"draggable",d)),code:he(X(u,"code",d)),whitespace:he(X(u,"whitespace",d)),linebreakReplacement:he(X(u,"linebreakReplacement",d)),defining:he(X(u,"defining",d)),isolating:he(X(u,"isolating",d)),attrs:Object.fromEntries(c.map(oE))}),h=he(X(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>nE(g,c)));let m=X(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:ds(g,c)}));let b=X(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),l=Object.fromEntries(a.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let x=X(g,"extendMarkSchema",d);return{...b,...x?x(u):{}}},{}),p=rE({...f,inclusive:he(X(u,"inclusive",d)),excludes:he(X(u,"excludes",d)),group:he(X(u,"group",d)),spanning:he(X(u,"spanning",d)),code:he(X(u,"code",d)),attrs:Object.fromEntries(c.map(oE))}),h=he(X(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>nE(b,c)));let m=X(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:ds(b,c)})),[u.name,p]}));return new Ro({topNode:i,nodes:s,marks:l})}function c4(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Sb(e){return e.sort((n,r)=>{let o=X(n,"priority")||100,a=X(r,"priority")||100;return o>a?-1:or.name)).length,t}function yE(e,t,n){let{from:r,to:o}=t,{blockSeparator:a=` -`,textSerializers:s={}}=n||{},a="";return e.nodesBetween(r,o,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(a+=i);let p=s?.[l.type.name];if(p)return c&&(a+=p({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(a+=(f=l?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),a}function fb(e,t){let n={from:0,to:e.content.size};return oS(e,n,t)}function Yd(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function JL(e,t){let n=$e(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,a=>{i.push(a)});let s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function pb(e,t){let n=Kd(typeof t=="string"?t:t.name,e.schema);return n==="node"?JL(e,t):n==="mark"?Q_(e,t):{}}function YL(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function ZL(e){let t=YL(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function hb(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((a,l)=>{s.push({from:a,to:l})});else{let{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{let u=t.slice(i).map(a,-1),c=t.slice(i).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),ZL(r)}function Zd(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let i=n.resolve(e),s=ab(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var iS=(e,t,n,r=20)=>{let o=e.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let a=o.node(i);a?.type.name===t?s=a:i-=1}return[s,i]};function eb(e,t){return t.nodes[e]||t.marks[e]||null}function Hd(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var XL=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,a)=>{var l,u;let c=((u=(l=o.type.spec).toText)==null?void 0:u.call(l,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-i))}),n};function ob(e,t,n={}){let{empty:r,ranges:o}=e.selection,i=t?Kr(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>$d(d.attrs,n,{strict:!1}));let s=0,a=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),y=Math.min(h,b+m.nodeSize),v=y-g;s+=v,a.push(...m.marks.map(x=>({mark:x,from:g,to:y})))})}),s===0)return!1;let l=a.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>$d(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=a.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=s}function QL(e,t,n={}){if(!t)return ar(e,null,n)||ob(e,null,n);let r=Kd(t,e.schema);return r==="node"?ar(e,t,n):r==="mark"?ob(e,t,n):!1}var sS=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let i=Jd(a=>a.type.name===t)(e.selection);if(!i)return!1;let s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function V_(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function W_(e,t){let{nodeExtensions:n}=aa(t),r=n.find(s=>s.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=he(J(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Jl(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(Jl(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function Xd(e){return e instanceof $}var lS=class uS{constructor(t){this.position=t}static fromJSON(t){return new uS(t.position)}toJSON(){return{position:this.position}}};function e8(e,t){let n=t.mapping.mapResult(e.position);return{position:new lS(n.pos),mapResult:n}}function t8(e){return new lS(e)}function Qd(e,t,n){let o=e.state.doc.content.size,i=jr(t,0,o),s=jr(n,0,o),a=e.coordsAtPos(i),l=e.coordsAtPos(s,-1),u=Math.min(a.top,l.top),c=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function n8(e,t,n){var r;let{selection:o}=t,i=null;if(Wd(o)&&(i=o.$cursor),i){let a=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(u=>u.type.excludes(n)))}let{ranges:s}=o;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var r8=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=n,{empty:s,ranges:a}=i,l=Kr(e,r.schema);if(o)if(s){let u=Q_(r,l);n.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return n8(r,n,l)},o8=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),i8=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let i=$e(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:a})=>xg(i,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>xg(i,{...s,...t})(a,r)).run():!1},s8=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=jr(e,0,r.content.size),i=$.create(r,o);t.setSelection(i)}return!0},a8=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=r,s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=i.from,a=i.to),o&&n.doc.nodesBetween(s,a,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},l8=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=q.atStart(r).from,a=q.atEnd(r).to,l=jr(o,s,a),u=jr(i,s,a),c=q.create(r,l,u);t.setSelection(c)}return!0},u8=e=>({state:t,dispatch:n})=>{let r=$e(e,t.schema);return C2(r)(t,n)};function j_(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var c8=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:i,doc:s}=t,{$from:a,$to:l}=i,u=o.extensionManager.attributes,c=Hd(u,a.node().type.name,a.node().attrs);if(i instanceof $&&i.node.isBlock)return!a.parentOffset||!cn(s,a.pos)?!1:(r&&(e&&j_(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:VL(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=cn(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!h&&cn(t.doc,t.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(i instanceof q&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f)){let m=t.mapping.map(a.before()),b=t.doc.resolve(m);a.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(a.before()),f)}e&&j_(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},d8=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;let a=$e(e,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;let d=l.node(-1);if(d.type!==a)return!1;let f=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let g=N.empty,y=l.index(-1)?1:l.index(-2)?2:3;for(let _=l.depth-y;_>=l.depth-3;_-=1)g=N.from(l.node(_).copy(g));let v=l.indexAfter(-1){if(E>-1)return!1;_.isTextblock&&_.content.size===0&&(E=T+1)}),E>-1&&n.setSelection(q.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}let p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...Hd(f,d.type.name,d.attrs),...t},m={...Hd(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);let b=p?[{type:a,attrs:h},{type:p,attrs:m}]:[{type:a,attrs:h}];if(!cn(n.doc,l.pos,2))return!1;if(o){let{selection:g,storedMarks:y}=r,{splittableMarks:v}=i.extensionManager,x=y||g.$to.parentOffset&&g.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!x||!o)return!0;let k=x.filter(w=>v.includes(w.type.name));n.ensureMarks(k)}return!0},tb=(e,t)=>{let n=Jd(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&En(e.doc,n.pos)&&e.join(n.pos),!0},nb=(e,t)=>{let n=Jd(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&En(e.doc,r)&&e.join(r),!0},f8=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=$e(e,s.schema),h=$e(t,s.schema),{selection:m,storedMarks:b}=s,{$from:g,$to:y}=m,v=g.blockRange(y),x=b||m.$to.parentOffset&&m.$from.marks();if(!v)return!1;let k=Jd(w=>W_(w.type.name,d))(m);if(v.depth>=1&&k&&v.depth-k.depth<=1){if(k.node.type===p)return u.liftListItem(h);if(W_(k.node.type.name,d)&&p.validContent(k.node.content)&&a)return l().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>tb(i,p)).command(()=>nb(i,p)).run()}return!n||!x||!a?l().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>tb(i,p)).command(()=>nb(i,p)).run():l().command(()=>{let w=c().wrapInList(p,r),E=x.filter(_=>f.includes(_.type.name));return i.ensureMarks(E),w?!0:u.clearNodes()}).wrapInList(p,r).command(()=>tb(i,p)).command(()=>nb(i,p)).run()},p8=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:i=!1}=n,s=Kr(e,r.schema);return ob(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},h8=(e,t,n={})=>({state:r,commands:o})=>{let i=$e(e,r.schema),s=$e(t,r.schema),a=ar(r,i,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(s,l):o.setNode(i,{...l,...n})},m8=(e,t={})=>({state:n,commands:r})=>{let o=$e(e,n.schema);return ar(n,o,t)?r.lift(o):r.wrapIn(o,t)},g8=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1},b8=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},y8=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;let{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Kr(e,r.schema),{$from:u,empty:c,ranges:d}=a;if(!o)return!0;if(c&&s){let{from:f,to:p}=a,h=(i=u.marks().find(b=>b.type===l))==null?void 0:i.attrs,m=ab(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},v8=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,i,s;return typeof e=="number"?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,(a,l)=>{if(a.isText)return;let u={...a.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},x8=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,a=Kd(typeof e=="string"?e:e.name,r.schema);if(!a)return!1;a==="node"&&(i=$e(e,r.schema)),a==="mark"&&(s=Kr(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?r.doc.nodesBetween(c,d,(b,g)=>{i&&i===b.type&&(l=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):r.doc.nodesBetween(c,d,(b,g)=>{g=c&&g<=d&&(i&&i===b.type&&(l=!0,o&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(y=>{if(s===y.type&&(l=!0,o)){let v=Math.max(g,c),x=Math.min(g+b.nodeSize,d);n.addMark(v,x,s.create({...y.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&o&&n.addMark(h,m,s.create({...b.attrs,...t}))}))}),l},k8=(e,t={})=>({state:n,dispatch:r})=>{let o=$e(e,n.schema);return E2(o,t)(n,r)},w8=(e,t={})=>({state:n,dispatch:r})=>{let o=$e(e,n.schema);return _2(o,t)(n,r)},E8=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},ef=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},_8=(e,t)=>{if(sb(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function Fd(e){var t;let{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=XL(u)+i;return s.forEach(f=>{if(c)return;let p=_8(d,f.find);if(!p)return;let h=l.state.tr,m=qd({state:l.state,transaction:h}),b={from:r-(p[0].length-i.length),to:o},{commands:g,chain:y,can:v}=new Vd({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:y,can:v})===null||!h.steps.length||(f.undoable&&h.setMeta(a,{transform:h,from:r,to:o,text:i}),l.dispatch(h),c=!0)}),c}function S8(e){let{editor:t,rules:n}=e,r=new W({state:{init(){return null},apply(o,i,s){let a=o.getMeta(r);if(a)return a;let l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=ua(N.from(c),s.schema);let{from:d}=l,f=d+c.length;Fd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return Fd({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&Fd({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?Fd({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function C8(e){return Object.prototype.toString.call(e).slice(8,-1)}function zd(e){return C8(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function cS(e,t){let n={...e};return zd(e)&&zd(t)&&Object.keys(t).forEach(r=>{zd(t[r])&&zd(e[r])?n[r]=cS(e[r],t[r]):n[r]=t[r]}),n}var mb=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...he(J(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...he(J(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>cS(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},et=class dS extends mb{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new dS(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let l=s.find(u=>u?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function T8(e){return typeof e=="number"}var N8=class{constructor(e){this.find=e.find,this.handler=e.handler}},A8=(e,t,n)=>{if(sb(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),i.push(o.replaceWith)),i}):[]};function M8(e){let{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:c}=new Vd({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var m,b,g,y,v;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let x=(v=(y=(g=p.content)==null?void 0:g.size)!=null?y:p.nodeSize)!=null?v:0,k=Math.max(r,h),w=Math.min(o,h+x);if(k>=w)return;let E=p.isText?p.text||"":p.textBetween(k-h,w-h,void 0,"\uFFFC");A8(E,i.find,s).forEach(T=>{if(T.index===void 0)return;let C=k+T.index+1,U=C+T[0].length,V={from:n.tr.mapping.map(C),to:n.tr.mapping.map(U)},A=i.handler({state:n,range:V,match:T,commands:l,chain:u,can:c,pasteEvent:s,dropEvent:a});d.push(A)})}),d.every(p=>p!==null)}var Ud=null,R8=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function D8(e){let{editor:t,rules:n}=e,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}let l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=qd({state:c,transaction:m});if(!(!M8({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new W({view(d){let f=h=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,r&&(Ud=t)},p=()=>{Ud&&(Ud=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,a=f,!i){let p=Ud;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!i,g=h.getMeta("applyPasteRules"),y=!!g;if(!m&&!b&&!y)return;if(y){let{text:k}=g;typeof k=="string"?k=k:k=ua(N.from(k),p.schema);let{from:w}=g,E=w+k.length,_=R8(k);return l({rule:c,state:p,from:w,to:{b:E},pasteEvt:_})}let v=f.doc.content.findDiffStart(p.doc.content),x=f.doc.content.findDiffEnd(p.doc.content);if(!(!T8(v)||!x||v===x.b))return l({rule:c,state:p,from:v,to:x,pasteEvt:s})}}))}var tf=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=rS(e),this.schema=KL(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:eb(t.name,this.schema)},r=J(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return db([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:eb(r.name,this.schema)},i=[],s=J(r,"addKeyboardShortcuts",o),a={};if(r.type==="mark"&&J(r,"exitable",o)&&(a.ArrowRight=()=>et.handleExit({editor:e,mark:r})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));a={...a,...f}}let l=F_(a);i.push(l);let u=J(r,"addInputRules",o);if(V_(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=S8({editor:e,rules:f}),h=Array.isArray(p)?p:[p];i.push(...h)}}let c=J(r,"addPasteRules",o);if(V_(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=D8({editor:e,rules:f});i.push(...p)}}let d=J(r,"addProseMirrorPlugins",o);if(d){let f=d();i.push(...f)}return i})}get attributes(){return nS(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=aa(this.extensions);return Object.fromEntries(t.filter(n=>!!J(n,"addNodeView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:$e(n.name,this.schema)},i=J(n,"addNodeView",o);if(!i)return[];let s=i();if(!s)return[];let a=(l,u,c,d,f)=>{let p=la(l,r);return s({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,a]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=aa(this.extensions);return Object.fromEntries(t.filter(n=>!!J(n,"addMarkView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Kr(n.name,this.schema)},i=J(n,"addMarkView",o);if(!i)return[];let s=(a,l,u)=>{let c=la(a,r);return i()({mark:a,view:l,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{$8(a,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:eb(t.name,this.schema)};t.type==="mark"&&((n=he(J(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=J(t,"onBeforeCreate",r),i=J(t,"onCreate",r),s=J(t,"onUpdate",r),a=J(t,"onSelectionUpdate",r),l=J(t,"onTransaction",r),u=J(t,"onFocus",r),c=J(t,"onBlur",r),d=J(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};tf.resolve=rS;tf.sort=db;tf.flatten=cb;var gb={};ib(gb,{ClipboardTextSerializer:()=>pS,Commands:()=>hS,Delete:()=>mS,Drop:()=>gS,Editable:()=>bS,FocusEvents:()=>vS,Keymap:()=>xS,Paste:()=>kS,Tabindex:()=>wS,TextDirection:()=>ES,focusEventsPluginKey:()=>yS});var oe=class fS extends mb{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new fS(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},pS=oe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new W({key:new X("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(c=>c.$from.pos)),a=Math.max(...i.map(c=>c.$to.pos)),l=Yd(n);return oS(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),hS=oe.create({name:"commands",addCommands(){return{...K_}}}),mS=oe.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let i=()=>{var s,a,l,u;if((u=(l=(a=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,e))!=null?u:e.getMeta("y-sync$"))return;let c=lb(e.before,[e,...t]);hb(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof zr){let g=f.slice(h).map(p.from,-1),y=f.slice(h).map(p.to),v=f.invert().map(g,-1),x=f.invert().map(y),k=(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(E=>E.eq(p.mark)),w=(b=c.doc.nodeAt(y))==null?void 0:b.marks.some(E=>E.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:v,to:x},newRange:{from:g,to:y},partial:!!(w||k),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),gS=oe.create({name:"drop",addProseMirrorPlugins(){return[new W({key:new X("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),bS=oe.create({name:"editable",addProseMirrorPlugins(){return[new W({key:new X("editable"),props:{editable:()=>this.editor.options.editable}})]}}),yS=new X("focusEvents"),vS=oe.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new W({key:yS,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),xS=oe.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{let{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:G.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return jd()||X_()?i:o},addProseMirrorPlugins(){return[new W({key:new X("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:a}=t.selection,l=G.atStart(t.doc).from,u=G.atEnd(t.doc).to;if(i||!(s===l&&a===u)||!Jl(n.doc))return;let f=n.tr,p=qd({state:n,transaction:f}),{commands:h}=new Vd({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),kS=oe.create({name:"paste",addProseMirrorPlugins(){return[new W({key:new X("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),wS=oe.create({name:"tabindex",addProseMirrorPlugins(){return[new W({key:new X("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),ES=oe.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=aa(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new W({key:new X("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),O8=class sa{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new sa(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new sa(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new sa(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;let l=new sa(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new sa(a,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let i=o.node.attrs,s=Object.keys(n);for(let a=0;a{r&&o.length>0||(s.node.type.name===t&&i.every(l=>n[l]===s.node.attrs[l])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},I8=`.ProseMirror { +`,textSerializers:i={}}=n||{},s="";return e.nodesBetween(r,o,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(s+=a);let p=i?.[l.type.name];if(p)return c&&(s+=p({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(s+=(f=l?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),s}function Eb(e,t){let n={from:0,to:e.content.size};return yE(e,n,t)}function sf(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function d4(e,t){let n=qe(t,e.schema),{from:r,to:o}=e.selection,a=[];e.doc.nodesBetween(r,o,s=>{a.push(s)});let i=a.reverse().find(s=>s.type.name===n.name);return i?{...i.attrs}:{}}function Lb(e,t){let n=rf(typeof t=="string"?t:t.name,e.schema);return n==="node"?d4(e,t):n==="mark"?hE(e,t):{}}function f4(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function p4(e){let t=f4(e);return t.length===1?t:t.filter((n,r)=>!t.filter((a,i)=>i!==r).some(a=>n.oldRange.from>=a.oldRange.from&&n.oldRange.to<=a.oldRange.to&&n.newRange.from>=a.newRange.from&&n.newRange.to<=a.newRange.to))}function Ib(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,a)=>{let i=[];if(o.ranges.length)o.forEach((s,l)=>{i.push({from:s,to:l})});else{let{from:s,to:l}=n[a];if(s===void 0||l===void 0)return;i.push({from:s,to:l})}i.forEach(({from:s,to:l})=>{let u=t.slice(a).map(s,-1),c=t.slice(a).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),p4(r)}function lf(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let a=n.resolve(e),i=kb(a,o.type);i&&r.push({mark:o,...i})}):n.nodesBetween(e,t,(o,a)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(i=>({from:a,to:a+o.nodeSize,mark:i})))}),r}var kE=(e,t,n,r=20)=>{let o=e.doc.resolve(n),a=r,i=null;for(;a>0&&i===null;){let s=o.node(a);s?.type.name===t?i=s:a-=1}return[i,a]};function pb(e,t){return t.nodes[e]||t.marks[e]||null}function Zd(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(a=>a.type===t&&a.name===r);return o?o.attribute.keepOnSplit:!1}))}var h4=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,a,i,s)=>{var l,u;let c=((u=(l=o.type.spec).toText)==null?void 0:u.call(l,{node:o,pos:a,parent:i,index:s}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-a))}),n};function bb(e,t,n={}){let{empty:r,ranges:o}=e.selection,a=t?jr(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>a?a.name===d.type.name:!0).find(d=>Yd(d.attrs,n,{strict:!1}));let i=0,s=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),x=Math.min(h,b+m.nodeSize),y=x-g;i+=y,s.push(...m.marks.map(k=>({mark:k,from:g,to:x})))})}),i===0)return!1;let l=s.filter(d=>a?a.name===d.mark.type.name:!0).filter(d=>Yd(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=s.filter(d=>a?d.mark.type!==a&&d.mark.type.excludes(a):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=i}function m4(e,t,n={}){if(!t)return lr(e,null,n)||bb(e,null,n);let r=rf(t,e.schema);return r==="node"?lr(e,t,n):r==="mark"?bb(e,t,n):!1}var vE=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let a=af(s=>s.type.name===t)(e.selection);if(!a)return!1;let i=e.doc.resolve(a.pos+1);return o.pos+1===i.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function aE(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function iE(e,t){let{nodeExtensions:n}=cs(t),r=n.find(i=>i.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},a=he(X(r,"group",o));return typeof a!="string"?!1:a.split(" ").includes("list")}function Ql(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(a=>{o!==!1&&(Ql(a,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function uf(e){return e instanceof q}var wE=class SE{constructor(t){this.position=t}static fromJSON(t){return new SE(t.position)}toJSON(){return{position:this.position}}};function g4(e,t){let n=t.mapping.mapResult(e.position);return{position:new wE(n.pos),mapResult:n}}function b4(e){return new wE(e)}function cf(e,t,n){let o=e.state.doc.content.size,a=Gr(t,0,o),i=Gr(n,0,o),s=e.coordsAtPos(a),l=e.coordsAtPos(i,-1),u=Math.min(s.top,l.top),c=Math.max(s.bottom,l.bottom),d=Math.min(s.left,l.left),f=Math.max(s.right,l.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function x4(e,t,n){var r;let{selection:o}=t,a=null;if(tf(o)&&(a=o.$cursor),a){let s=(r=e.storedMarks)!=null?r:a.marks();return a.parent.type.allowsMarkType(n)&&(!!n.isInSet(s)||!s.some(u=>u.type.excludes(n)))}let{ranges:i}=o;return i.some(({$from:s,$to:l})=>{let u=s.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var y4=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:a}=n,{empty:i,ranges:s}=a,l=jr(e,r.schema);if(o)if(i){let u=hE(r,l);n.addStoredMark(l.create({...u,...t}))}else s.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return x4(r,n,l)},k4=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),v4=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let a=qe(e,n.schema),i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),a.isTextblock?o().command(({commands:s})=>Dg(a,{...i,...t})(n)?!0:s.clearNodes()).command(({state:s})=>Dg(a,{...i,...t})(s,r)).run():!1},C4=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=Gr(e,0,r.content.size),a=q.create(r,o);t.setSelection(a)}return!0},w4=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:a}=r,i,s;return typeof t=="number"?(i=t,s=t):t&&"from"in t&&"to"in t?(i=t.from,s=t.to):(i=a.from,s=a.to),o&&n.doc.nodesBetween(i,s,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},S4=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:a}=typeof e=="number"?{from:e,to:e}:e,i=$.atStart(r).from,s=$.atEnd(r).to,l=Gr(o,i,s),u=Gr(a,i,s),c=$.create(r,l,u);t.setSelection(c)}return!0},E4=e=>({state:t,dispatch:n})=>{let r=qe(e,t.schema);return HS(r)(t,n)};function sE(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var L4=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:a,doc:i}=t,{$from:s,$to:l}=a,u=o.extensionManager.attributes,c=Zd(u,s.node().type.name,s.node().attrs);if(a instanceof q&&a.node.isBlock)return!s.parentOffset||!dn(i,s.pos)?!1:(r&&(e&&sE(n,o.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=s.depth===0?void 0:i4(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=dn(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!h&&dn(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(a instanceof $&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let m=t.mapping.map(s.before()),b=t.doc.resolve(m);s.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&sE(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},I4=(e,t={})=>({tr:n,state:r,dispatch:o,editor:a})=>{var i;let s=qe(e,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;let d=l.node(-1);if(d.type!==s)return!1;let f=a.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let g=_.empty,x=l.index(-1)?1:l.index(-2)?2:3;for(let S=l.depth-x;S>=l.depth-3;S-=1)g=_.from(l.node(S).copy(g));let y=l.indexAfter(-1){if(w>-1)return!1;S.isTextblock&&S.content.size===0&&(w=I+1)}),w>-1&&n.setSelection($.near(n.doc.resolve(w))),n.scrollIntoView()}return!0}let p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...Zd(f,d.type.name,d.attrs),...t},m={...Zd(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);let b=p?[{type:s,attrs:h},{type:p,attrs:m}]:[{type:s,attrs:h}];if(!dn(n.doc,l.pos,2))return!1;if(o){let{selection:g,storedMarks:x}=r,{splittableMarks:y}=a.extensionManager,k=x||g.$to.parentOffset&&g.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!k||!o)return!0;let v=k.filter(C=>y.includes(C.type.name));n.ensureMarks(v)}return!0},hb=(e,t)=>{let n=af(i=>i.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&Sn(e.doc,n.pos)&&e.join(n.pos),!0},mb=(e,t)=>{let n=af(i=>i.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&Sn(e.doc,r)&&e.join(r),!0},_4=(e,t,n,r={})=>({editor:o,tr:a,state:i,dispatch:s,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=qe(e,i.schema),h=qe(t,i.schema),{selection:m,storedMarks:b}=i,{$from:g,$to:x}=m,y=g.blockRange(x),k=b||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;let v=af(C=>iE(C.type.name,d))(m);if(y.depth>=1&&v&&y.depth-v.depth<=1){if(v.node.type===p)return u.liftListItem(h);if(iE(v.node.type.name,d)&&p.validContent(v.node.content)&&s)return l().command(()=>(a.setNodeMarkup(v.pos,p),!0)).command(()=>hb(a,p)).command(()=>mb(a,p)).run()}return!n||!k||!s?l().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>hb(a,p)).command(()=>mb(a,p)).run():l().command(()=>{let C=c().wrapInList(p,r),w=k.filter(S=>f.includes(S.type.name));return a.ensureMarks(w),C?!0:u.clearNodes()}).wrapInList(p,r).command(()=>hb(a,p)).command(()=>mb(a,p)).run()},A4=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:a=!1}=n,i=jr(e,r.schema);return bb(r,i,t)?o.unsetMark(i,{extendEmptyMarkRange:a}):o.setMark(i,t)},T4=(e,t,n={})=>({state:r,commands:o})=>{let a=qe(e,r.schema),i=qe(t,r.schema),s=lr(r,a,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(i,l):o.setNode(a,{...l,...n})},M4=(e,t={})=>({state:n,commands:r})=>{let o=qe(e,n.schema);return lr(n,o,t)?r.lift(o):r.wrapIn(o,t)},N4=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;l-=1)i.step(s.steps[l].invert(s.docs[l]));if(a.text){let l=i.doc.resolve(a.from).marks();i.replaceWith(a.from,a.to,e.schema.text(a.text,l))}else i.delete(a.from,a.to)}return!0}}return!1},D4=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(a=>{e.removeMark(a.$from.pos,a.$to.pos)}),!0},R4=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var a;let{extendEmptyMarkRange:i=!1}=t,{selection:s}=n,l=jr(e,r.schema),{$from:u,empty:c,ranges:d}=s;if(!o)return!0;if(c&&i){let{from:f,to:p}=s,h=(a=u.marks().find(b=>b.type===l))==null?void 0:a.attrs,m=kb(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},O4=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,a,i;return typeof e=="number"?(a=e,i=e):e&&"from"in e&&"to"in e?(a=e.from,i=e.to):(a=o.from,i=o.to),r&&t.doc.nodesBetween(a,i,(s,l)=>{if(s.isText)return;let u={...s.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},P4=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null,s=rf(typeof e=="string"?e:e.name,r.schema);if(!s)return!1;s==="node"&&(a=qe(e,r.schema)),s==="mark"&&(i=jr(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?r.doc.nodesBetween(c,d,(b,g)=>{a&&a===b.type&&(l=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):r.doc.nodesBetween(c,d,(b,g)=>{g=c&&g<=d&&(a&&a===b.type&&(l=!0,o&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),i&&b.marks.length&&b.marks.forEach(x=>{if(i===x.type&&(l=!0,o)){let y=Math.max(g,c),k=Math.min(g+b.nodeSize,d);n.addMark(y,k,i.create({...x.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),i&&p.marks.length&&p.marks.forEach(b=>{i===b.type&&o&&n.addMark(h,m,i.create({...b.attrs,...t}))}))}),l},B4=(e,t={})=>({state:n,dispatch:r})=>{let o=qe(e,n.schema);return FS(o,t)(n,r)},F4=(e,t={})=>({state:n,dispatch:r})=>{let o=qe(e,n.schema);return zS(o,t)(n,r)},z4=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},df=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},U4=(e,t)=>{if(yb(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function jd(e){var t;let{editor:n,from:r,to:o,text:a,rules:i,plugin:s}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=h4(u)+a;return i.forEach(f=>{if(c)return;let p=U4(d,f.find);if(!p)return;let h=l.state.tr,m=Qd({state:l.state,transaction:h}),b={from:r-(p[0].length-a.length),to:o},{commands:g,chain:x,can:y}=new ef({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:x,can:y})===null||!h.steps.length||(f.undoable&&h.setMeta(s,{transform:h,from:r,to:o,text:a}),l.dispatch(h),c=!0)}),c}function H4(e){let{editor:t,rules:n}=e,r=new W({state:{init(){return null},apply(o,a,i){let s=o.getMeta(r);if(s)return s;let l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=fs(_.from(c),i.schema);let{from:d}=l,f=d+c.length;jd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:a}},props:{handleTextInput(o,a,i,s){return jd({editor:t,from:a,to:i,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:a}=o.state.selection;a&&jd({editor:t,from:a.pos,to:a.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,a){if(a.key!=="Enter")return!1;let{$cursor:i}=o.state.selection;return i?jd({editor:t,from:i.pos,to:i.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function q4(e){return Object.prototype.toString.call(e).slice(8,-1)}function Xd(e){return q4(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function EE(e,t){let n={...e};return Xd(e)&&Xd(t)&&Object.keys(t).forEach(r=>{Xd(t[r])&&Xd(e[r])?n[r]=EE(e[r],t[r]):n[r]=t[r]}),n}var _b=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...he(X(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...he(X(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>EE(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},et=class LE extends _b{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new LE(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let i=o.marks();if(!!!i.find(u=>u?.type.name===n.name))return!1;let l=i.find(u=>u?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function $4(e){return typeof e=="number"}var V4=class{constructor(e){this.find=e.find,this.handler=e.handler}},W4=(e,t,n)=>{if(yb(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let a=[o.text];return a.index=o.index,a.input=e,a.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),a.push(o.replaceWith)),a}):[]};function K4(e){let{editor:t,state:n,from:r,to:o,rule:a,pasteEvent:i,dropEvent:s}=e,{commands:l,chain:u,can:c}=new ef({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var m,b,g,x,y;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let k=(y=(x=(g=p.content)==null?void 0:g.size)!=null?x:p.nodeSize)!=null?y:0,v=Math.max(r,h),C=Math.min(o,h+k);if(v>=C)return;let w=p.isText?p.text||"":p.textBetween(v-h,C-h,void 0,"\uFFFC");W4(w,a.find,i).forEach(I=>{if(I.index===void 0)return;let L=v+I.index+1,U=L+I[0].length,V={from:n.tr.mapping.map(L),to:n.tr.mapping.map(U)},A=a.handler({state:n,range:V,match:I,commands:l,chain:u,can:c,pasteEvent:i,dropEvent:s});d.push(A)})}),d.every(p=>p!==null)}var Jd=null,G4=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function j4(e){let{editor:t,rules:n}=e,r=null,o=!1,a=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}let l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=Qd({state:c,transaction:m});if(!(!K4({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:s})||!m.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new W({view(d){let f=h=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,r&&(Jd=t)},p=()=>{Jd&&(Jd=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(a=r===d.dom.parentElement,s=f,!a){let p=Jd;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return i=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!a,g=h.getMeta("applyPasteRules"),x=!!g;if(!m&&!b&&!x)return;if(x){let{text:v}=g;typeof v=="string"?v=v:v=fs(_.from(v),p.schema);let{from:C}=g,w=C+v.length,S=G4(v);return l({rule:c,state:p,from:C,to:{b:w},pasteEvt:S})}let y=f.doc.content.findDiffStart(p.doc.content),k=f.doc.content.findDiffEnd(p.doc.content);if(!(!$4(y)||!k||y===k.b))return l({rule:c,state:p,from:y,to:k,pasteEvt:i})}}))}var ff=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=xE(e),this.schema=u4(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:pb(t.name,this.schema)},r=X(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Sb([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:pb(r.name,this.schema)},a=[],i=X(r,"addKeyboardShortcuts",o),s={};if(r.type==="mark"&&X(r,"exitable",o)&&(s.ArrowRight=()=>et.handleExit({editor:e,mark:r})),i){let f=Object.fromEntries(Object.entries(i()).map(([p,h])=>[p,()=>h({editor:e})]));s={...s,...f}}let l=Q2(s);a.push(l);let u=X(r,"addInputRules",o);if(aE(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=H4({editor:e,rules:f}),h=Array.isArray(p)?p:[p];a.push(...h)}}let c=X(r,"addPasteRules",o);if(aE(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=j4({editor:e,rules:f});a.push(...p)}}let d=X(r,"addProseMirrorPlugins",o);if(d){let f=d();a.push(...f)}return a})}get attributes(){return bE(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=cs(this.extensions);return Object.fromEntries(t.filter(n=>!!X(n,"addNodeView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:qe(n.name,this.schema)},a=X(n,"addNodeView",o);if(!a)return[];let i=a();if(!i)return[];let s=(l,u,c,d,f)=>{let p=ds(l,r);return i({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,s]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=cs(this.extensions);return Object.fromEntries(t.filter(n=>!!X(n,"addMarkView")).map(n=>{let r=this.attributes.filter(s=>s.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:jr(n.name,this.schema)},a=X(n,"addMarkView",o);if(!a)return[];let i=(s,l,u)=>{let c=ds(s,r);return a()({mark:s,view:l,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{oB(s,e,d)}})};return[n.name,i]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:pb(t.name,this.schema)};t.type==="mark"&&((n=he(X(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=X(t,"onBeforeCreate",r),a=X(t,"onCreate",r),i=X(t,"onUpdate",r),s=X(t,"onSelectionUpdate",r),l=X(t,"onTransaction",r),u=X(t,"onFocus",r),c=X(t,"onBlur",r),d=X(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),a&&this.editor.on("create",a),i&&this.editor.on("update",i),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};ff.resolve=xE;ff.sort=Sb;ff.flatten=wb;var Ab={};xb(Ab,{ClipboardTextSerializer:()=>_E,Commands:()=>AE,Delete:()=>TE,Drop:()=>ME,Editable:()=>NE,FocusEvents:()=>RE,Keymap:()=>OE,Paste:()=>PE,Tabindex:()=>BE,TextDirection:()=>FE,focusEventsPluginKey:()=>DE});var ae=class IE extends _b{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new IE(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},_E=ae.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new W({key:new Y("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:a}=o,i=Math.min(...a.map(c=>c.$from.pos)),s=Math.max(...a.map(c=>c.$to.pos)),l=sf(n);return yE(r,{from:i,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),AE=ae.create({name:"commands",addCommands(){return{...lE}}}),TE=ae.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let a=()=>{var i,s,l,u;if((u=(l=(s=(i=this.editor.options.coreExtensionOptions)==null?void 0:i.delete)==null?void 0:s.filterTransaction)==null?void 0:l.call(s,e))!=null?u:e.getMeta("y-sync$"))return;let c=vb(e.before,[e,...t]);Ib(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof Ur){let g=f.slice(h).map(p.from,-1),x=f.slice(h).map(p.to),y=f.invert().map(g,-1),k=f.invert().map(x),v=(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(w=>w.eq(p.mark)),C=(b=c.doc.nodeAt(x))==null?void 0:b.marks.some(w=>w.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:y,to:k},newRange:{from:g,to:x},partial:!!(C||v),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(a,0):a()}}),ME=ae.create({name:"drop",addProseMirrorPlugins(){return[new W({key:new Y("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),NE=ae.create({name:"editable",addProseMirrorPlugins(){return[new W({key:new Y("editable"),props:{editable:()=>this.editor.options.editable}})]}}),DE=new Y("focusEvents"),RE=ae.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new W({key:DE,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),OE=ae.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:s})=>{let{selection:l,doc:u}=s,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?s.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:j.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},a={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return nf()||pE()?a:o},addProseMirrorPlugins(){return[new W({key:new Y("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:a,from:i,to:s}=t.selection,l=j.atStart(t.doc).from,u=j.atEnd(t.doc).to;if(a||!(i===l&&s===u)||!Ql(n.doc))return;let f=n.tr,p=Qd({state:n,transaction:f}),{commands:h}=new ef({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),PE=ae.create({name:"paste",addProseMirrorPlugins(){return[new W({key:new Y("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),BE=ae.create({name:"tabindex",addProseMirrorPlugins(){return[new W({key:new Y("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),FE=ae.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=cs(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new W({key:new Y("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),X4=class us{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new us(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new us(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new us(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,i=this.pos+r+(a?0:1);if(i<0||i>this.resolvedPos.doc.nodeSize-2)return;let s=this.resolvedPos.doc.resolve(i);if(!o&&s.depth<=this.depth)return;let l=new us(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new us(s,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let a=o.node.attrs,i=Object.keys(n);for(let s=0;s{r&&o.length>0||(i.node.type.name===t&&a.every(l=>n[l]===i.node.attrs[l])&&o.push(i),!(r&&o.length>0)&&(o=o.concat(i.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},J4=`.ProseMirror { position: relative; } @@ -412,101 +412,101 @@ img.ProseMirror-separator { .ProseMirror-focused .ProseMirror-gapcursor { display: block; -}`;function L8(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var _S=class extends E8{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:e8,createMappablePosition:t8},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=J_(t,this.options.autofocus);this.editorState=kd.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=L8(I8,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=tS(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[bS,pS.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),hS,vS,xS,wS,gS,kS,mS,ES.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new tf(r,this)}createCommandManager(){this.commandManager=new Vd({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=rb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=rb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new Vl(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),a=s?.getMeta("focus"),l=s?.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return pb(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return QL(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ua(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` +}`;function Z4(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var zE=class extends z4{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:g4,createMappablePosition:b4},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:a})=>this.options.onDrop(r,o,a)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=cE(t,this.options.autofocus);this.editorState=Md.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Z4(J4,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=gE(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let a=typeof o=="string"?`${o}$`:o.key;n=n.filter(i=>!i.key.startsWith(a))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[NE,_E.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),AE,RE,OE,BE,ME,PE,TE,FE.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new ff(r,this)}createCommandManager(){this.commandManager=new ef({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=gb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=gb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new jl(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),a=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let i=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),s=i?.getMeta("focus"),l=i?.getMeta("blur");s&&this.emit("focus",{editor:this,event:s.event,transaction:i}),l&&this.emit("blur",{editor:this,event:l.event,transaction:i}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||a.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Lb(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return m4(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return fs(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` -`,textSerializers:n={}}=e||{};return fb(this.state.doc,{blockSeparator:t,textSerializers:{...Yd(this.schema),...n}})}get isEmpty(){return Jl(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new O8(t,this)}get $doc(){return this.$pos(0)}};function lr(e){return new ef({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=t,s=r[r.length-1],a=r[0];if(s){let l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(Zd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&i.delete(n.from+l,u);let f=n.from+l+s.length;i.addMark(n.from+l,f,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function SS(e){return new ef({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from,a=n.to,l=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=s+u;c>a?c=a:a=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,a,l)}else if(r[0]){let u=e.type.isInline?s:s-1;i.insert(u,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()},undoable:e.undoable})}function Yl(e){return new ef({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),i=he(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function ur(e){return new ef({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let i=he(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&Js(l,e.type,i);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));s.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&En(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}function CS(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof $){let i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(t))return!0;o-=1}return!1}function TS(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var P8={};ib(P8,{createAtomBlockMarkdownSpec:()=>B8,createBlockMarkdownSpec:()=>F8,createInlineMarkdownSpec:()=>H8,parseAttributes:()=>bb,parseIndentedBlocks:()=>nf,renderNestedMarkdownContent:()=>Zl,serializeAttributes:()=>yb});function bb(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function yb(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function B8(e){let{nodeName:t,name:n,parseAttributes:r=bb,serializeAttributes:o=yb,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:a}=e,l=n||t,u=c=>{if(!a)return c;let d={};return a.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...i,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=r(m);if(!s.find(y=>!(y in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function F8(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=bb,serializeAttributes:i=yb,defaultAttributes:s={},content:a="block",allowedAttributes:l}=e,u=n||t,c=d=>{if(!l)return d;let f={};return l.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,y=""]=b,v=o(y),x=1,k=g.length,w="",E=/^:::([\w-]*)(\s.*)?/gm,_=d.slice(k);for(E.lastIndex=0;;){let T=E.exec(_);if(T===null)break;let C=T.index,U=T[1];if(!((h=T[2])!=null&&h.endsWith(":::"))){if(U)x+=1;else if(x-=1,x===0){let V=_.slice(0,C);w=V.trim();let A=d.slice(0,k+C+T[0].length),F=[];if(w)if(a==="block")for(F=p.blockTokens(V),F.forEach(R=>{R.text&&(!R.tokens||R.tokens.length===0)&&(R.tokens=p.inlineTokens(R.text))});F.length>0;){let R=F[F.length-1];if(R.type==="paragraph"&&(!R.text||R.text.trim()===""))F.pop();else break}else F=p.inlineTokens(w);return{type:t,raw:A,attributes:v,content:w,tokens:F}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=i(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` +`,textSerializers:n={}}=e||{};return Eb(this.state.doc,{blockSeparator:t,textSerializers:{...sf(this.schema),...n}})}get isEmpty(){return Ql(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new X4(t,this)}get $doc(){return this.$pos(0)}};function ur(e){return new df({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:a}=t,i=r[r.length-1],s=r[0];if(i){let l=s.search(/\S/),u=n.from+s.indexOf(i),c=u+i.length;if(lf(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&a.delete(n.from+l,u);let f=n.from+l+i.length;a.addMark(n.from+l,f,e.type.create(o||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function UE(e){return new df({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r)||{},{tr:a}=t,i=n.from,s=n.to,l=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=i+u;c>s?c=s:s=c+r[1].length;let d=r[0][r[0].length-1];a.insertText(d,i+r[0].length-1),a.replaceWith(c,s,l)}else if(r[0]){let u=e.type.isInline?i:i-1;a.insert(u,e.type.create(o)).delete(a.mapping.map(i),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function eu(e){return new df({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),a=he(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function cr(e){return new df({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let a=he(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),u=l&&Zi(l,e.type,a);if(!u)return null;if(i.wrap(l,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));i.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,a).run()}let c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&Sn(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&i.join(n.from-1)},undoable:e.undoable})}function HE(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof q){let a=r.index();return r.parent.canReplaceWith(a,a+1,t)}let o=r.depth;for(;o>=0;){let a=r.index(o);if(r.node(o).contentMatchAt(a).matchType(t))return!0;o-=1}return!1}function qE(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var Y4={};xb(Y4,{createAtomBlockMarkdownSpec:()=>Q4,createBlockMarkdownSpec:()=>eB,createInlineMarkdownSpec:()=>rB,parseAttributes:()=>Tb,parseIndentedBlocks:()=>pf,renderNestedMarkdownContent:()=>tu,serializeAttributes:()=>Mb});function Tb(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let a=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);a&&(t.id=a[1]);let i=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(i)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function Mb(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function Q4(e){let{nodeName:t,name:n,parseAttributes:r=Tb,serializeAttributes:o=Mb,defaultAttributes:a={},requiredAttributes:i=[],allowedAttributes:s}=e,l=n||t,u=c=>{if(!s)return c;let d={};return s.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...a,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=r(m);if(!i.find(x=>!(x in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function eB(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=Tb,serializeAttributes:a=Mb,defaultAttributes:i={},content:s="block",allowedAttributes:l}=e,u=n||t,c=d=>{if(!l)return d;let f={};return l.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else s==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...i,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,x=""]=b,y=o(x),k=1,v=g.length,C="",w=/^:::([\w-]*)(\s.*)?/gm,S=d.slice(v);for(w.lastIndex=0;;){let I=w.exec(S);if(I===null)break;let L=I.index,U=I[1];if(!((h=I[2])!=null&&h.endsWith(":::"))){if(U)k+=1;else if(k-=1,k===0){let V=S.slice(0,L);C=V.trim();let A=d.slice(0,v+L+I[0].length),F=[];if(C)if(s==="block")for(F=p.blockTokens(V),F.forEach(M=>{M.text&&(!M.tokens||M.tokens.length===0)&&(M.tokens=p.inlineTokens(M.text))});F.length>0;){let M=F[F.length-1];if(M.type==="paragraph"&&(!M.text||M.text.trim()===""))F.pop();else break}else F=p.inlineTokens(C);return{type:t,raw:A,attributes:y,content:C,tokens:F}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=a(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` `);return`:::${u}${m} ${b} -:::`}}}function z8(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function U8(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function H8(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=z8,serializeAttributes:i=U8,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=e,u=n||t,c=f=>{if(!l)return f;let p={};return l.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(a)return p.createNode(t,h);let m=r?r(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",y="";if(a){let[,x]=b;y=x}else{let[,x,k]=b;y=x,g=k||""}let v=o(y.trim());return{type:t,raw:b[0],content:g.trim(),attributes:v}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=i(h),b=m?` ${m}`:"";return a?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function nf(e,t,n){var r,o,i,s;let a=e.split(` -`),l=[],u="",c=0,d=t.baseIndentSize||2;for(;c0)break;if(f.trim()===""){c+=1,u=`${u}${f} +:::`}}}function tB(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,a,i]=r;t[o]=a||i,r=n.exec(e)}return t}function nB(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function rB(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=tB,serializeAttributes:a=nB,defaultAttributes:i={},selfClosing:s=!1,allowedAttributes:l}=e,u=n||t,c=f=>{if(!l)return f;let p={};return l.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...i,...f.attributes};if(s)return p.createNode(t,h);let m=r?r(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=s?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=s?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",x="";if(s){let[,k]=b;x=k}else{let[,k,v]=b;x=k,g=v||""}let y=o(x.trim());return{type:t,raw:b[0],content:g.trim(),attributes:y}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=a(h),b=m?` ${m}`:"";return s?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function pf(e,t,n){var r,o,a,i;let s=e.split(` +`),l=[],u="",c=0,d=t.baseIndentSize||2;for(;c0)break;if(f.trim()===""){c+=1,u=`${u}${f} `;continue}else return}let h=t.extractItemData(p),{indentLevel:m,mainContent:b}=h;u=`${u}${f} -`;let g=[b];for(c+=1;cC.trim()!=="");if(E===-1)break;if((((o=(r=a[c+1+E].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){g.push(k),u=`${u}${k} -`,c+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>m)g.push(k),u=`${u}${k} -`,c+=1;else break}let y,v=g.slice(1);if(v.length>0){let k=v.map(w=>w.slice(m+d)).join(` -`);k.trim()&&(t.customNestedParser?y=t.customNestedParser(k):y=n.blockTokens(k))}let x=t.createToken(h,y);l.push(x)}if(l.length!==0)return{items:l,raw:u}}function Zl(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=e.content,a=t.renderChildren([i]),l=[`${o}${a}`];return s&&s.length>0&&s.forEach(u=>{let c=t.renderChildren([u]);if(c){let d=c.split(` +`;let g=[b];for(c+=1;cL.trim()!=="");if(w===-1)break;if((((o=(r=s[c+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){g.push(v),u=`${u}${v} +`,c+=1;continue}else break}if((((i=(a=v.match(/^(\s*)/))==null?void 0:a[1])==null?void 0:i.length)||0)>m)g.push(v),u=`${u}${v} +`,c+=1;else break}let x,y=g.slice(1);if(y.length>0){let v=y.map(C=>C.slice(m+d)).join(` +`);v.trim()&&(t.customNestedParser?x=t.customNestedParser(v):x=n.blockTokens(v))}let k=t.createToken(h,x);l.push(k)}if(l.length!==0)return{items:l,raw:u}}function tu(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(r):n,[a,...i]=e.content,s=t.renderChildren([a]),l=[`${o}${s}`];return i&&i.length>0&&i.forEach(u=>{let c=t.renderChildren([u]);if(c){let d=c.split(` `).map(f=>f?t.indent(f):"").join(` `);l.push(d)}}),l.join(` -`)}function $8(e,t,n={}){let{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((a,l)=>{let u=i.mapping.map(l),c=i.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var ee=class NS extends mb{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new NS(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},AS=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,i,s,a;let{view:l}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let y=this.dom.getBoundingClientRect(),v=c.getBoundingClientRect(),x=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,k=(s=e.offsetY)!=null?s:(i=e.nativeEvent)==null?void 0:i.offsetY;d=v.x-y.x+x,f=v.y-y.y+k}let p=this.dom.cloneNode(!0);try{let y=this.dom.getBoundingClientRect();p.style.width=`${Math.round(y.width)}px`,p.style.height=`${Math.round(y.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(a=e.dataTransfer)==null||a.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let b=$.create(l.state.doc,m),g=l.state.tr.setSelection(b);l.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),i=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:a}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,c=$.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!l&&e.target===this.dom)return e.preventDefault(),!1;if(u&&a&&!l&&h){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||i||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(jd()||Y_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function Nn(e){return new N8({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let i=he(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=t,a=r[r.length-1],l=r[0],u=n.to;if(a){let c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(Zd(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var Vo=P(Se(),1),YS=P(ad(),1);var q8=Object.getOwnPropertyNames,V8=Object.getOwnPropertySymbols,W8=Object.prototype.hasOwnProperty;function MS(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function rf(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var i=o.cache,s=i.get(n),a=i.get(r);if(s&&a)return s===r&&a===n;i.set(n,r),i.set(r,n);var l=e(n,r,o);return i.delete(n),i.delete(r),l}}function j8(e){return e?.[Symbol.toStringTag]}function RS(e){return q8(e).concat(V8(e))}var K8=Object.hasOwn||(function(e,t){return W8.call(e,t)});function Ui(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var G8="__v",J8="__o",Y8="_owner",DS=Object.getOwnPropertyDescriptor,OS=Object.keys;function Z8(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function X8(e,t){return Ui(e.getTime(),t.getTime())}function Q8(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function eP(e,t){return e===t}function IS(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),s,a,l=0;(s=i.next())&&!s.done;){for(var u=t.entries(),c=!1,d=0;(a=u.next())&&!a.done;){if(o[d]){d++;continue}var f=s.value,p=a.value;if(n.equals(f[0],p[0],l,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;l++}return!0}var tP=Ui;function nP(e,t,n){var r=OS(e),o=r.length;if(OS(t).length!==o)return!1;for(;o-- >0;)if(!FS(e,t,n,r[o]))return!1;return!0}function Xl(e,t,n){var r=RS(e),o=r.length;if(RS(t).length!==o)return!1;for(var i,s,a;o-- >0;)if(i=r[o],!FS(e,t,n,i)||(s=DS(e,i),a=DS(t,i),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function rP(e,t){return Ui(e.valueOf(),t.valueOf())}function oP(e,t){return e.source===t.source&&e.flags===t.flags}function LS(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),s,a;(s=i.next())&&!s.done;){for(var l=t.values(),u=!1,c=0;(a=l.next())&&!a.done;){if(!o[c]&&n.equals(s.value,a.value,s.value,a.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function iP(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function sP(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function FS(e,t,n,r){return(r===Y8||r===J8||r===G8)&&(e.$$typeof||t.$$typeof)?!0:K8(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var aP="[object Arguments]",lP="[object Boolean]",uP="[object Date]",cP="[object Error]",dP="[object Map]",fP="[object Number]",pP="[object Object]",hP="[object RegExp]",mP="[object Set]",gP="[object String]",bP="[object URL]",yP=Array.isArray,PS=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,BS=Object.assign,vP=Object.prototype.toString.call.bind(Object.prototype.toString);function xP(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,a=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual,p=e.unknownTagComparators;return function(m,b,g){if(m===b)return!0;if(m==null||b==null)return!1;var y=typeof m;if(y!==typeof b)return!1;if(y!=="object")return y==="number"?s(m,b,g):y==="function"?o(m,b,g):!1;var v=m.constructor;if(v!==b.constructor)return!1;if(v===Object)return a(m,b,g);if(yP(m))return t(m,b,g);if(PS!=null&&PS(m))return d(m,b,g);if(v===Date)return n(m,b,g);if(v===RegExp)return u(m,b,g);if(v===Map)return i(m,b,g);if(v===Set)return c(m,b,g);var x=vP(m);if(x===uP)return n(m,b,g);if(x===hP)return u(m,b,g);if(x===dP)return i(m,b,g);if(x===mP)return c(m,b,g);if(x===pP)return typeof m.then!="function"&&typeof b.then!="function"&&a(m,b,g);if(x===bP)return f(m,b,g);if(x===cP)return r(m,b,g);if(x===aP)return a(m,b,g);if(x===lP||x===fP||x===gP)return l(m,b,g);if(p){var k=p[x];if(!k){var w=j8(m);w&&(k=p[w])}if(k)return k(m,b,g)}return!1}}function kP(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?Xl:Z8,areDatesEqual:X8,areErrorsEqual:Q8,areFunctionsEqual:eP,areMapsEqual:r?MS(IS,Xl):IS,areNumbersEqual:tP,areObjectsEqual:r?Xl:nP,arePrimitiveWrappersEqual:rP,areRegExpsEqual:oP,areSetsEqual:r?MS(LS,Xl):LS,areTypedArraysEqual:r?Xl:iP,areUrlsEqual:sP,unknownTagComparators:void 0};if(n&&(o=BS({},o,n(o))),t){var i=rf(o.areArraysEqual),s=rf(o.areMapsEqual),a=rf(o.areObjectsEqual),l=rf(o.areSetsEqual);o=BS({},o,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:l})}return o}function wP(e){return function(t,n,r,o,i,s,a){return e(t,n,a)}}function EP(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,u){var c=r(),d=c.cache,f=d===void 0?t?new WeakMap:void 0:d,p=c.meta;return n(l,u,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var s={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,u){return n(l,u,s)}}var zS=$o(),RW=$o({strict:!0}),DW=$o({circular:!0}),OW=$o({circular:!0,strict:!0}),IW=$o({createInternalComparator:function(){return Ui}}),LW=$o({strict:!0,createInternalComparator:function(){return Ui}}),PW=$o({circular:!0,createInternalComparator:function(){return Ui}}),BW=$o({circular:!0,createInternalComparator:function(){return Ui},strict:!0});function $o(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,s=i===void 0?!1:i,a=kP(e),l=xP(a),u=r?r(l):wP(l);return EP({circular:n,comparator:l,createState:o,equals:u,strict:s})}var Wo=P(Se(),1),ZS=P(qS(),1),eC=P(Z(),1),eu=P(Se(),1),oC=P(Z(),1),sC=P(Se(),1),aC=P(Z(),1);var uC=P(Se(),1),xb=P(Se(),1),cC=P(qs(),1),dC=P(Z(),1),VP=P(Z(),1);var ca=P(Se(),1),fC=P(Z(),1),DP=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},OP=({contentComponent:e})=>{let t=(0,GS.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Gr.jsx)(Gr.Fragment,{children:Object.values(t)})};function IP(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:KS.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var LP=class extends qo.default.Component{constructor(e){var t;super(e),this.editorContentRef=qo.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(e.view.dom),e.setOptions({element:t}),e.contentComponent=IP(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.firstChild))return;let n=document.createElement("div");n.append(t.view.dom),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)("div",{ref:DP(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Gr.jsx)(OP,{contentComponent:e.contentComponent})]})}},PP=(0,qo.forwardRef)((e,t)=>{let n=qo.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return qo.default.createElement(LP,{key:n,innerRef:t,...e})}),JS=qo.default.memo(PP),BP=typeof window<"u"?Wo.useLayoutEffect:Wo.useEffect,FP=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function kb(e){var t;let[n]=(0,Wo.useState)(()=>new FP(e.editor)),r=(0,ZS.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:zS);return BP(()=>n.watch(e.editor),[e.editor,n]),(0,Wo.useDebugValue)(r),r}var VS=!1,vb=typeof window>"u",zP=vb||!!(typeof window<"u"&&window.next),UP=class XS{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(vb||zP){if(VS)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&vb&&VS)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new _S(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?XS.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function QS(e={},t=[]){let n=(0,Vo.useRef)(e);n.current=e;let[r]=(0,Vo.useState)(()=>new UP(n)),o=(0,YS.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,Vo.useDebugValue)(o),(0,Vo.useEffect)(r.onRender(t)),kb({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),o}var tC=(0,Ql.createContext)({editor:null}),qW=tC.Consumer,sf=()=>(0,Ql.useContext)(tC);var nC=(0,eu.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var rC=()=>(0,eu.useContext)(nC);function iC({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=rC();return(0,oC.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var lC=sC.default.forwardRef((e,t)=>{let{onDragStart:n}=rC(),r=e.as||"div";return(0,aC.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function WS(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function jS(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function HP(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function $P(e){if(WS(e)||jS(e))return!0;if(HP(e)){let t=e.type;if(t)return WS(t)||jS(t)}return!1}function qP(){try{if(xb.version)return parseInt(xb.version.split(".")[0],10)>=19}catch{}return!1}var wb=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,cC.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=qP(),i=$P(t),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=a=>{this.ref=a}),this.reactElement=(0,dC.jsx)(t,{...s}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},VW=uC.default.createContext({markViewContentRef:()=>{}});var WP=class extends AS{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:(0,ca.createRef)()};if(!this.component.displayName){let l=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=l(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},o=this.component,i=(0,ca.memo)(l=>(0,fC.jsx)(nC.Provider,{value:r,children:(0,ca.createElement)(o,l)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new wb(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=la(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function pC(e,t){return n=>n.editor.contentComponent?new WP(e,n,t):{}}var da=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var jP=/^\s*>\s$/,hC=ee.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return da("blockquote",{...ne(this.options.HTMLAttributes,e),children:da("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let a=t.renderChildren([o]).split(` -`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(` +`)}function oB(e,t,n={}){let{state:r}=t,{doc:o,tr:a}=r,i=e;o.descendants((s,l)=>{let u=a.mapping.map(l),c=a.mapping.map(l)+s.nodeSize,d=null;if(s.marks.forEach(p=>{if(p!==i)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});a.removeMark(u,c,e.type),a.addMark(u,c,p)}}),a.docChanged&&t.view.dispatch(a)}var ee=class $E extends _b{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new $E(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},VE=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,a,i,s;let{view:l}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let x=this.dom.getBoundingClientRect(),y=c.getBoundingClientRect(),k=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,v=(i=e.offsetY)!=null?i:(a=e.nativeEvent)==null?void 0:a.offsetY;d=y.x-x.x+k,f=y.y-x.y+v}let p=this.dom.cloneNode(!0);try{let x=this.dom.getBoundingClientRect();p.style.width=`${Math.round(x.width)}px`,p.style.height=`${Math.round(x.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(s=e.dataTransfer)==null||s.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let b=q.create(l.state.doc,m),g=l.state.tr.setSelection(b);l.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),a=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!a&&!o)return!0;let{isEditable:s}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,c=q.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!l&&e.target===this.dom)return e.preventDefault(),!1;if(u&&s&&!l&&h){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||a||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(nf()||dE())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function An(e){return new V4({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let a=he(e.getAttributes,void 0,r,o);if(a===!1||a===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0],u=n.to;if(s){let c=l.search(/\S/),d=n.from+l.indexOf(s),f=d+s.length;if(lf(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&i.delete(n.from+c,d),u=n.from+c+s.length,i.addMark(n.from+c,u,e.type.create(a||{})),i.removeStoredMark(e.type)}}})}var Wo=P(ke(),1),lL=P(bd(),1);var{getOwnPropertyNames:aB,getOwnPropertySymbols:iB}=Object,{hasOwnProperty:sB}=Object.prototype;function Nb(e,t){return function(r,o,a){return e(r,o,a)&&t(r,o,a)}}function hf(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);let{cache:a}=o,i=a.get(n),s=a.get(r);if(i&&s)return i===r&&s===n;a.set(n,r),a.set(r,n);let l=e(n,r,o);return a.delete(n),a.delete(r),l}}function lB(e){return e?.[Symbol.toStringTag]}function WE(e){return aB(e).concat(iB(e))}var uB=Object.hasOwn||((e,t)=>sB.call(e,t));function $a(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var cB="__v",dB="__o",fB="_owner",{getOwnPropertyDescriptor:KE,keys:GE}=Object;function pB(e,t){return e.byteLength===t.byteLength&&mf(new Uint8Array(e),new Uint8Array(t))}function hB(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function mB(e,t){return e.byteLength===t.byteLength&&mf(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gB(e,t){return $a(e.getTime(),t.getTime())}function bB(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function xB(e,t){return e===t}function jE(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),a=e.entries(),i,s,l=0;for(;(i=a.next())&&!i.done;){let u=t.entries(),c=!1,d=0;for(;(s=u.next())&&!s.done;){if(o[d]){d++;continue}let f=i.value,p=s.value;if(n.equals(f[0],p[0],l,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;l++}return!0}var yB=$a;function kB(e,t,n){let r=GE(e),o=r.length;if(GE(t).length!==o)return!1;for(;o-- >0;)if(!JE(e,t,n,r[o]))return!1;return!0}function nu(e,t,n){let r=WE(e),o=r.length;if(WE(t).length!==o)return!1;let a,i,s;for(;o-- >0;)if(a=r[o],!JE(e,t,n,a)||(i=KE(e,a),s=KE(t,a),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function vB(e,t){return $a(e.valueOf(),t.valueOf())}function CB(e,t){return e.source===t.source&&e.flags===t.flags}function XE(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),a=e.values(),i,s;for(;(i=a.next())&&!i.done;){let l=t.values(),u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!o[c]&&n.equals(i.value,s.value,i.value,s.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function mf(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function wB(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function JE(e,t,n,r){return(r===fB||r===dB||r===cB)&&(e.$$typeof||t.$$typeof)?!0:uB(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var SB="[object ArrayBuffer]",EB="[object Arguments]",LB="[object Boolean]",IB="[object DataView]",_B="[object Date]",AB="[object Error]",TB="[object Map]",MB="[object Number]",NB="[object Object]",DB="[object RegExp]",RB="[object Set]",OB="[object String]",PB={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},BB="[object URL]",FB=Object.prototype.toString;function zB({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:h}){return function(b,g,x){if(b===g)return!0;if(b==null||g==null)return!1;let y=typeof b;if(y!==typeof g)return!1;if(y!=="object")return y==="number"?s(b,g,x):y==="function"?a(b,g,x):!1;let k=b.constructor;if(k!==g.constructor)return!1;if(k===Object)return l(b,g,x);if(Array.isArray(b))return t(b,g,x);if(k===Date)return r(b,g,x);if(k===RegExp)return c(b,g,x);if(k===Map)return i(b,g,x);if(k===Set)return d(b,g,x);let v=FB.call(b);if(v===_B)return r(b,g,x);if(v===DB)return c(b,g,x);if(v===TB)return i(b,g,x);if(v===RB)return d(b,g,x);if(v===NB)return typeof b.then!="function"&&typeof g.then!="function"&&l(b,g,x);if(v===BB)return p(b,g,x);if(v===AB)return o(b,g,x);if(v===EB)return l(b,g,x);if(PB[v])return f(b,g,x);if(v===SB)return e(b,g,x);if(v===IB)return n(b,g,x);if(v===LB||v===MB||v===OB)return u(b,g,x);if(h){let C=h[v];if(!C){let w=lB(b);w&&(C=h[w])}if(C)return C(b,g,x)}return!1}}function UB({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:pB,areArraysEqual:n?nu:hB,areDataViewsEqual:mB,areDatesEqual:gB,areErrorsEqual:bB,areFunctionsEqual:xB,areMapsEqual:n?Nb(jE,nu):jE,areNumbersEqual:yB,areObjectsEqual:n?nu:kB,arePrimitiveWrappersEqual:vB,areRegExpsEqual:CB,areSetsEqual:n?Nb(XE,nu):XE,areTypedArraysEqual:n?Nb(mf,nu):mf,areUrlsEqual:wB,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let o=hf(r.areArraysEqual),a=hf(r.areMapsEqual),i=hf(r.areObjectsEqual),s=hf(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:i,areSetsEqual:s})}return r}function HB(e){return function(t,n,r,o,a,i,s){return e(t,n,s)}}function qB({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(s,l){let{cache:u=e?new WeakMap:void 0,meta:c}=n();return t(s,l,{cache:u,equals:r,meta:c,strict:o})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};let a={cache:void 0,equals:r,meta:void 0,strict:o};return function(s,l){return t(s,l,a)}}var ZE=$o(),aK=$o({strict:!0}),iK=$o({circular:!0}),sK=$o({circular:!0,strict:!0}),lK=$o({createInternalComparator:()=>$a}),uK=$o({strict:!0,createInternalComparator:()=>$a}),cK=$o({circular:!0,createInternalComparator:()=>$a}),dK=$o({circular:!0,createInternalComparator:()=>$a,strict:!0});function $o(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,a=UB(e),i=zB(a),s=n?n(i):HB(i);return qB({circular:t,comparator:i,createState:r,equals:s,strict:o})}var Ko=P(ke(),1),uL=P(tL(),1),fL=P(Z(),1),ou=P(ke(),1),gL=P(Z(),1),xL=P(ke(),1),yL=P(Z(),1);var vL=P(ke(),1),Rb=P(ke(),1),CL=P(Wi(),1),wL=P(Z(),1),uF=P(Z(),1);var ps=P(ke(),1),SL=P(Z(),1),ZB=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},YB=({contentComponent:e})=>{let t=(0,iL.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Xr.jsx)(Xr.Fragment,{children:Object.values(t)})};function QB(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:aL.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var eF=class extends Vo.default.Component{constructor(e){var t;super(e),this.editorContentRef=Vo.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=QB(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)("div",{ref:ZB(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Xr.jsx)(YB,{contentComponent:e.contentComponent})]})}},tF=(0,Vo.forwardRef)((e,t)=>{let n=Vo.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Vo.default.createElement(eF,{key:n,innerRef:t,...e})}),sL=Vo.default.memo(tF),nF=typeof window<"u"?Ko.useLayoutEffect:Ko.useEffect,rF=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function Ob(e){var t;let[n]=(0,Ko.useState)(()=>new rF(e.editor)),r=(0,uL.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:ZE);return nF(()=>n.watch(e.editor),[e.editor,n]),(0,Ko.useDebugValue)(r),r}var nL=!1,Db=typeof window>"u",oF=Db||!!(typeof window<"u"&&window.next),aF=class cL{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Db||oF){if(nL)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Db&&nL)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,a;return(a=(o=this.options.current).onBeforeCreate)==null?void 0:a.call(o,...r)},onBlur:(...r)=>{var o,a;return(a=(o=this.options.current).onBlur)==null?void 0:a.call(o,...r)},onCreate:(...r)=>{var o,a;return(a=(o=this.options.current).onCreate)==null?void 0:a.call(o,...r)},onDestroy:(...r)=>{var o,a;return(a=(o=this.options.current).onDestroy)==null?void 0:a.call(o,...r)},onFocus:(...r)=>{var o,a;return(a=(o=this.options.current).onFocus)==null?void 0:a.call(o,...r)},onSelectionUpdate:(...r)=>{var o,a;return(a=(o=this.options.current).onSelectionUpdate)==null?void 0:a.call(o,...r)},onTransaction:(...r)=>{var o,a;return(a=(o=this.options.current).onTransaction)==null?void 0:a.call(o,...r)},onUpdate:(...r)=>{var o,a;return(a=(o=this.options.current).onUpdate)==null?void 0:a.call(o,...r)},onContentError:(...r)=>{var o,a;return(a=(o=this.options.current).onContentError)==null?void 0:a.call(o,...r)},onDrop:(...r)=>{var o,a;return(a=(o=this.options.current).onDrop)==null?void 0:a.call(o,...r)},onPaste:(...r)=>{var o,a;return(a=(o=this.options.current).onPaste)==null?void 0:a.call(o,...r)},onDelete:(...r)=>{var o,a;return(a=(o=this.options.current).onDelete)==null?void 0:a.call(o,...r)}};return new zE(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,a)=>{var i;return o===((i=n.extensions)==null?void 0:i[a])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?cL.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function dL(e={},t=[]){let n=(0,Wo.useRef)(e);n.current=e;let[r]=(0,Wo.useState)(()=>new aF(n)),o=(0,lL.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,Wo.useDebugValue)(o),(0,Wo.useEffect)(r.onRender(t)),Ob({editor:o,selector:({transactionNumber:a})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&a===0?0:a+1}),o}var pL=(0,ru.createContext)({editor:null}),bK=pL.Consumer,bf=()=>(0,ru.useContext)(pL);var hL=(0,ou.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var mL=()=>(0,ou.useContext)(hL);function bL({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=mL();return(0,gL.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var kL=xL.default.forwardRef((e,t)=>{let{onDragStart:n}=mL(),r=e.as||"div";return(0,yL.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function rL(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function oL(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function iF(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function sF(e){if(rL(e)||oL(e))return!0;if(iF(e)){let t=e.type;if(t)return rL(t)||oL(t)}return!1}function lF(){try{if(Rb.version)return parseInt(Rb.version.split(".")[0],10)>=19}catch{}return!1}var Pb=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,CL.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=lF(),a=sF(t),i={...n};i.ref&&!(o||a)&&delete i.ref,!i.ref&&(o||a)&&(i.ref=s=>{this.ref=s}),this.reactElement=(0,wL.jsx)(t,{...i}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},xK=vL.default.createContext({markViewContentRef:()=>{}});var cF=class extends VE{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:(0,ps.createRef)()};if(!this.component.displayName){let l=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=l(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},o=this.component,a=(0,ps.memo)(l=>(0,SL.jsx)(hL.Provider,{value:r,children:(0,ps.createElement)(o,l)}));a.displayName="ReactNodeView";let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);let{className:s=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Pb(a,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${s}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,a=this.decorations,i=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:i,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=ds(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function EL(e,t){return n=>n.editor.contentComponent?new cF(e,n,t):{}}var hs=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var dF=/^\s*>\s$/,LL=ee.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return hs("blockquote",{...re(this.options.HTMLAttributes,e),children:hs("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let s=t.renderChildren([o]).split(` +`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(s.join(` `))}),r.join(` ${n} -`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ur({find:jP,type:this.type})]}});var KP=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,GP=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,JP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,YP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,mC=et.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return da("strong",{...ne(this.options.HTMLAttributes,e),children:da("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[lr({find:KP,type:this.type}),lr({find:JP,type:this.type})]},addPasteRules(){return[Nn({find:GP,type:this.type}),Nn({find:YP,type:this.type})]}});var ZP=/(^|[^`])`([^`]+)`(?!`)$/,XP=/(^|[^`])`([^`]+)`(?!`)/g,gC=et.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[lr({find:ZP,type:this.type})]},addPasteRules(){return[Nn({find:XP,type:this.type})]}});var Eb=4,QP=/^```([a-z]+)?[\s\n]$/,e5=/^~~~([a-z]+)?[\s\n]$/,_b=ee.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Eb,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",ne(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` +`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[cr({find:dF,type:this.type})]}});var fF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,pF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,hF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,mF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,IL=et.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return hs("strong",{...re(this.options.HTMLAttributes,e),children:hs("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ur({find:fF,type:this.type}),ur({find:hF,type:this.type})]},addPasteRules(){return[An({find:pF,type:this.type}),An({find:mF,type:this.type})]}});var gF=/(^|[^`])`([^`]+)`(?!`)$/,bF=/(^|[^`])`([^`]+)`(?!`)/g,_L=et.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ur({find:gF,type:this.type})]},addPasteRules(){return[An({find:bF,type:this.type})]}});var Bb=4,xF=/^```([a-z]+)?[\s\n]$/,yF=/^~~~([a-z]+)?[\s\n]$/,Fb=ee.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Bb,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let a=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",re(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` `):r=`\`\`\`${o} -\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Eb,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let a=" ".repeat(n);return s?e.commands.insertContent(a):e.commands.command(({tr:l})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` +\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Bb,{state:r}=e,{selection:o}=r,{$from:a,empty:i}=o;if(a.parent.type!==this.type)return!1;let s=" ".repeat(n);return i?e.commands.insertContent(s):e.commands.command(({tr:l})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` `,` `).split(` -`).map(h=>a+h).join(` -`);return l.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Eb,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?e.commands.command(({tr:a})=>{var l;let{pos:u}=i,c=i.start(),d=i.end(),p=r.doc.textBetween(c,d,` +`).map(h=>s+h).join(` +`);return l.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Bb,{state:r}=e,{selection:o}=r,{$from:a,empty:i}=o;return a.parent.type!==this.type?!1:i?e.commands.command(({tr:s})=>{var l;let{pos:u}=a,c=a.start(),d=a.end(),p=r.doc.textBetween(c,d,` `,` `).split(` -`),h=0,m=0,b=u-c;for(let w=0;w=b){h=w;break}m+=p[w].length+1}let y=((l=p[h].match(/^ */))==null?void 0:l[0])||"",v=Math.min(y.length,n);if(v===0)return!0;let x=c;for(let w=0;w{let{from:l,to:u}=o,f=r.doc.textBetween(l,u,` +`),h=0,m=0,b=u-c;for(let C=0;C=b){h=C;break}m+=p[C].length+1}let x=((l=p[h].match(/^ */))==null?void 0:l[0])||"",y=Math.min(x.length,n);if(y===0)return!0;let k=c;for(let C=0;C{let{from:l,to:u}=o,f=r.doc.textBetween(l,u,` `,` `).split(` `).map(p=>{var h;let m=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(m.length,n);return p.slice(b)}).join(` -`);return a.replaceWith(l,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` +`);return s.replaceWith(l,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(` -`);return!i||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let a=o.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(G.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[Yl({find:QP,type:this.type,getAttributes:e=>({language:e[1]})}),Yl({find:e5,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new W({key:new X("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,` -`));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(q.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),bC=_b;var yC=ee.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`);return!a||!i?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:a}=n;if(!a||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let s=o.after();return s===void 0?!1:r.nodeAt(s)?e.commands.command(({tr:u})=>(u.setSelection(j.near(r.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[eu({find:xF,type:this.type,getAttributes:e=>({language:e[1]})}),eu({find:yF,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new W({key:new Y("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=o?.mode;if(!n||!a)return!1;let{tr:i,schema:s}=e.state,l=s.text(n.replace(/\r\n?/g,` +`));return i.replaceSelectionWith(this.type.create({language:a},l)),i.selection.$from.parent.type!==this.type&&i.setSelection($.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}}),AL=Fb;var TL=ee.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):""});var vC=ee.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",ne(this.options.HTMLAttributes,e)]},renderText(){return` +`):""});var ML=ee.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",re(this.options.HTMLAttributes,e)]},renderText(){return` `},renderMarkdown:()=>` -`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&s){let d=l.filter(f=>a.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var xC=ee.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,ne(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Yl({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var kC=ee.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",ne(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!CS(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return Xd(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:a})=>{if(a){let{$to:l}=s.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?s.setSelection(q.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection($.create(s.doc,l.pos)):s.setSelection(q.create(s.doc,l.pos));else{let c=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(q.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[SS({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var t5=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,n5=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,r5=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,o5=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,wC=et.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",ne(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[lr({find:t5,type:this.type}),lr({find:r5,type:this.type})]},addPasteRules(){return[Nn({find:n5,type:this.type}),Nn({find:o5,type:this.type})]}});var i5="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",s5="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Rb="numeric",Db="ascii",Ob="alpha",ru="asciinumeric",nu="alphanumeric",Ib="domain",AC="emoji",a5="scheme",l5="slashscheme",Sb="whitespace";function u5(e,t){return e in t||(t[e]=[]),t[e]}function Hi(e,t,n){t[Rb]&&(t[ru]=!0,t[nu]=!0),t[Db]&&(t[ru]=!0,t[Ob]=!0),t[ru]&&(t[nu]=!0),t[Ob]&&(t[nu]=!0),t[nu]&&(t[Ib]=!0),t[AC]&&(t[Ib]=!0);for(let r in t){let o=u5(r,n);o.indexOf(e)<0&&o.push(e)}}function c5(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Xt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Xt.groups={};Xt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),qe=(e,t,n,r,o)=>e.tr(t,n,r,o),EC=(e,t,n,r,o)=>e.ts(t,n,r,o),I=(e,t,n,r,o)=>e.tt(t,n,r,o),Zr="WORD",Lb="UWORD",MC="ASCIINUMERICAL",RC="ALPHANUMERICAL",uu="LOCALHOST",Pb="TLD",Bb="UTLD",cf="SCHEME",fa="SLASH_SCHEME",zb="NUM",Fb="WS",Ub="NL",ou="OPENBRACE",iu="CLOSEBRACE",df="OPENBRACKET",ff="CLOSEBRACKET",pf="OPENPAREN",hf="CLOSEPAREN",mf="OPENANGLEBRACKET",gf="CLOSEANGLEBRACKET",bf="FULLWIDTHLEFTPAREN",yf="FULLWIDTHRIGHTPAREN",vf="LEFTCORNERBRACKET",xf="RIGHTCORNERBRACKET",kf="LEFTWHITECORNERBRACKET",wf="RIGHTWHITECORNERBRACKET",Ef="FULLWIDTHLESSTHAN",_f="FULLWIDTHGREATERTHAN",Sf="AMPERSAND",Cf="APOSTROPHE",Tf="ASTERISK",Ko="AT",Nf="BACKSLASH",Af="BACKTICK",Mf="CARET",Go="COLON",Hb="COMMA",Rf="DOLLAR",cr="DOT",Df="EQUALS",$b="EXCLAMATION",Mn="HYPHEN",su="PERCENT",Of="PIPE",If="PLUS",Lf="POUND",au="QUERY",qb="QUOTE",DC="FULLWIDTHMIDDLEDOT",Vb="SEMI",dr="SLASH",lu="TILDE",Pf="UNDERSCORE",OC="EMOJI",Bf="SYM",IC=Object.freeze({__proto__:null,ALPHANUMERICAL:RC,AMPERSAND:Sf,APOSTROPHE:Cf,ASCIINUMERICAL:MC,ASTERISK:Tf,AT:Ko,BACKSLASH:Nf,BACKTICK:Af,CARET:Mf,CLOSEANGLEBRACKET:gf,CLOSEBRACE:iu,CLOSEBRACKET:ff,CLOSEPAREN:hf,COLON:Go,COMMA:Hb,DOLLAR:Rf,DOT:cr,EMOJI:OC,EQUALS:Df,EXCLAMATION:$b,FULLWIDTHGREATERTHAN:_f,FULLWIDTHLEFTPAREN:bf,FULLWIDTHLESSTHAN:Ef,FULLWIDTHMIDDLEDOT:DC,FULLWIDTHRIGHTPAREN:yf,HYPHEN:Mn,LEFTCORNERBRACKET:vf,LEFTWHITECORNERBRACKET:kf,LOCALHOST:uu,NL:Ub,NUM:zb,OPENANGLEBRACKET:mf,OPENBRACE:ou,OPENBRACKET:df,OPENPAREN:pf,PERCENT:su,PIPE:Of,PLUS:If,POUND:Lf,QUERY:au,QUOTE:qb,RIGHTCORNERBRACKET:xf,RIGHTWHITECORNERBRACKET:wf,SCHEME:cf,SEMI:Vb,SLASH:dr,SLASH_SCHEME:fa,SYM:Bf,TILDE:lu,TLD:Pb,UNDERSCORE:Pf,UTLD:Bb,UWORD:Lb,WORD:Zr,WS:Fb}),Jr=/[a-z]/,tu=/\p{L}/u,Cb=/\p{Emoji}/u;var Yr=/\d/,Tb=/\s/;var _C="\r",Nb=` -`,d5="\uFE0F",f5="\u200D",Ab="\uFFFC",af=null,lf=null;function p5(e=[]){let t={};Xt.groups=t;let n=new Xt;af==null&&(af=SC(i5)),lf==null&&(lf=SC(s5)),I(n,"'",Cf),I(n,"{",ou),I(n,"}",iu),I(n,"[",df),I(n,"]",ff),I(n,"(",pf),I(n,")",hf),I(n,"<",mf),I(n,">",gf),I(n,"\uFF08",bf),I(n,"\uFF09",yf),I(n,"\u300C",vf),I(n,"\u300D",xf),I(n,"\u300E",kf),I(n,"\u300F",wf),I(n,"\uFF1C",Ef),I(n,"\uFF1E",_f),I(n,"&",Sf),I(n,"*",Tf),I(n,"@",Ko),I(n,"`",Af),I(n,"^",Mf),I(n,":",Go),I(n,",",Hb),I(n,"$",Rf),I(n,".",cr),I(n,"=",Df),I(n,"!",$b),I(n,"-",Mn),I(n,"%",su),I(n,"|",Of),I(n,"+",If),I(n,"#",Lf),I(n,"?",au),I(n,'"',qb),I(n,"/",dr),I(n,";",Vb),I(n,"~",lu),I(n,"_",Pf),I(n,"\\",Nf),I(n,"\u30FB",DC);let r=qe(n,Yr,zb,{[Rb]:!0});qe(r,Yr,r);let o=qe(r,Jr,MC,{[ru]:!0}),i=qe(r,tu,RC,{[nu]:!0}),s=qe(n,Jr,Zr,{[Db]:!0});qe(s,Yr,o),qe(s,Jr,s),qe(o,Yr,o),qe(o,Jr,o);let a=qe(n,tu,Lb,{[Ob]:!0});qe(a,Jr),qe(a,Yr,i),qe(a,tu,a),qe(i,Yr,i),qe(i,Jr),qe(i,tu,i);let l=I(n,Nb,Ub,{[Sb]:!0}),u=I(n,_C,Fb,{[Sb]:!0}),c=qe(n,Tb,Fb,{[Sb]:!0});I(n,Ab,c),I(u,Nb,l),I(u,Ab,c),qe(u,Tb,c),I(c,_C),I(c,Nb),qe(c,Tb,c),I(c,Ab,c);let d=qe(n,Cb,OC,{[AC]:!0});I(d,"#"),qe(d,Cb,d),I(d,d5,d);let f=I(d,f5);I(f,"#"),qe(f,Cb,d);let p=[[Jr,s],[Yr,o]],h=[[Jr,null],[tu,a],[Yr,i]];for(let m=0;mm[0]>b[0]?1:-1);for(let m=0;m=0?y[Ib]=!0:Jr.test(b)?Yr.test(b)?y[ru]=!0:y[Db]=!0:y[Rb]=!0,EC(n,b,b,y)}return EC(n,"localhost",uu,{ascii:!0}),n.jd=new Xt(Bf),{start:n,tokens:Object.assign({groups:t},IC)}}function LC(e,t){let n=h5(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s=0&&(d+=n[s].length,f++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=f,u-=d,o.push({t:c.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function h5(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function jo(e,t,n,r,o){let i,s=t.length;for(let a=0;a=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}var cu={defaultProtocol:"http",events:null,format:CC,formatHref:CC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Wb(e,t=null){let n=Object.assign({},cu);e&&(n=Object.assign(n,e instanceof Wb?e.o:e));let r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=cu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:o,attributes:s,content:i,eventListeners:d}}};function Ff(e,t){class n extends PC{constructor(o,i){super(o,i),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var TC=Ff("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),NC=Ff("text"),m5=Ff("nl"),uf=Ff("url",{isLink:!0,toHref(e=cu.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==uu&&e[1].t===Go}});var An=e=>new Xt(e);function g5({groups:e}){let t=e.domain.concat([Sf,Tf,Ko,Nf,Af,Mf,Rf,Df,Mn,zb,su,Of,If,Lf,dr,Bf,lu,Pf]),n=[Cf,Go,Hb,cr,$b,su,au,qb,Vb,mf,gf,ou,iu,ff,df,pf,hf,bf,yf,vf,xf,kf,wf,Ef,_f],r=[Sf,Cf,Tf,Nf,Af,Mf,Rf,Df,Mn,ou,iu,su,Of,If,Lf,au,dr,Bf,lu,Pf],o=An(),i=I(o,lu);ae(i,r,i),ae(i,e.domain,i);let s=An(),a=An(),l=An();ae(o,e.domain,s),ae(o,e.scheme,a),ae(o,e.slashscheme,l),ae(s,r,i),ae(s,e.domain,s);let u=I(s,Ko);I(i,Ko,u),I(a,Ko,u),I(l,Ko,u);let c=I(i,cr);ae(c,r,i),ae(c,e.domain,i);let d=An();ae(u,e.domain,d),ae(d,e.domain,d);let f=I(d,cr);ae(f,e.domain,d);let p=An(TC);ae(f,e.tld,p),ae(f,e.utld,p),I(u,uu,p);let h=I(d,Mn);I(h,Mn,h),ae(h,e.domain,d),ae(p,e.domain,d),I(p,cr,f),I(p,Mn,h);let m=I(p,Go);ae(m,e.numeric,TC);let b=I(s,Mn),g=I(s,cr);I(b,Mn,b),ae(b,e.domain,s),ae(g,r,i),ae(g,e.domain,s);let y=An(uf);ae(g,e.tld,y),ae(g,e.utld,y),ae(y,e.domain,s),ae(y,r,i),I(y,cr,g),I(y,Mn,b),I(y,Ko,u);let v=I(y,Go),x=An(uf);ae(v,e.numeric,x);let k=An(uf),w=An();ae(k,t,k),ae(k,n,w),ae(w,t,k),ae(w,n,w),I(y,dr,k),I(x,dr,k);let E=I(a,Go),_=I(l,Go),T=I(_,dr),C=I(T,dr);ae(a,e.domain,s),I(a,cr,g),I(a,Mn,b),ae(l,e.domain,s),I(l,cr,g),I(l,Mn,b),ae(E,e.domain,k),I(E,dr,k),I(E,au,k),ae(C,e.domain,k),ae(C,t,k),I(C,dr,k);let U=[[ou,iu],[df,ff],[pf,hf],[mf,gf],[bf,yf],[vf,xf],[kf,wf],[Ef,_f]];for(let V=0;V=0&&f++,o++,c++;if(f<0)o-=c,o0&&(i.push(Mb(NC,t,s)),s=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);i.push(Mb(p,t,h))}}return s.length>0&&i.push(Mb(NC,t,s)),i}function Mb(e,t,n){let r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}var y5=typeof console<"u"&&console&&console.warn||(()=>{}),v5="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",De={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function BC(){return Xt.groups={},De.scanner=null,De.parser=null,De.tokenQueue=[],De.pluginQueue=[],De.customSchemes=[],De.initialized=!1,De}function jb(e,t=!1){if(De.initialized&&y5(`linkifyjs: already initialized - will not register custom scheme "${e}" ${v5}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. +`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:a}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,l=a||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&i){let d=l.filter(f=>s.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var NL=ee.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,re(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>eu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var DL=ee.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",re(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!HE(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return uf(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:a,tr:i,dispatch:s})=>{if(s){let{$to:l}=i.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection($.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection(q.create(i.doc,l.pos)):i.setSelection($.create(i.doc,l.pos));else{let c=a.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c?.create();d&&(i.insert(u,d),i.setSelection($.create(i.doc,u+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[UE({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var kF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,vF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,CF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,wF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,RL=et.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",re(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ur({find:kF,type:this.type}),ur({find:CF,type:this.type})]},addPasteRules(){return[An({find:vF,type:this.type}),An({find:wF,type:this.type})]}});var SF="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",EF="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Wb="numeric",Kb="ascii",Gb="alpha",su="asciinumeric",iu="alphanumeric",jb="domain",HL="emoji",LF="scheme",IF="slashscheme",zb="whitespace";function _F(e,t){return e in t||(t[e]=[]),t[e]}function Va(e,t,n){t[Wb]&&(t[su]=!0,t[iu]=!0),t[Kb]&&(t[su]=!0,t[Gb]=!0),t[su]&&(t[iu]=!0),t[Gb]&&(t[iu]=!0),t[iu]&&(t[jb]=!0),t[HL]&&(t[jb]=!0);for(let r in t){let o=_F(r,n);o.indexOf(e)<0&&o.push(e)}}function AF(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Qt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Qt.groups={};Qt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),$e=(e,t,n,r,o)=>e.tr(t,n,r,o),OL=(e,t,n,r,o)=>e.ts(t,n,r,o),R=(e,t,n,r,o)=>e.tt(t,n,r,o),Yr="WORD",Xb="UWORD",qL="ASCIINUMERICAL",$L="ALPHANUMERICAL",pu="LOCALHOST",Jb="TLD",Zb="UTLD",vf="SCHEME",ms="SLASH_SCHEME",Qb="NUM",Yb="WS",e1="NL",lu="OPENBRACE",uu="CLOSEBRACE",Cf="OPENBRACKET",wf="CLOSEBRACKET",Sf="OPENPAREN",Ef="CLOSEPAREN",Lf="OPENANGLEBRACKET",If="CLOSEANGLEBRACKET",_f="FULLWIDTHLEFTPAREN",Af="FULLWIDTHRIGHTPAREN",Tf="LEFTCORNERBRACKET",Mf="RIGHTCORNERBRACKET",Nf="LEFTWHITECORNERBRACKET",Df="RIGHTWHITECORNERBRACKET",Rf="FULLWIDTHLESSTHAN",Of="FULLWIDTHGREATERTHAN",Pf="AMPERSAND",Bf="APOSTROPHE",Ff="ASTERISK",jo="AT",zf="BACKSLASH",Uf="BACKTICK",Hf="CARET",Xo="COLON",t1="COMMA",qf="DOLLAR",dr="DOT",$f="EQUALS",n1="EXCLAMATION",Mn="HYPHEN",cu="PERCENT",Vf="PIPE",Wf="PLUS",Kf="POUND",du="QUERY",r1="QUOTE",VL="FULLWIDTHMIDDLEDOT",o1="SEMI",fr="SLASH",fu="TILDE",Gf="UNDERSCORE",WL="EMOJI",jf="SYM",KL=Object.freeze({__proto__:null,ALPHANUMERICAL:$L,AMPERSAND:Pf,APOSTROPHE:Bf,ASCIINUMERICAL:qL,ASTERISK:Ff,AT:jo,BACKSLASH:zf,BACKTICK:Uf,CARET:Hf,CLOSEANGLEBRACKET:If,CLOSEBRACE:uu,CLOSEBRACKET:wf,CLOSEPAREN:Ef,COLON:Xo,COMMA:t1,DOLLAR:qf,DOT:dr,EMOJI:WL,EQUALS:$f,EXCLAMATION:n1,FULLWIDTHGREATERTHAN:Of,FULLWIDTHLEFTPAREN:_f,FULLWIDTHLESSTHAN:Rf,FULLWIDTHMIDDLEDOT:VL,FULLWIDTHRIGHTPAREN:Af,HYPHEN:Mn,LEFTCORNERBRACKET:Tf,LEFTWHITECORNERBRACKET:Nf,LOCALHOST:pu,NL:e1,NUM:Qb,OPENANGLEBRACKET:Lf,OPENBRACE:lu,OPENBRACKET:Cf,OPENPAREN:Sf,PERCENT:cu,PIPE:Vf,PLUS:Wf,POUND:Kf,QUERY:du,QUOTE:r1,RIGHTCORNERBRACKET:Mf,RIGHTWHITECORNERBRACKET:Df,SCHEME:vf,SEMI:o1,SLASH:fr,SLASH_SCHEME:ms,SYM:jf,TILDE:fu,TLD:Jb,UNDERSCORE:Gf,UTLD:Zb,UWORD:Xb,WORD:Yr,WS:Yb}),Jr=/[a-z]/,au=/\p{L}/u,Ub=/\p{Emoji}/u;var Zr=/\d/,Hb=/\s/;var PL="\r",qb=` +`,TF="\uFE0F",MF="\u200D",$b="\uFFFC",xf=null,yf=null;function NF(e=[]){let t={};Qt.groups=t;let n=new Qt;xf==null&&(xf=BL(SF)),yf==null&&(yf=BL(EF)),R(n,"'",Bf),R(n,"{",lu),R(n,"}",uu),R(n,"[",Cf),R(n,"]",wf),R(n,"(",Sf),R(n,")",Ef),R(n,"<",Lf),R(n,">",If),R(n,"\uFF08",_f),R(n,"\uFF09",Af),R(n,"\u300C",Tf),R(n,"\u300D",Mf),R(n,"\u300E",Nf),R(n,"\u300F",Df),R(n,"\uFF1C",Rf),R(n,"\uFF1E",Of),R(n,"&",Pf),R(n,"*",Ff),R(n,"@",jo),R(n,"`",Uf),R(n,"^",Hf),R(n,":",Xo),R(n,",",t1),R(n,"$",qf),R(n,".",dr),R(n,"=",$f),R(n,"!",n1),R(n,"-",Mn),R(n,"%",cu),R(n,"|",Vf),R(n,"+",Wf),R(n,"#",Kf),R(n,"?",du),R(n,'"',r1),R(n,"/",fr),R(n,";",o1),R(n,"~",fu),R(n,"_",Gf),R(n,"\\",zf),R(n,"\u30FB",VL);let r=$e(n,Zr,Qb,{[Wb]:!0});$e(r,Zr,r);let o=$e(r,Jr,qL,{[su]:!0}),a=$e(r,au,$L,{[iu]:!0}),i=$e(n,Jr,Yr,{[Kb]:!0});$e(i,Zr,o),$e(i,Jr,i),$e(o,Zr,o),$e(o,Jr,o);let s=$e(n,au,Xb,{[Gb]:!0});$e(s,Jr),$e(s,Zr,a),$e(s,au,s),$e(a,Zr,a),$e(a,Jr),$e(a,au,a);let l=R(n,qb,e1,{[zb]:!0}),u=R(n,PL,Yb,{[zb]:!0}),c=$e(n,Hb,Yb,{[zb]:!0});R(n,$b,c),R(u,qb,l),R(u,$b,c),$e(u,Hb,c),R(c,PL),R(c,qb),$e(c,Hb,c),R(c,$b,c);let d=$e(n,Ub,WL,{[HL]:!0});R(d,"#"),$e(d,Ub,d),R(d,TF,d);let f=R(d,MF);R(f,"#"),$e(f,Ub,d);let p=[[Jr,i],[Zr,o]],h=[[Jr,null],[au,s],[Zr,a]];for(let m=0;mm[0]>b[0]?1:-1);for(let m=0;m=0?x[jb]=!0:Jr.test(b)?Zr.test(b)?x[su]=!0:x[Kb]=!0:x[Wb]=!0,OL(n,b,b,x)}return OL(n,"localhost",pu,{ascii:!0}),n.jd=new Qt(jf),{start:n,tokens:Object.assign({groups:t},KL)}}function GL(e,t){let n=DF(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,o=[],a=0,i=0;for(;i=0&&(d+=n[i].length,f++),u+=n[i].length,a+=n[i].length,i++;a-=d,i-=f,u-=d,o.push({t:c.t,v:t.slice(a-u,a),s:a-u,e:a})}return o}function DF(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}function Go(e,t,n,r,o){let a,i=t.length;for(let s=0;s=0;)a++;if(a>0){t.push(n.join(""));for(let i=parseInt(e.substring(r,r+a),10);i>0;i--)n.pop();r+=a}else n.push(e[r]),r++}return t}var hu={defaultProtocol:"http",events:null,format:FL,formatHref:FL,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function a1(e,t=null){let n=Object.assign({},hu);e&&(n=Object.assign(n,e instanceof a1?e.o:e));let r=n.ignoreTags,o=[];for(let a=0;an?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=hu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),a=this.toFormattedString(e),i={},s=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return i.href=r,s&&(i.class=s),l&&(i.target=l),u&&(i.rel=u),c&&Object.assign(i,c),{tagName:o,attributes:i,content:a,eventListeners:d}}};function Xf(e,t){class n extends jL{constructor(o,a){super(o,a),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var zL=Xf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),UL=Xf("text"),RF=Xf("nl"),kf=Xf("url",{isLink:!0,toHref(e=hu.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==pu&&e[1].t===Xo}});var Tn=e=>new Qt(e);function OF({groups:e}){let t=e.domain.concat([Pf,Ff,jo,zf,Uf,Hf,qf,$f,Mn,Qb,cu,Vf,Wf,Kf,fr,jf,fu,Gf]),n=[Bf,Xo,t1,dr,n1,cu,du,r1,o1,Lf,If,lu,uu,wf,Cf,Sf,Ef,_f,Af,Tf,Mf,Nf,Df,Rf,Of],r=[Pf,Bf,Ff,zf,Uf,Hf,qf,$f,Mn,lu,uu,cu,Vf,Wf,Kf,du,fr,jf,fu,Gf],o=Tn(),a=R(o,fu);se(a,r,a),se(a,e.domain,a);let i=Tn(),s=Tn(),l=Tn();se(o,e.domain,i),se(o,e.scheme,s),se(o,e.slashscheme,l),se(i,r,a),se(i,e.domain,i);let u=R(i,jo);R(a,jo,u),R(s,jo,u),R(l,jo,u);let c=R(a,dr);se(c,r,a),se(c,e.domain,a);let d=Tn();se(u,e.domain,d),se(d,e.domain,d);let f=R(d,dr);se(f,e.domain,d);let p=Tn(zL);se(f,e.tld,p),se(f,e.utld,p),R(u,pu,p);let h=R(d,Mn);R(h,Mn,h),se(h,e.domain,d),se(p,e.domain,d),R(p,dr,f),R(p,Mn,h);let m=R(p,Xo);se(m,e.numeric,zL);let b=R(i,Mn),g=R(i,dr);R(b,Mn,b),se(b,e.domain,i),se(g,r,a),se(g,e.domain,i);let x=Tn(kf);se(g,e.tld,x),se(g,e.utld,x),se(x,e.domain,i),se(x,r,a),R(x,dr,g),R(x,Mn,b),R(x,jo,u);let y=R(x,Xo),k=Tn(kf);se(y,e.numeric,k);let v=Tn(kf),C=Tn();se(v,t,v),se(v,n,C),se(C,t,v),se(C,n,C),R(x,fr,v),R(k,fr,v);let w=R(s,Xo),S=R(l,Xo),I=R(S,fr),L=R(I,fr);se(s,e.domain,i),R(s,dr,g),R(s,Mn,b),se(l,e.domain,i),R(l,dr,g),R(l,Mn,b),se(w,e.domain,v),R(w,fr,v),R(w,du,v),se(L,e.domain,v),se(L,t,v),R(L,fr,v);let U=[[lu,uu],[Cf,wf],[Sf,Ef],[Lf,If],[_f,Af],[Tf,Mf],[Nf,Df],[Rf,Of]];for(let V=0;V=0&&f++,o++,c++;if(f<0)o-=c,o0&&(a.push(Vb(UL,t,i)),i=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);a.push(Vb(p,t,h))}}return i.length>0&&a.push(Vb(UL,t,i)),a}function Vb(e,t,n){let r=n[0].s,o=n[n.length-1].e,a=t.slice(r,o);return new e(a,n)}var BF=typeof console<"u"&&console&&console.warn||(()=>{}),FF="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ne={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function XL(){return Qt.groups={},Ne.scanner=null,Ne.parser=null,Ne.tokenQueue=[],Ne.pluginQueue=[],Ne.customSchemes=[],Ne.initialized=!1,Ne}function i1(e,t=!1){if(Ne.initialized&&BF(`linkifyjs: already initialized - will not register custom scheme "${e}" ${FF}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);De.customSchemes.push([e,t])}function x5(){De.scanner=p5(De.customSchemes);for(let e=0;e{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,a=lb(n.doc,[...t]);if(hb(a).forEach(({newRange:u})=>{let c=eS(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!w5.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(k5).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=zf(h).map(g=>g.toObject(e.defaultProtocol));if(!_5(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{Zd(g.from,g.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function C5(e){return new W({key:new X("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;a=f.find(p=>p.nodeName==="A")}if(!a)return s;let l=pb(t.state,e.type.name),u=(o=a?.href)!=null?o:l.href,c=(i=a?.target)!=null?i:l.target;a&&u&&(window.open(u,c),s=!0)}return s}}})}function T5(e){return new W({key:new X("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:i}=t,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let u=Uf(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function $i(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(E5,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Gb=et.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){jb(e);return}jb(e.scheme,e.optionalSlashes)})},onDestroy(){BC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!$i(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!$i(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!$i(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ne(this.options.HTMLAttributes,e),0]:["a",ne(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!$i(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!$i(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Nn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=Uf(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!$i(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(S5({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!$i(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(C5({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(T5({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),FC=Gb;var N5=Object.defineProperty,A5=(e,t)=>{for(var n in t)N5(e,n,{get:t[n],enumerable:!0})},M5="listItem",zC="textStyle",UC=/^\s*([-+*])\s$/,Zb=ee.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(M5,this.editor.getAttributes(zC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=ur({find:UC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=ur({find:UC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(zC),editor:this.editor})),[e]}}),Xb=ee.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=e.tokens.slice(1),a=t.parseChildren(s);n.push(...a)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>Zl(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),R5={};A5(R5,{findListItemPos:()=>du,getNextListDepth:()=>Qb,handleBackspace:()=>Jb,handleDelete:()=>Yb,hasListBefore:()=>VC,hasListItemAfter:()=>D5,hasListItemBefore:()=>WC,listItemHasSubList:()=>jC,nextListIsDeeper:()=>KC,nextListIsHigher:()=>GC});var du=(e,t)=>{let{$from:n}=t.selection,r=$e(e,t.schema),o=null,i=n.depth,s=n.pos,a=null;for(;i>0&&a===null;)o=n.node(i),o.type===r?a=i:(i-=1,s-=1);return a===null?null:{$pos:t.doc.resolve(s),depth:a}},Qb=(e,t)=>{let n=du(e,t);if(!n)return!1;let[,r]=iS(t,e,n.$pos.pos+4);return r},VC=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},WC=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},jC=(e,t,n)=>{if(!n)return!1;let r=$e(e,t.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},Jb=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!ar(e.state,t)&&VC(e.state,t,n)){let{$anchor:a}=e.state.selection,l=e.state.doc.resolve(a.before()-1),u=[];l.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(l.start()+c.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!ar(e.state,t)||!aS(e.state))return!1;let r=du(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=jC(t,e.state,i);return WC(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},KC=(e,t)=>{let n=Qb(e,t),r=du(e,t);return!r||!n?!1:n>r.depth},GC=(e,t)=>{let n=Qb(e,t),r=du(e,t);return!r||!n?!1:n{if(!ar(e.state,t)||!sS(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:KC(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():GC(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},D5=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},e1=oe.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&Yb(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&Yb(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&Jb(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&Jb(e,n,r)&&(t=!0)}),t}}}}),HC=/^(\s*)(\d+)\.\s+(.*)$/,O5=/^\s/;function I5(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=JC(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` -`)})}o.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return o}function L5(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=t.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=t.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var P5="listItem",$C="textStyle",qC=/^(\d+)\.\s$/,t1=ee.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",ne(this.options.HTMLAttributes,n),0]:["ol",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?L5(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +3. "-" cannot repeat`);Ne.customSchemes.push([e,t])}function zF(){Ne.scanner=NF(Ne.customSchemes);for(let e=0;e{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),a=t.some(u=>u.getMeta("preventAutolink"));if(!o||a)return;let{tr:i}=r,s=vb(n.doc,[...t]);if(Ib(s).forEach(({newRange:u})=>{let c=mE(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!HF.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(UF).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=Jf(h).map(g=>g.toObject(e.defaultProtocol));if(!$F(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{lf(g.from,g.to,r.doc).some(x=>x.mark.type===e.type)||i.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!i.steps.length)return i}})}function WF(e){return new W({key:new Y("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,a;if(r.button!==0||!t.editable)return!1;let i=!1;if(e.enableClickSelection&&(i=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;s=f.find(p=>p.nodeName==="A")}if(!s)return i;let l=Lb(t.state,e.type.name),u=(o=s?.href)!=null?o:l.href,c=(a=s?.target)!=null?a:l.target;s&&u&&(window.open(u,c),i=!0)}return i}}})}function KF(e){return new W({key:new Y("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:a}=t,{selection:i}=a,{empty:s}=i;if(s)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let u=Zf(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function Wa(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(qF,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var l1=et.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){i1(e);return}i1(e.scheme,e.optionalSlashes)})},onDestroy(){XL()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Wa(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Wa(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Wa(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",re(this.options.HTMLAttributes,e),0]:["a",re(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Wa(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Wa(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[An({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=Zf(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:i=>!!Wa(i,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(a=>{this.options.shouldAutoLink(a.value)&&t.push({text:a.value,data:{href:a.href},index:a.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(VF({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Wa(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(WF({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(KF({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),JL=l1;var GF=Object.defineProperty,jF=(e,t)=>{for(var n in t)GF(e,n,{get:t[n],enumerable:!0})},XF="listItem",ZL="textStyle",YL=/^\s*([-+*])\s$/,d1=ee.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(XF,this.editor.getAttributes(ZL)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=cr({find:YL,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=cr({find:YL,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ZL),editor:this.editor})),[e]}}),f1=ee.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let i=e.tokens.slice(1),s=t.parseChildren(i);n.push(...s)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>tu(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),JF={};jF(JF,{findListItemPos:()=>mu,getNextListDepth:()=>p1,handleBackspace:()=>u1,handleDelete:()=>c1,hasListBefore:()=>nI,hasListItemAfter:()=>ZF,hasListItemBefore:()=>rI,listItemHasSubList:()=>oI,nextListIsDeeper:()=>aI,nextListIsHigher:()=>iI});var mu=(e,t)=>{let{$from:n}=t.selection,r=qe(e,t.schema),o=null,a=n.depth,i=n.pos,s=null;for(;a>0&&s===null;)o=n.node(a),o.type===r?s=a:(a-=1,i-=1);return s===null?null:{$pos:t.doc.resolve(i),depth:s}},p1=(e,t)=>{let n=mu(e,t);if(!n)return!1;let[,r]=kE(t,e,n.$pos.pos+4);return r},nI=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),a=e.doc.resolve(o).node();return!(!a||!n.includes(a.type.name))},rI=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},oI=(e,t,n)=>{if(!n)return!1;let r=qe(e,t.schema),o=!1;return n.descendants(a=>{a.type===r&&(o=!0)}),o},u1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!lr(e.state,t)&&nI(e.state,t,n)){let{$anchor:s}=e.state.selection,l=e.state.doc.resolve(s.before()-1),u=[];l.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(l.start()+c.pos+1);return e.chain().cut({from:s.start()-1,to:s.end()+1},d.end()).joinForward().run()}if(!lr(e.state,t)||!CE(e.state))return!1;let r=mu(t,e.state);if(!r)return!1;let a=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),i=oI(t,e.state,a);return rI(t,e.state)&&!i?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},aI=(e,t)=>{let n=p1(e,t),r=mu(e,t);return!r||!n?!1:n>r.depth},iI=(e,t)=>{let n=p1(e,t),r=mu(e,t);return!r||!n?!1:n{if(!lr(e.state,t)||!vE(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:aI(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():iI(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},ZF=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},h1=ae.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&c1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&c1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&u1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&u1(e,n,r)&&(t=!0)}),t}}}}),QL=/^(\s*)(\d+)\.\s+(.*)$/,YF=/^\s/;function QF(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=sI(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` +`)})}o.push({type:"list_item",raw:i.raw,tokens:u}),a=d}else a+=1}return o}function e8(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let a=t.parseChildren([o]);r.push({type:"paragraph",content:a})}else{let a=t.parseChildren([o]);a.length>0&&r.push(...a)}}),{type:"listItem",content:r}})}var t8="listItem",eI="textStyle",tI=/^(\d+)\.\s$/,m1=ee.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",re(this.options.HTMLAttributes,n),0]:["ol",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?e8(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` `):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=t?.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;let o=e.split(` -`),[i,s]=I5(o);if(i.length===0)return;let a=JC(i,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:a,raw:o.slice(0,s).join(` -`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(P5,this.editor.getAttributes($C)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=ur({find:qC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=ur({find:qC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes($C)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),B5=/^\s*(\[([( |x])?\])\s$/,Hf=ee.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",ne(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return Zl(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),u=c=>{var d,f;a.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,a.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,i.append(a,s),o.append(i,l),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,a.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[ur({find:B5,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),$f=ee.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",ne(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=i=>{let s=nf(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=nf(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Vj=oe.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(Zb.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Xb.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(e1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(t1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Hf.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push($f.configure(this.options.taskList)),e}});var YC=ee.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",ne(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var F5=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,z5=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,ZC=et.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[lr({find:F5,type:this.type})]},addPasteRules(){return[Nn({find:z5,type:this.type})]}});var XC=ee.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var QC=et.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",ne(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function eT(e={}){return new W({view(t){return new n1(t,e)}})}var n1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,a=i.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*a;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-c)/a+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=yd(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var Dt=class e extends G{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):G.near(r)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new r1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!U5(t)||!H5(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)0){i=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!$.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=t.doc.resolve(o);if(e.valid(a))return a}return null}}};Dt.prototype.visible=!1;Dt.findFrom=Dt.findGapCursorFrom;G.jsonID("gapcursor",Dt);var r1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Dt.valid(n)?new Dt(n):G.near(n)}};function tT(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function U5(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||tT(o.type))return!0;if(o.inlineContent)return!1}}return!0}function H5(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||tT(o.type))return!0;if(o.inlineContent)return!1}}return!0}function nT(){return new W({props:{decorations:W5,createSelectionBetween(e,t,n){return t.pos==n.pos&&Dt.valid(n)?new Dt(n):null},handleClick:q5,handleKeyDown:$5,handleDOMEvents:{beforeinput:V5}}})}var $5=Kl({ArrowLeft:qf("horiz",-1),ArrowRight:qf("horiz",1),ArrowUp:qf("vert",-1),ArrowDown:qf("vert",1)});function qf(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof q){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Dt.findGapCursorFrom(a,t,l);return u?(o&&o(r.tr.setSelection(new Dt(u))),!0):!1}}function q5(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Dt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&$.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Dt(r))),!0)}function V5(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Dt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=N.empty;for(let s=r.length-1;s>=0;s--)o=N.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new B(o,0,0));return i.setSelection(q.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function W5(e){if(!(e.selection instanceof Dt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",ke.create(e.doc,[Ie.widget(e.selection.head,t,{key:"gapcursor"})])}var Vf=200,gt=function(){};gt.prototype.append=function(t){return t.length?(t=gt.from(t),!this.length&&t||t.length=n?gt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};gt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};gt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};gt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};gt.from=function(t){return t instanceof gt?t:t&&t.length?new rT(t):gt.empty};var rT=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var l=i;l=s;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=Vf)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=Vf)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(gt);gt.empty=new rT([]);var j5=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(gt),o1=gt;var K5=500,Vi=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new fr(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new fr(h,void 0,void 0,u.length+c.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let c=0;cJ5&&(a=G5(a,u),s-=u),new e(a.append(i),s)}remapping(t,n){let r=new Ol;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new fr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(l+1,p));b&&a++,r.push(new fr(h,m,b))}else r.push(new fr(h))},o);let u=[];for(let f=n;fK5&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new fr(u.invert(),l,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new e(o1.from(o.reverse()),i)}};Vi.empty=new Vi(o1.empty,0);function G5(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var fr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},pr=class{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},J5=20;function Y5(e,t,n,r){let o=n.getMeta(qi),i;if(o)return o.historyState;n.getMeta(Q5)&&(e=new pr(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(qi))return s.getMeta(qi).redo?new pr(e.done.addTransform(n,void 0,r,Wf(t)),e.undone,oT(n.mapping.maps),e.prevTime,e.prevComposition):new pr(e.done,e.undone.addTransform(n,void 0,r,Wf(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Z5(n,e.prevRanges)),u=s?i1(e.prevRanges,n.mapping):oT(n.mapping.maps);return new pr(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Wf(t)),Vi.empty,u,n.time,a??e.prevComposition)}else return(i=n.getMeta("rebased"))?new pr(e.done.rebased(n,i),e.undone.rebased(n,i),i1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new pr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),i1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Z5(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function oT(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,s)=>t.push(i,s));return t}function i1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=qi.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=X5(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}var a1=jf(!1,!0),l1=jf(!0,!0),gK=jf(!1,!1),bK=jf(!0,!1);var EK=oe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new W({key:new X("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>o){let s=i-o,a=0,l=s,u=r.tr.deleteRange(a,l);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;let a=t.selection.$head.pos,l=i-r,u=a-l,c=a;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),lT=oe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[eT(this.options)]}}),AK=oe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new W({key:new X("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return ke.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(o>=u&&o<=u+l.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((l,u)=>{if(l.isText||!(o>=u&&o<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(Ie.node(u,u+l.nodeSize,{class:this.options.className}))}),ke.create(e,i)}}})]}}),uT=oe.create({name:"gapCursor",addProseMirrorPlugins(){return[nT()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=he(J(e,"allowGapCursor",n)))!=null?t:null}}}),u1=oe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new W({key:new X("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let i=this.editor.isEmpty;return e.descendants((s,a)=>{let l=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&Jl(s);if((l||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];i&&c.push(this.options.emptyEditorClass);let d=Ie.node(a,a+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),ke.create(e,o)}}})]}}),FK=oe.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new W({key:new X("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Xd(n.selection)||e.view.dragging?null:ke.create(n.doc,[Ie.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function aT({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var cT=oe.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new X(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new W({key:t,appendTransaction:(o,i,s)=>{let{doc:a,tr:l,schema:u}=s,c=t.getState(s),d=a.content.size,f=u.nodes[n];if(c)return l.insert(d,f.create())},state:{init:(o,i)=>{let s=i.tr.doc.lastChild;return!aT({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;let s=o.doc.lastChild;return!aT({node:s,types:r})}}})]}}),dT=oe.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>a1(e,t),redo:()=>({state:e,dispatch:t})=>l1(e,t)}},addProseMirrorPlugins(){return[sT(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var eB=oe.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(mC.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(hC.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(Zb.configure(this.options.bulletList)),this.options.code!==!1&&o.push(gC.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(_b.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(yC.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(lT.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(uT.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(vC.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(xC.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(dT.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(kC.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(wC.configure(this.options.italic)),this.options.listItem!==!1&&o.push(Xb.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(e1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(Gb.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(t1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(YC.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(ZC.configure(this.options.strike)),this.options.text!==!1&&o.push(XC.configure(this.options.text)),this.options.underline!==!1&&o.push(QC.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(cT.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),fT=eB;var pT=u1;var hT=$f;var mT=Hf;var d1,f1;if(typeof WeakMap<"u"){let e=new WeakMap;d1=t=>e.get(t),f1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;d1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var Ve=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:g-v});break}let x=o+v*t;for(let k=0;kr&&(i+=u.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function rB(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function iB(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function jn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Xf(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=pa(t.$head)||sB(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function sB(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function p1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function aB(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function g1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function ST(e,t,n){let r=e.node(-1),o=Ve.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return s==null?null:e.node(0).resolve(i+s)}function Wi(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function CT(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-i);l.unshift(n.pos-i);let u=l.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=i+c+1;return new Zs(a.resolve(f),a.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(p1(r)&&p1(o)&&g1(r,o)){let i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Xr.rowSelection(r,o):i&&this.isColSelection()?Xr.colSelection(r,o):new Xr(r,o)}return q.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=Ve.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let l=o.top;l0||b>0){let g=h.attrs;if(m>0&&(g=Wi(g,0,m)),b>0&&(g=Wi(g,g.colspan-b,b)),p.lefto.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=Ve.get(r),i=t.start(-1),s=o.findCell(t.pos-i),a=o.findCell(n.pos-i),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(i+o.map[s.left])),a.bottom0&&(n=l.resolve(i+o.map[a.left])),s.bottom0)return!1;let s=o+this.$anchorCell.nodeAfter.attrs.colspan,a=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof Xr&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=Ve.get(r),i=t.start(-1),s=o.findCell(t.pos-i),a=o.findCell(n.pos-i),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(i+o.map[s.top*o.width])),a.right0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right{t.push(Ie.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ke.create(e.doc,t)}function dB({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function fB({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){let i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function pB(e,t,n){let r=(t||e).selection,o=(t||e).doc,i,s;if(r instanceof $&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=ge.create(o,r.from);else if(s=="row"){let a=o.resolve(r.from+1);i=ge.rowSelection(a,a)}else if(!n){let a=Ve.get(r.node),l=r.from+1,u=l+a.map[a.width*a.height-1];i=ge.create(o,l+1,u)}}else r instanceof q&&dB(r)?i=q.create(o,r.from):r instanceof q&&fB(r)&&(i=q.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var hB=new X("fix-tables");function NT(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let s=0,a=0;s{o.type.spec.tableRole=="table"&&(n=mB(e,o,i,n))};return t?t.doc!=e.doc&&NT(t.doc,e.doc,0,r):e.doc.descendants(r),n}function mB(e,t,n,r){let o=Ve.get(t);if(!o.problems)return r;r||(r=e.tr);let i=[];for(let l=0;l0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;lB(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let s=0;s0&&o0&&t.map[a-1]==l||o0?-1:0;bB(t,r,o+a)&&(a=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=l+1+u.content.size,d=gT(u)?l+1:c;i.replaceWith(d+r.tableStart,c+r.tableStart,a)}i.setSelection(new ge(i.doc.resolve(l+r.tableStart))),t(i)}return!0}function v1(e,t){let n=Ot(e.schema);return xB(({node:r})=>n[r.type.spec.tableRole])(e,t)}function xB(e){return(t,n)=>{let r=t.selection,o,i;if(r instanceof ge){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=iB(r.$from),!o)return!1;i=(s=pa(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let a=o.attrs,l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=hr(t),d=t.tr;for(let p=0;p{s.attrs[e]!==t&&i.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function kB(e){return function(t,n){if(!jn(t))return!1;if(n){let r=Ot(t.schema),o=hr(t),i=t.tr,s=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map(l=>o.table.nodeAt(l));for(let l=0;l{let p=f+i.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),r(s)}return!0}}var wG=ha("row",{useDeprecatedLogic:!0}),EG=ha("column",{useDeprecatedLogic:!0}),FT=ha("cell",{useDeprecatedLogic:!0});function wB(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let i=e.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Kf(e,t){let n=e.selection;if(!(n instanceof ge))return!1;if(t){let r=e.tr,o=Ot(e.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new B(o,0,0))}),r.docChanged&&t(r)}return!0}function EB(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if(i=="row")for(let l=0;l=0;s--){let{rowspan:a,colspan:l}=i.child(s).attrs;for(let u=o;u=t.length&&t.push(N.empty),n[o]r&&(f=f.type.createChecked(Wi(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}i.push(N.from(l))}n=i,t=o}return{width:e,height:t,rows:n}}function CB(e,t,n,r,o,i,s){let a=e.doc.type.schema,l=Ot(a),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(b?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,N.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let i=n.selection;if(i instanceof ge)return Yf(n,r,G.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;let s=UT(o,e,t);if(s==null)return!1;if(e=="horiz")return Yf(n,r,G.near(n.doc.resolve(i.head+t),t));{let a=n.doc.resolve(s),l=ST(a,e,t),u;return l?u=G.near(l,1):t<0?u=G.near(n.doc.resolve(a.before(-1)),-1):u=G.near(n.doc.resolve(a.after(-1)),1),Yf(n,r,u)}}}function Jf(e,t){return(n,r,o)=>{if(!o)return!1;let i=n.selection,s;if(i instanceof ge)s=i;else{let l=UT(o,e,t);if(l==null)return!1;s=new ge(n.doc.resolve(l))}let a=ST(s.$headCell,e,t);return a?Yf(n,r,new ge(s.$anchorCell,a)):!1}}function NB(e,t){let n=e.state.doc,r=pa(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new ge(r))),!0):!1}function AB(e,t,n){if(!jn(e.state))return!1;let r=EB(n),o=e.state.selection;if(o instanceof ge){r||(r={width:1,height:1,rows:[N.from(h1(Ot(e.state.schema).cell,n))]});let i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=Ve.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=SB(r,a.right-a.left,a.bottom-a.top),xT(e.state,e.dispatch,s,a,r),!0}else if(r){let i=Xf(e.state),s=i.start(-1);return xT(e.state,e.dispatch,s,Ve.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function MB(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=kT(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof ge)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=pa(e.state.selection.$anchor))!=null&&((n=c1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(l,u){let c=c1(e,u),d=Jo.getState(e.state)==null;if(!c||!g1(l,c))if(d)c=l;else return;let f=new ge(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Jo,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Jo.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Jo,-1))}function a(l){let u=l,c=Jo.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(kT(e,u.target)!=r&&(d=c1(e,t),!d))return s();d&&i(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function UT(e,t,n){if(!(e.state.selection instanceof q))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){let s=r.before(o),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function kT(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function c1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return pa(e.state.doc.resolve(r))}var RB=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),m1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,m1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function m1(e,t,n,r,o,i){let s=0,a=!0,l=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new DB(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{let a=dn.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{OB(s,a,e,o)},mouseleave:s=>{IB(s)},mousedown:(s,a)=>{LB(s,a,t,n)}},decorations:s=>{let a=dn.getState(s);if(a&&a.activeHandle>-1)return UB(s,a.activeHandle)},nodeViews:{}}});return i}var DB=class Zf{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(dn);if(r&&r.setHandle!=null)return new Zf(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Zf(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return p1(t.doc.resolve(o))||(o=-1),new Zf(o,n.dragging)}return n}};function OB(e,t,n,r){if(!e.editable)return;let o=dn.getState(e.state);if(o&&!o.dragging){let i=BB(t.target),s=-1;if(i){let{left:a,right:l}=i.getBoundingClientRect();t.clientX-a<=n?s=wT(e,t,"left",n):l-t.clientX<=n&&(s=wT(e,t,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){let a=e.state.doc.resolve(s),l=a.node(-1),u=Ve.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}$T(e,s)}}}function IB(e){if(!e.editable)return;let t=dn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$T(e,-1)}function LB(e,t,n,r){var o;if(!e.editable)return!1;let i=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=dn.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let a=e.state.doc.nodeAt(s.activeHandle),l=PB(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(dn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",c);let f=dn.getState(e.state);f?.dragging&&(FB(e,f.activeHandle,ET(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(dn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=dn.getState(e.state);if(f&&f.dragging){let p=ET(f.dragging,d,n);_T(e,f.activeHandle,p,r)}}return _T(e,s.activeHandle,l,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",c),t.preventDefault(),!0}function PB(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let l=0;l{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){let i=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&i&&i[s]){let a=i[s].getAttribute("width");return a?[parseInt(a,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",ne(this.options.HTMLAttributes,e),0]}}),E1=ee.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",ne(this.options.HTMLAttributes,e),0]}}),_1=ee.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",ne(this.options.HTMLAttributes,e),0]}});function k1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function VT(e,t,n,r,o,i){var s;let a=0,l=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function VB(e,t,n,r,o){let i=qB(e),s=[],a=[];for(let u=0;u{let{selection:t}=e.state;if(!WB(t))return!1;let n=0,r=ub(t.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},jB="";function KB(e){return(e||"").replace(/\s+/g," ").trim()}function GB(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:jB;if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(b=>{let g="";b.content&&Array.isArray(b.content)&&b.content.length>1?g=b.content.map(k=>t.renderChildren(k)).join(o):g=b.content?t.renderChildren(b.content):"";let y=KB(g),v=b.type==="tableHeader";m.push({text:y,isHeader:v})}),i.push(m)});let s=i.reduce((h,m)=>Math.max(h,m.length),0);if(s===0)return"";let a=new Array(s).fill(0);i.forEach(h=>{var m;for(let b=0;ba[b]&&(a[b]=y),a[b]<3&&(a[b]=3)}});let l=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=i[0],c=u.some(h=>h.isHeader),d=` -`,f=new Array(s).fill(0).map((h,m)=>c&&u[m]&&u[m].text||"");return d+=`| ${f.map((h,m)=>l(h,a[m])).join(" | ")} | -`,d+=`| ${a.map(h=>"-".repeat(Math.max(3,h))).join(" | ")} | -`,(c?i.slice(1):i).forEach(h=>{d+=`| ${new Array(s).fill(0).map((m,b)=>l(h[b]&&h[b].text||"",a[b])).join(" | ")} | -`}),d}var JB=GB,S1=ee.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:HB,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=$B(e,this.options.cellMinWidth),i=t.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let a=["table",ne(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(i.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>JB(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=VB(i.schema,e,t,n);if(o){let a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(q.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>MT(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>RT(e,t),deleteColumn:()=>({state:e,dispatch:t})=>DT(e,t),addRowBefore:()=>({state:e,dispatch:t})=>IT(e,t),addRowAfter:()=>({state:e,dispatch:t})=>LT(e,t),deleteRow:()=>({state:e,dispatch:t})=>PT(e,t),deleteTable:()=>({state:e,dispatch:t})=>zT(e,t),mergeCells:()=>({state:e,dispatch:t})=>y1(e,t),splitCell:()=>({state:e,dispatch:t})=>v1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>ha("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>ha("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>FT(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>y1(e,t)?!0:v1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>BT(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>x1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>x1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&b1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=ge.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Qf,"Mod-Backspace":Qf,Delete:Qf,"Mod-Delete":Qf}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[HT({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],qT({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(J(e,"tableRole",t))}}}),FG=oe.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(S1.configure(this.options.table)),this.options.tableCell!==!1&&e.push(w1.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(E1.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(_1.configure(this.options.tableRow)),e}});var fN=P(dN(),1);var op=fN.default;function mN(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?mN(n.children,r):{text:n.value,classes:r}})}function pN(e){return e.value||e.children||[]}function zF(e){return!!op.getLanguage(e)}function hN({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return Gd(e,i=>i.type.name===t).forEach(i=>{var s;let a=i.pos+1,l=i.node.attrs.language||r,u=n.listLanguages(),c=l&&(u.includes(l)||zF(l)||(s=n.registered)!=null&&s.call(n,l))?pN(n.highlight(l,i.node.textContent)):pN(n.highlightAuto(i.node.textContent));mN(c).forEach(d=>{let f=a+d.text.length;if(d.classes.length){let p=Ie.inline(a,f,{class:d.classes.join(" ")});o.push(p)}a=f})}),ke.create(e,o)}function UF(e){return typeof e=="function"}function HF({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>UF(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new W({key:new X("lowlight"),state:{init:(o,{doc:i})=>hN({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(o,i,s,a)=>{let l=s.selection.$head.parent.type.name,u=a.selection.$head.parent.type.name,c=Gd(s.doc,f=>f.type.name===e),d=Gd(a.doc,f=>f.type.name===e);return o.docChanged&&([l,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?hN({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var $F=bC.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],HF({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),gN=$F;function qF(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],x={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[k,d,a,n,e.C_BLOCK_COMMENT_MODE,c,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:w.concat([{begin:/\(/,end:/\)/,keywords:x,contains:w.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"",keywords:x,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function bN(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=qF(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function yN(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],x=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...y,...v,"set","shopt",...x,...k]},contains:[p,e.SHEBANG(),h,d,i,s,g,a,l,u,c,n]}}function vN(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,a,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function xN(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],x={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[k,d,a,n,e.C_BLOCK_COMMENT_MODE,c,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:w.concat([{begin:/\(/,end:/\)/,keywords:x,contains:w.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"",keywords:x,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function kN(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:o.concat(i),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",x={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[g,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},x]}}var VF=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),WF=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],jF=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],KF=[...WF,...jF],GF=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),JF=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),YF=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ZF=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function wN(e){let t=e.regex,n=VF(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+JF.join("|")+")"},{begin:":(:)?("+YF.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ZF.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:GF.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+KF.join("|")+")\\b"}]}}function EN(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function _N(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"NN(e,t,n-1))}function AN(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+NN("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,TN,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},TN,u]}}var MN="[A-Za-z$_][0-9A-Za-z$_]*",XF=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],QF=["true","false","null","undefined","NaN","Infinity"],RN=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],DN=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ON=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],e9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],t9=[].concat(ON,RN,DN);function IN(e){let t=e.regex,n=(L,{after:K})=>{let re="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,K)=>{let re=L[0].length+L.index,fe=L.input[re];if(fe==="<"||fe===","){K.ignoreMatch();return}fe===">"&&(n(L,{after:re})||K.ignoreMatch());let ye,yt=L.input.substring(re);if(ye=yt.match(/^\s*=/)){K.ignoreMatch();return}if((ye=yt.match(/^\s+extends\s+/))&&ye.index===0){K.ignoreMatch();return}}},a={$pattern:MN,keyword:XF,literal:QF,built_in:t9,"variable.language":e9},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});let x=[].concat(y,f.contains),k=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...RN,...DN]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(L){return t.concat("(?!",L.join("|"),")")}let A={match:t.concat(/\b/,V([...ON,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},F={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},R={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},F,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},A,U,E,R,{match:/\$[(.]/}]}}function LN(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ya="[0-9](_*[0-9])*",ap=`\\.(${ya})`,lp="[0-9a-fA-F](_*[0-9a-fA-F])*",n9={className:"number",variants:[{begin:`(\\b(${ya})((${ap})|\\.)?|(${ap}))[eE][+-]?(${ya})[fFdD]?\\b`},{begin:`\\b(${ya})((${ap})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ap})[fFdD]?\\b`},{begin:`\\b(${ya})[fFdD]\\b`},{begin:`\\b0[xX]((${lp})\\.?|(${lp})?\\.(${lp}))[pP][+-]?(${ya})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${lp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function PN(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,o]}]};o.contains.push(s);let a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},u=n9,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,a,l,s,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},u]}}var r9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),o9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],s9=[...o9,...i9],a9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),BN=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),FN=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),l9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u9=BN.concat(FN).sort().reverse();function zN(e){let t=r9(e),n=u9,r="and or not only",o="[\\w-]+",i="("+o+"|@\\{"+o+"\\})",s=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},u=function(v,x,k){return{className:v,begin:x,relevance:k}},c={$pattern:/[a-z-]+/,keyword:r,attribute:a9.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:c,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=a.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+l9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:a,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+s9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+BN.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+FN.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,y,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function UN(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function HN(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,i,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function qN(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function VN(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},s={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,i,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let y=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,s.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function WN(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(F,R)=>{R.data._beginMatch=F[1]||F[2]},"on:end":(F,R)=>{R.data._beginMatch!==F[1]&&R.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ -]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],x={keyword:g,literal:(F=>{let R=[];return F.forEach(S=>{R.push(S),S.toLowerCase()===S?R.push(S.toUpperCase()):R.push(S.toLowerCase())}),R})(b),built_in:y},k=F=>F.map(R=>R.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},E=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},T={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:x,contains:[T,s,_,e.C_BLOCK_COMMENT_MODE,h,m,w]},U={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(g).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(U);let V=[T,_,e.C_BLOCK_COMMENT_MODE,h,m,w],A={begin:t.concat(/#\[\s*\\?/,t.either(o,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...V]},...V,{scope:"meta",variants:[{match:o},{match:i}]}]};return{case_insensitive:!1,keywords:x,contains:[A,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},s,U,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},w,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:x,contains:["self",A,s,_,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function jN(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function KN(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function GN(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function JN(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function YN(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function ZN(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},w=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=w,m.contains=w;let C=[{begin:/^\s*=>/,starts:{end:"$",contains:w}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:w}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(u).concat(w)}}function XN(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:a,literal:l,built_in:u},illegal:""},i]}}var c9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),d9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],f9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],p9=[...d9,...f9],h9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),m9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),g9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),b9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function QN(e){let t=c9(e),n=g9,r=m9,o="@[a-z-]+",i="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+p9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+b9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:h9.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function eA(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function tA(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(k=>!c.includes(k)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k){return t.concat(/\b/,t.either(...k.map(w=>w.replace(/\s+/,"\\s+"))),/\b/)}let v={scope:"keyword",match:y(f),relevance:0};function x(k,{exceptions:w,when:E}={}){let _=E;return w=w||[],k.map(T=>T.match(/\|\d+$/)||w.includes(T)?T:_(T)?`${T}|0`:T)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(h,{when:k=>k.length<3}),literal:i,type:a,built_in:d},contains:[{scope:"type",match:y(s)},v,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function iA(e){return e?typeof e=="string"?e:e.source:null}function hu(e){return _e("(?=",e,")")}function _e(...e){return e.map(n=>iA(n)).join("")}function y9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function $t(...e){return"("+(y9(e).capture?"":"?:")+e.map(r=>iA(r)).join("|")+")"}var P1=e=>_e(/\b/,e,/\w$/.test(e)?/\b/:/\B/),v9=["Protocol","Type"].map(P1),nA=["init","self"].map(P1),x9=["Any","Self"],I1=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],rA=["false","nil","true"],k9=["assignment","associativity","higherThan","left","lowerThan","none","right"],w9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],oA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],sA=$t(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),aA=$t(sA,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),L1=_e(sA,aA,"*"),lA=$t(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),cp=$t(lA,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),mr=_e(lA,cp,"*"),up=_e(/[A-Z]/,cp,"*"),E9=["attached","autoclosure",_e(/convention\(/,$t("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",_e(/objc\(/,mr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],_9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function uA(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,$t(...v9,...nA)],className:{2:"keyword"}},i={match:_e(/\./,$t(...I1)),relevance:0},s=I1.filter(Ee=>typeof Ee=="string").concat(["_|0"]),a=I1.filter(Ee=>typeof Ee!="string").concat(x9).map(P1),l={variants:[{className:"keyword",match:$t(...a,...nA)}]},u={$pattern:$t(/\b\w+/,/#\w+/),keyword:s.concat(w9),literal:rA},c=[o,i,l],d={match:_e(/\./,$t(...oA)),relevance:0},f={className:"built_in",match:_e(/\b/,$t(...oA),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:L1},{match:`\\.(\\.|${aA})+`}]},b=[h,m],g="([0-9]_*)+",y="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},x=(Ee="")=>({className:"subst",variants:[{match:_e(/\\/,Ee,/[0\\tnr"']/)},{match:_e(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Ee="")=>({className:"subst",match:_e(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),w=(Ee="")=>({className:"subst",label:"interpol",begin:_e(/\\/,Ee,/\(/),end:/\)/}),E=(Ee="")=>({begin:_e(Ee,/"""/),end:_e(/"""/,Ee),contains:[x(Ee),k(Ee),w(Ee)]}),_=(Ee="")=>({begin:_e(Ee,/"/),end:_e(/"/,Ee),contains:[x(Ee),w(Ee)]}),T={className:"string",variants:[E(),E("#"),E("##"),E("###"),_(),_("#"),_("##"),_("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],U={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},V=Ee=>{let co=_e(Ee,/\//),te=_e(/\//,Ee);return{begin:co,end:te,contains:[...C,{scope:"comment",begin:`#(?!.*${te})`,end:/$/}]}},A={scope:"regexp",variants:[V("###"),V("##"),V("#"),U]},F={match:_e(/`/,mr,/`/)},R={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${cp}+`},M=[F,R,S],L={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:_9,contains:[...b,v,T]}]}},K={scope:"keyword",match:_e(/@/,$t(...E9),hu($t(/\(/,/\s+/)))},re={scope:"meta",match:_e(/@/,mr)},fe=[L,K,re],ye={match:hu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:_e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,cp,"+")},{className:"type",match:up,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:_e(/\s+&\s+/,hu(up)),relevance:0}]},yt={begin://,keywords:u,contains:[...r,...c,...fe,h,ye]};ye.contains.push(yt);let ze={match:_e(mr,/\s*:/),keywords:"_|0",relevance:0},vt={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",ze,...r,A,...c,...p,...b,v,T,...M,...fe,ye]},uo={begin://,keywords:"repeat each",contains:[...r,ye]},Iu={begin:$t(hu(_e(mr,/\s*:/)),hu(_e(mr,/\s+/,mr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:mr}]},Da={begin:/\(/,end:/\)/,keywords:u,contains:[Iu,...r,...c,...b,v,T,...fe,ye,vt],endsParent:!0,illegal:/["']/},dh={match:[/(func|macro)/,/\s+/,$t(F.match,mr,L1)],className:{1:"keyword",3:"title.function"},contains:[uo,Da,t],illegal:[/\[/,/%/]},fh={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[uo,Da,t],illegal:/\[|%/},ph={match:[/operator/,/\s+/,L1],className:{1:"keyword",3:"title"}},hh={begin:[/precedencegroup/,/\s+/,up],className:{1:"keyword",3:"title"},contains:[ye],keywords:[...k9,...rA],end:/}/},fs={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Lu={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},hn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,mr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[uo,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:up},...c],relevance:0}]};for(let Ee of T.variants){let co=Ee.contains.find(Pu=>Pu.label==="interpol");co.keywords=u;let te=[...c,...p,...b,v,T,...M];co.contains=[...te,{begin:/\(/,end:/\)/,contains:["self",...te]}]}return{name:"Swift",keywords:u,contains:[...r,dh,fh,fs,Lu,hn,ph,hh,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},A,...c,...p,...b,v,T,...M,...fe,ye,vt]}}var dp="[A-Za-z$_][0-9A-Za-z$_]*",cA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],dA=["true","false","null","undefined","NaN","Infinity"],fA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],pA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],hA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],mA=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gA=[].concat(hA,fA,pA);function S9(e){let t=e.regex,n=(L,{after:K})=>{let re="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,K)=>{let re=L[0].length+L.index,fe=L.input[re];if(fe==="<"||fe===","){K.ignoreMatch();return}fe===">"&&(n(L,{after:re})||K.ignoreMatch());let ye,yt=L.input.substring(re);if(ye=yt.match(/^\s*=/)){K.ignoreMatch();return}if((ye=yt.match(/^\s+extends\s+/))&&ye.index===0){K.ignoreMatch();return}}},a={$pattern:dp,keyword:cA,literal:dA,built_in:gA,"variable.language":mA},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});let x=[].concat(y,f.contains),k=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...fA,...pA]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(L){return t.concat("(?!",L.join("|"),")")}let A={match:t.concat(/\b/,V([...hA,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},F={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},R={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},F,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},A,U,E,R,{match:/\$[(.]/}]}}function bA(e){let t=e.regex,n=S9(e),r=dp,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:dp,keyword:cA.concat(l),literal:dA,built_in:gA.concat(o),"variable.language":mA},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let y=m.contains.findIndex(v=>v.label===b);if(y===-1)throw new Error("can not find mode to replace");m.contains.splice(y,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,i,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function yA(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,o),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(i,o),/ +/,t.either(s,a),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function vA(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,s,o,e.QUOTE_STRING_MODE,l,u,a]}}function xA(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(i,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,l,a,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,l,a]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function kA(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,i,s],g=[...b];return g.pop(),g.push(a),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var Gi={arduino:bN,bash:yN,c:vN,cpp:xN,csharp:kN,css:wN,diff:EN,go:_N,graphql:SN,ini:CN,java:AN,javascript:IN,json:LN,kotlin:PN,less:zN,lua:UN,makefile:HN,markdown:$N,objectivec:qN,perl:VN,php:WN,"php-template":jN,plaintext:KN,python:GN,"python-repl":JN,r:YN,ruby:ZN,rust:XN,scss:QN,shell:eA,sql:tA,swift:uA,typescript:bA,vbnet:yA,wasm:vA,xml:xA,yaml:kA};var wA={},C9="hljs-";function Ji(e){let t=op.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:o,register:i,registerAlias:s,registered:a};function n(l,u,c){let d=c||wA,f=typeof d.prefix=="string"?d.prefix:C9;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:B1,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(l,u){let d=(u||wA).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function i(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&t.registerLanguage(c,l[c])}}function s(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){let d=l[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function a(l){return!!t.getLanguage(l)}}var B1=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(s,a){return a?s+"_".repeat(a):n.options.classPrefix+s}),o=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var j1={};Oa(j1,{arrayReplaceAt:()=>W1,assign:()=>ka,escapeHtml:()=>eo,escapeRE:()=>uz,fromCodePoint:()=>bu,has:()=>X9,isMdAsciiPunct:()=>Xi,isPunctChar:()=>Zi,isSpace:()=>ce,isString:()=>Ep,isValidEntityCode:()=>_p,isWhiteSpace:()=>Yi,lib:()=>cz,normalizeReference:()=>Qi,unescapeAll:()=>Qr,unescapeMd:()=>rz});var gp={};Oa(gp,{decode:()=>mu,encode:()=>hp,format:()=>va,parse:()=>gu});var EA={};function T9(e){let t=EA[e];if(t)return t;t=EA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),i+=6;continue}}if((a&248)===240&&i+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="\uFFFD"}return o})}fp.defaultChars=";/?:@&=+$,#";fp.componentChars="";var mu=fp;var _A={};function N9(e){let t=_A[e];if(t)return t;t=_A[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=N9(t),o="";for(let i=0,s=e.length;i=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&l<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}pp.defaultChars=";/?:@&=+$,-_.!~*'()#";pp.componentChars="-_.!~*'()";var hp=pp;function va(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function mp(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var A9=/^([a-z0-9.+-]+:)/i,M9=/:[0-9]*$/,R9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,D9=["<",">",'"',"`"," ","\r",` -`," "],O9=["{","}","|","\\","^","`"].concat(D9),I9=["'"].concat(O9),SA=["%","/","?",";","#"].concat(I9),CA=["/","?","#"],L9=255,TA=/^[+a-z0-9A-Z_-]{0,63}$/,P9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,NA={javascript:!0,"javascript:":!0},AA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function B9(e,t){if(e&&e instanceof mp)return e;let n=new mp;return n.parse(e,t),n}mp.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=R9.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=A9.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&NA[s])&&(i=i.substr(2),this.slashes=!0)),!NA[s]&&(o||s&&!AA[s])){let u=-1;for(let h=0;h127?y+="x":y+=g[v];if(!y.match(TA)){let v=h.slice(0,m),x=h.slice(m+1),k=g.match(P9);k&&(v.push(k[1]),x.unshift(k[2])),x.length&&(i=x.join(".")+i),this.hostname=v.join(".");break}}}}this.hostname.length>L9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));let l=i.indexOf("?");return l!==-1&&(this.search=i.substr(l),i=i.slice(0,l)),i&&(this.pathname=i),AA[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};mp.prototype.parseHost=function(e){let t=M9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var gu=B9;var F1={};Oa(F1,{Any:()=>bp,Cc:()=>yp,Cf:()=>MA,P:()=>xa,S:()=>vp,Z:()=>xp});var bp=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var yp=/[\0-\x1F\x7F-\x9F]/;var MA=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var xa=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var vp=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var xp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var RA=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var DA=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var z1,F9=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]]),U1=(z1=String.fromCodePoint)!==null&&z1!==void 0?z1:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function H1(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=F9.get(e))!==null&&t!==void 0?t:e}var lt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(lt||(lt={}));var z9=32,Zo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Zo||(Zo={}));function $1(e){return e>=lt.ZERO&&e<=lt.NINE}function U9(e){return e>=lt.UPPER_A&&e<=lt.UPPER_F||e>=lt.LOWER_A&&e<=lt.LOWER_F}function H9(e){return e>=lt.UPPER_A&&e<=lt.UPPER_Z||e>=lt.LOWER_A&&e<=lt.LOWER_Z||$1(e)}function $9(e){return e===lt.EQUALS||H9(e)}var at;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(at||(at={}));var gr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(gr||(gr={}));var kp=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=at.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=gr.Strict}startEntity(t){this.decodeMode=t,this.state=at.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case at.EntityStart:return t.charCodeAt(n)===lt.NUM?(this.state=at.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=at.NamedEntity,this.stateNamedEntity(t,n));case at.NumericStart:return this.stateNumericStart(t,n);case at.NumericDecimal:return this.stateNumericDecimal(t,n);case at.NumericHex:return this.stateNumericHex(t,n);case at.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|z9)===lt.LOWER_X?(this.state=at.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=at.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,i!==0){if(s===lt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==gr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&Zo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Zo.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case at.NamedEntity:return this.result!==0&&(this.decodeMode!==gr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case at.NumericDecimal:return this.emitNumericEntity(0,2);case at.NumericHex:return this.emitNumericEntity(0,3);case at.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case at.EntityStart:return 0}}};function OA(e){let t="",n=new kp(e,r=>t+=U1(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);let u=n.write(o,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}let l=t+o.slice(s);return t="",l}}function q9(e,t,n,r){let o=(t&Zo.BRANCH_LENGTH)>>7,i=t&Zo.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){let l=r-i;return l<0||l>=o?-1:e[n+l]-1}let s=n,a=s+o-1;for(;s<=a;){let l=s+a>>>1,u=e[l];if(ur)a=l-1;else return e[l+o]}return-1}var V9=OA(RA),GY=OA(DA);function Xo(e,t=gr.Legacy){return V9(e,t)}function wp(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function q1(e,t){return function(r){let o,i=0,s="";for(;o=e.exec(r);)i!==o.index&&(s+=r.substring(i,o.index)),s+=t.get(o[0].charCodeAt(0)),i=o.index+1;return s+r.substring(i)}}var IA=q1(/[&<>'"]/g,j9),LA=q1(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),PA=q1(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var BA;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(BA||(BA={}));var FA;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(FA||(FA={}));function Y9(e){return Object.prototype.toString.call(e)}function Ep(e){return Y9(e)==="[object String]"}var Z9=Object.prototype.hasOwnProperty;function X9(e,t){return Z9.call(e,t)}function ka(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function W1(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function _p(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function bu(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var HA=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Q9=/&([a-z#][a-z0-9]{1,31});/gi,ez=new RegExp(HA.source+"|"+Q9.source,"gi"),tz=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function nz(e,t){if(t.charCodeAt(0)===35&&tz.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return _p(r)?bu(r):e}let n=Xo(e);return n!==e?n:e}function rz(e){return e.indexOf("\\")<0?e:e.replace(HA,"$1")}function Qr(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(ez,function(t,n,r){return n||nz(t,r)})}var oz=/[&<>"]/,iz=/[&<>"]/g,sz={"&":"&","<":"<",">":">",'"':"""};function az(e){return sz[e]}function eo(e){return oz.test(e)?e.replace(iz,az):e}var lz=/[.?*+^$[\]\\(){}|-]/g;function uz(e){return e.replace(lz,"\\$&")}function ce(e){switch(e){case 9:case 32:return!0}return!1}function Yi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Zi(e){return xa.test(e)||vp.test(e)}function Xi(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Qi(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var cz={mdurl:gp,ucmicro:F1};var Y1={};Oa(Y1,{parseLinkDestination:()=>G1,parseLinkLabel:()=>K1,parseLinkTitle:()=>J1});function K1(e,t,n){let r,o,i,s,a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=Qr(e.slice(t,o)),i.pos=o,i.ok=!0),i}function J1(e,t,n,r){let o,i=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i"+eo(i.content)+""};br.code_block=function(e,t,n,r,o){let i=e[t];return""+eo(e[t].content)+` -`};br.fence=function(e,t,n,r,o){let i=e[t],s=i.info?Qr(i.info).trim():"",a="",l="";if(s){let c=s.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(i.content,a,l)||eo(i.content):u=eo(i.content),u.indexOf("${u} -`}return`
${u}
-`};br.image=function(e,t,n,r,o){let i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};br.hardbreak=function(e,t,n){return n.xhtmlOut?`
+`),[a,i]=QF(o);if(a.length===0)return;let s=sI(a,0,n);return s.length===0?void 0:{type:"list",ordered:!0,start:((r=a[0])==null?void 0:r.number)||1,items:s,raw:o.slice(0,i).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(t8,this.editor.getAttributes(eI)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=cr({find:tI,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=cr({find:tI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(eI)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),n8=/^\s*(\[([( |x])?\])\s$/,Yf=ee.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",re(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return tu(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),a=document.createElement("label"),i=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),u=c=>{var d,f;s.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,s.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),a.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,i),o.append(a,l),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[cr({find:n8,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Qf=ee.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",re(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=a=>{let i=pf(a,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,l)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:l}),customNestedParser:r},n);return i?[{type:"taskList",raw:i.raw,items:i.items}]:n.blockTokens(a)},o=pf(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,i)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:i}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),xG=ae.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(d1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(f1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(h1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(m1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Yf.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Qf.configure(this.options.taskList)),e}});var lI=ee.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",re(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var r8=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,o8=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,uI=et.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ur({find:r8,type:this.type})]},addPasteRules(){return[An({find:o8,type:this.type})]}});var cI=ee.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var dI=et.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",re(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let a=o[2].trim();return{type:"underline",raw:o[0],text:a,tokens:n.inlineTokens(a)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function fI(e={}){return new W({view(t){return new g1(t,e)}})}var g1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let a=i=>{this[o](i)};return t.dom.addEventListener(o,a),{name:o,handler:a}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,a=o.getBoundingClientRect(),i=a.width/o.offsetWidth,s=a.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*s;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*i;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(r.left-u)/i+"px",this.element.style.top=(r.top-c)/s+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,a=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!a){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=_d(this.editorView.state.doc,i,this.editorView.dragging.slice);s!=null&&(i=s)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var Nt=class e extends j{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):j.near(r)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new b1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!a8(t)||!i8(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,a=null;for(let i=t.depth;;i--){let s=t.node(i);if(n>0?t.indexAfter(i)0){a=s.child(n>0?t.indexAfter(i):t.index(i)-1);break}else if(i==0)return null;o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}for(;;){let i=n>0?a.firstChild:a.lastChild;if(!i){if(a.isAtom&&!a.isText&&!q.isSelectable(a)){t=t.doc.resolve(o+a.nodeSize*n),r=!1;continue e}break}a=i,o+=n;let s=t.doc.resolve(o);if(e.valid(s))return s}return null}}};Nt.prototype.visible=!1;Nt.findFrom=Nt.findGapCursorFrom;j.jsonID("gapcursor",Nt);var b1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Nt.valid(n)?new Nt(n):j.near(n)}};function pI(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function a8(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||pI(o.type))return!0;if(o.inlineContent)return!1}}return!0}function i8(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||pI(o.type))return!0;if(o.inlineContent)return!1}}return!0}function hI(){return new W({props:{decorations:c8,createSelectionBetween(e,t,n){return t.pos==n.pos&&Nt.valid(n)?new Nt(n):null},handleClick:l8,handleKeyDown:s8,handleDOMEvents:{beforeinput:u8}}})}var s8=Zl({ArrowLeft:ep("horiz",-1),ArrowRight:ep("horiz",1),ArrowUp:ep("vert",-1),ArrowDown:ep("vert",1)});function ep(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,a){let i=r.selection,s=t>0?i.$to:i.$from,l=i.empty;if(i instanceof $){if(!a.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(t>0?s.after():s.before())}let u=Nt.findGapCursorFrom(s,t,l);return u?(o&&o(r.tr.setSelection(new Nt(u))),!0):!1}}function l8(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Nt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&q.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Nt(r))),!0)}function u8(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Nt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=_.empty;for(let i=r.length-1;i>=0;i--)o=_.from(r[i].createAndFill(null,o));let a=e.state.tr.replace(n.pos,n.pos,new B(o,0,0));return a.setSelection($.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function c8(e){if(!(e.selection instanceof Nt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ce.create(e.doc,[Re.widget(e.selection.head,t,{key:"gapcursor"})])}var tp=200,gt=function(){};gt.prototype.append=function(t){return t.length?(t=gt.from(t),!this.length&&t||t.length=n?gt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};gt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};gt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};gt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(a,i){return o.push(t(a,i))},n,r),o};gt.from=function(t){return t instanceof gt?t:t&&t.length?new mI(t):gt.empty};var mI=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,a){return o==0&&a==this.length?this:new t(this.values.slice(o,a))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,a,i,s){for(var l=a;l=i;l--)if(o(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=tp)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=tp)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(gt);gt.empty=new mI([]);var d8=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rs&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,a)-s,i+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,a,i){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(a,s)-s,i+s)===!1||a=a?this.right.slice(r-a,o-a):this.left.slice(r,a).append(this.right.slice(0,o-a))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(gt),x1=gt;var f8=500,Ga=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,a;n&&(o=this.remapping(r,this.items.length),a=o.maps.length);let i=t.tr,s,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),a=o.maps.length),a--,c.push(d);return}if(o){c.push(new pr(d.map));let p=d.step.map(o.slice(a)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],u.push(new pr(h,void 0,void 0,u.length+c.length))),a--,h&&o.appendMap(h,a)}else i.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(a)):d.selection,l=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:s}}addTransform(t,n,r,o){let a=[],i=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let c=0;ch8&&(s=p8(s,u),i-=u),new e(s.append(a),i)}remapping(t,n){let r=new Bl;return this.items.forEach((o,a)=>{let i=o.mirrorOffset!=null&&a-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,i)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new pr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),a=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=a.getMirror(--l);if(p==null)return;i=Math.min(i,p);let h=a.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(a.slice(l+1,p));b&&s++,r.push(new pr(h,m,b))}else r.push(new pr(h))},o);let u=[];for(let f=n;ff8&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],a=0;return this.items.forEach((i,s)=>{if(s>=t)o.push(i),i.selection&&a++;else if(i.step){let l=i.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=i.selection&&i.selection.map(n.slice(r));c&&a++;let d=new pr(u.invert(),l,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else i.map&&r--},this.items.length,0),new e(x1.from(o.reverse()),a)}};Ga.empty=new Ga(x1.empty,0);function p8(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var pr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},hr=class{constructor(t,n,r,o,a){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=a}},h8=20;function m8(e,t,n,r){let o=n.getMeta(Ka),a;if(o)return o.historyState;n.getMeta(x8)&&(e=new hr(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(Ka))return i.getMeta(Ka).redo?new hr(e.done.addTransform(n,void 0,r,np(t)),e.undone,gI(n.mapping.maps),e.prevTime,e.prevComposition):new hr(e.done,e.undone.addTransform(n,void 0,r,np(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!i&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!g8(n,e.prevRanges)),u=i?y1(e.prevRanges,n.mapping):gI(n.mapping.maps);return new hr(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,np(t)),Ga.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new hr(e.done.rebased(n,a),e.undone.rebased(n,a),y1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new hr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),y1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function g8(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let a=0;a=t[a]&&(n=!0)}),n}function gI(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,a,i)=>t.push(a,i));return t}function y1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=Ka.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let a=b8(o,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var v1=rp(!1,!0),C1=rp(!0,!0),VG=rp(!1,!1),WG=rp(!0,!1);var ZG=ae.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new W({key:new Y("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>o){let i=a-o,s=0,l=i,u=r.tr.deleteRange(s,l);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),a=this.storage.characters({node:t.doc});if(a<=r||o>r&&a>r&&a<=o)return!0;if(o>r&&a>r&&a>o||!t.getMeta("paste"))return!1;let s=t.selection.$head.pos,l=a-r,u=s-l,c=s;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),kI=ae.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[fI(this.options)]}}),rj=ae.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new W({key:new Y("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,a=[];if(!n||!r)return Ce.create(e,[]);let i=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(o>=u&&o<=u+l.nodeSize-1))return!1;i+=1});let s=0;return e.descendants((l,u)=>{if(l.isText||!(o>=u&&o<=u+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&i-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";a.push(Re.node(u,u+l.nodeSize,{class:this.options.className}))}),Ce.create(e,a)}}})]}}),vI=ae.create({name:"gapCursor",addProseMirrorPlugins(){return[hI()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=he(X(e,"allowGapCursor",n)))!=null?t:null}}}),w1=ae.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new W({key:new Y("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let a=this.editor.isEmpty;return e.descendants((i,s)=>{let l=r>=s&&r<=s+i.nodeSize,u=!i.isLeaf&&Ql(i);if((l||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];a&&c.push(this.options.emptyEditorClass);let d=Re.node(s,s+i.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:i,pos:s,hasAnchor:l}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),Ce.create(e,o)}}})]}}),fj=ae.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new W({key:new Y("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||uf(n.selection)||e.view.dragging?null:Ce.create(n.doc,[Re.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function yI({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var CI=ae.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Y(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new W({key:t,appendTransaction:(o,a,i)=>{let{doc:s,tr:l,schema:u}=i,c=t.getState(i),d=s.content.size,f=u.nodes[n];if(c)return l.insert(d,f.create())},state:{init:(o,a)=>{let i=a.tr.doc.lastChild;return!yI({node:i,types:r})},apply:(o,a)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return a;let i=o.doc.lastChild;return!yI({node:i,types:r})}}})]}}),wI=ae.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>v1(e,t),redo:()=>({state:e,dispatch:t})=>C1(e,t)}},addProseMirrorPlugins(){return[xI(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var y8=ae.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(IL.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(LL.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(d1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(_L.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(Fb.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(TL.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(kI.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(vI.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(ML.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(NL.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(wI.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(DL.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(RL.configure(this.options.italic)),this.options.listItem!==!1&&o.push(f1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(h1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(l1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(m1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(lI.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(uI.configure(this.options.strike)),this.options.text!==!1&&o.push(cI.configure(this.options.text)),this.options.underline!==!1&&o.push(dI.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(CI.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),SI=y8;var EI=w1;var LI=Qf;var II=Yf;var E1,L1;if(typeof WeakMap<"u"){let e=new WeakMap;E1=t=>e.get(t),L1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;E1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var Ve=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:g-y});break}let k=o+y*t;for(let v=0;vr&&(a+=u.attrs.colspan)}}for(let i=0;i1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function C8(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function S8(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Gn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function up(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=gs(t.$head)||E8(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function E8(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function I1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function L8(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function T1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function BI(e,t,n){let r=e.node(-1),o=Ve.get(r),a=e.start(-1),i=o.nextCell(e.pos-a,t,n);return i==null?null:e.node(0).resolve(a+i)}function ja(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function FI(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-a);l.unshift(n.pos-a);let u=l.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=a+c+1;return new Qi(s.resolve(f),s.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(I1(r)&&I1(o)&&T1(r,o)){let a=this.$anchorCell.node(-1)!=r.node(-1);return a&&this.isRowSelection()?Qr.rowSelection(r,o):a&&this.isColSelection()?Qr.colSelection(r,o):new Qr(r,o)}return $.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=Ve.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),a={},i=[];for(let l=o.top;l0||b>0){let g=h.attrs;if(m>0&&(g=ja(g,0,m)),b>0&&(g=ja(g,g.colspan-b,b)),p.lefto.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=Ve.get(r),a=t.start(-1),i=o.findCell(t.pos-a),s=o.findCell(n.pos-a),l=t.node(0);return i.top<=s.top?(i.top>0&&(t=l.resolve(a+o.map[i.left])),s.bottom0&&(n=l.resolve(a+o.map[s.left])),i.bottom0)return!1;let i=o+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==n.width}eq(t){return t instanceof Qr&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=Ve.get(r),a=t.start(-1),i=o.findCell(t.pos-a),s=o.findCell(n.pos-a),l=t.node(0);return i.left<=s.left?(i.left>0&&(t=l.resolve(a+o.map[i.top*o.width])),s.right0&&(n=l.resolve(a+o.map[s.top*o.width])),i.right{t.push(Re.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Ce.create(e.doc,t)}function T8({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function M8({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let a=e.node(o);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){n=a;break}}for(let o=t.depth;o>0;o--){let a=t.node(o);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){r=a;break}}return n!==r&&t.parentOffset===0}function N8(e,t,n){let r=(t||e).selection,o=(t||e).doc,a,i;if(r instanceof q&&(i=r.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")a=ge.create(o,r.from);else if(i=="row"){let s=o.resolve(r.from+1);a=ge.rowSelection(s,s)}else if(!n){let s=Ve.get(r.node),l=r.from+1,u=l+s.map[s.width*s.height-1];a=ge.create(o,l+1,u)}}else r instanceof $&&T8(r)?a=$.create(o,r.from):r instanceof $&&M8(r)&&(a=$.create(o,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}var D8=new Y("fix-tables");function UI(e,t,n,r){let o=e.childCount,a=t.childCount;e:for(let i=0,s=0;i{o.type.spec.tableRole=="table"&&(n=R8(e,o,a,n))};return t?t.doc!=e.doc&&UI(t.doc,e.doc,0,r):e.doc.descendants(r),n}function R8(e,t,n,r){let o=Ve.get(t);if(!o.problems)return r;r||(r=e.tr);let a=[];for(let l=0;l0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;I8(t,r,o+a)&&(a=o==0||o==t.width?null:0);for(let i=0;i0&&o0&&t.map[s-1]==l||o0?-1:0;P8(t,r,o+s)&&(s=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[a]==n[a-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=l+1+u.content.size,d=_I(u)?l+1:c;a.replaceWith(d+r.tableStart,c+r.tableStart,s)}a.setSelection(new ge(a.doc.resolve(l+r.tableStart))),t(a)}return!0}function D1(e,t){let n=Dt(e.schema);return z8(({node:r})=>n[r.type.spec.tableRole])(e,t)}function z8(e){return(t,n)=>{let r=t.selection,o,a;if(r instanceof ge){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{var i;if(o=S8(r.$from),!o)return!1;a=(i=gs(r.$from))===null||i===void 0?void 0:i.pos}if(o==null||a==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let s=o.attrs,l=[],u=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});let c=mr(t),d=t.tr;for(let p=0;p{i.attrs[e]!==t&&a.setNodeMarkup(s,null,{...i.attrs,[e]:t})}):a.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function U8(e){return function(t,n){if(!Gn(t))return!1;if(n){let r=Dt(t.schema),o=mr(t),a=t.tr,i=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=i.map(l=>o.table.nodeAt(l));for(let l=0;l{let p=f+a.tableStart,h=i.doc.nodeAt(p);h&&i.setNodeMarkup(p,d,h.attrs)}),r(i)}return!0}}var Jj=bs("row",{useDeprecatedLogic:!0}),Zj=bs("column",{useDeprecatedLogic:!0}),JI=bs("cell",{useDeprecatedLogic:!0});function H8(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let a=e.node(-1).child(r),i=a.lastChild;if(i)return o-1-i.nodeSize;o-=a.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function op(e,t){let n=e.selection;if(!(n instanceof ge))return!1;if(t){let r=e.tr,o=Dt(e.schema).cell.createAndFill().content;n.forEachCell((a,i)=>{a.content.eq(o)||r.replace(r.mapping.map(i+1),r.mapping.map(i+a.nodeSize-1),new B(o,0,0))}),r.docChanged&&t(r)}return!0}function q8(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),a=o.type.spec.tableRole,i=o.type.schema,s=[];if(a=="row")for(let l=0;l=0;i--){let{rowspan:s,colspan:l}=a.child(i).attrs;for(let u=o;u=t.length&&t.push(_.empty),n[o]r&&(f=f.type.createChecked(ja(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}a.push(_.from(l))}n=a,t=o}return{width:e,height:t,rows:n}}function W8(e,t,n,r,o,a,i){let s=e.doc.type.schema,l=Dt(s),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(b?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,_.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let a=n.selection;if(a instanceof ge)return sp(n,r,j.near(a.$headCell,t));if(e!="horiz"&&!a.empty)return!1;let i=YI(o,e,t);if(i==null)return!1;if(e=="horiz")return sp(n,r,j.near(n.doc.resolve(a.head+t),t));{let s=n.doc.resolve(i),l=BI(s,e,t),u;return l?u=j.near(l,1):t<0?u=j.near(n.doc.resolve(s.before(-1)),-1):u=j.near(n.doc.resolve(s.after(-1)),1),sp(n,r,u)}}}function ip(e,t){return(n,r,o)=>{if(!o)return!1;let a=n.selection,i;if(a instanceof ge)i=a;else{let l=YI(o,e,t);if(l==null)return!1;i=new ge(n.doc.resolve(l))}let s=BI(i.$headCell,e,t);return s?sp(n,r,new ge(i.$anchorCell,s)):!1}}function G8(e,t){let n=e.state.doc,r=gs(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new ge(r))),!0):!1}function j8(e,t,n){if(!Gn(e.state))return!1;let r=q8(n),o=e.state.selection;if(o instanceof ge){r||(r={width:1,height:1,rows:[_.from(_1(Dt(e.state.schema).cell,n))]});let a=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=Ve.get(a).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=V8(r,s.right-s.left,s.bottom-s.top),NI(e.state,e.dispatch,i,s,r),!0}else if(r){let a=up(e.state),i=a.start(-1);return NI(e.state,e.dispatch,i,Ve.get(a.node(-1)).findCell(a.pos-i),r),!0}else return!1}function X8(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=DI(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof ge)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=gs(e.state.selection.$anchor))!=null&&((n=S1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)a(o,t),t.preventDefault();else if(!r)return;function a(l,u){let c=S1(e,u),d=Jo.getState(e.state)==null;if(!c||!T1(l,c))if(d)c=l;else return;let f=new ge(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Jo,l.pos),e.dispatch(p)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",s),Jo.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Jo,-1))}function s(l){let u=l,c=Jo.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(DI(e,u.target)!=r&&(d=S1(e,t),!d))return i();d&&a(d,u)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",s)}function YI(e,t,n){if(!(e.state.selection instanceof $))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){let i=r.before(o),s=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?i:null}}return null}function DI(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function S1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return gs(e.state.doc.resolve(r))}var J8=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),A1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,A1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function A1(e,t,n,r,o,a){let i=0,s=!0,l=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new Z8(-1,!1)},apply(i,s){return s.apply(i)}},props:{attributes:i=>{let s=fn.getState(i);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(i,s)=>{Y8(i,s,e,o)},mouseleave:i=>{Q8(i)},mousedown:(i,s)=>{e5(i,s,t,n)}},decorations:i=>{let s=fn.getState(i);if(s&&s.activeHandle>-1)return a5(i,s.activeHandle)},nodeViews:{}}});return a}var Z8=class lp{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(fn);if(r&&r.setHandle!=null)return new lp(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new lp(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return I1(t.doc.resolve(o))||(o=-1),new lp(o,n.dragging)}return n}};function Y8(e,t,n,r){if(!e.editable)return;let o=fn.getState(e.state);if(o&&!o.dragging){let a=n5(t.target),i=-1;if(a){let{left:s,right:l}=a.getBoundingClientRect();t.clientX-s<=n?i=RI(e,t,"left",n):l-t.clientX<=n&&(i=RI(e,t,"right",n))}if(i!=o.activeHandle){if(!r&&i!==-1){let s=e.state.doc.resolve(i),l=s.node(-1),u=Ve.get(l),c=s.start(-1);if(u.colCount(s.pos-c)+s.nodeAfter.attrs.colspan-1==u.width-1)return}e_(e,i)}}}function Q8(e){if(!e.editable)return;let t=fn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&e_(e,-1)}function e5(e,t,n,r){var o;if(!e.editable)return!1;let a=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,i=fn.getState(e.state);if(!i||i.activeHandle==-1||i.dragging)return!1;let s=e.state.doc.nodeAt(i.activeHandle),l=t5(e,i.activeHandle,s.attrs);e.dispatch(e.state.tr.setMeta(fn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){a.removeEventListener("mouseup",u),a.removeEventListener("mousemove",c);let f=fn.getState(e.state);f?.dragging&&(r5(e,f.activeHandle,OI(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(fn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=fn.getState(e.state);if(f&&f.dragging){let p=OI(f.dragging,d,n);PI(e,f.activeHandle,p,r)}}return PI(e,i.activeHandle,l,r),a.addEventListener("mouseup",u),a.addEventListener("mousemove",c),t.preventDefault(),!0}function t5(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let a=e.domAtPos(t),i=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let l=0;l{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(a=>parseInt(a,10)):null;if(!o){let a=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),i=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(i&&i>-1&&a&&a[i]){let s=a[i].getAttribute("width");return s?[parseInt(s,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",re(this.options.HTMLAttributes,e),0]}}),B1=ee.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",re(this.options.HTMLAttributes,e),0]}}),F1=ee.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",re(this.options.HTMLAttributes,e),0]}});function O1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function n_(e,t,n,r,o,a){var i;let s=0,l=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function u5(e,t,n,r,o){let a=l5(e),i=[],s=[];for(let u=0;u{let{selection:t}=e.state;if(!c5(t))return!1;let n=0,r=Cb(t.ranges[0].$from,a=>a.type.name==="table");return r?.node.descendants(a=>{if(a.type.name==="table")return!1;["tableCell","tableHeader"].includes(a.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},d5="";function f5(e){return(e||"").replace(/\s+/g," ").trim()}function p5(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:d5;if(!e||!e.content||e.content.length===0)return"";let a=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(b=>{let g="";b.content&&Array.isArray(b.content)&&b.content.length>1?g=b.content.map(v=>t.renderChildren(v)).join(o):g=b.content?t.renderChildren(b.content):"";let x=f5(g),y=b.type==="tableHeader";m.push({text:x,isHeader:y})}),a.push(m)});let i=a.reduce((h,m)=>Math.max(h,m.length),0);if(i===0)return"";let s=new Array(i).fill(0);a.forEach(h=>{var m;for(let b=0;bs[b]&&(s[b]=x),s[b]<3&&(s[b]=3)}});let l=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=a[0],c=u.some(h=>h.isHeader),d=` +`,f=new Array(i).fill(0).map((h,m)=>c&&u[m]&&u[m].text||"");return d+=`| ${f.map((h,m)=>l(h,s[m])).join(" | ")} | +`,d+=`| ${s.map(h=>"-".repeat(Math.max(3,h))).join(" | ")} | +`,(c?a.slice(1):a).forEach(h=>{d+=`| ${new Array(i).fill(0).map((m,b)=>l(h[b]&&h[b].text||"",s[b])).join(" | ")} | +`}),d}var h5=p5,z1=ee.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:i5,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=s5(e,this.options.cellMinWidth),a=t.style;function i(){return a||(r?`width: ${r}`:`min-width: ${o}`)}let s=["table",re(this.options.HTMLAttributes,t,{style:i()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},s]:s},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(a=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(a.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>h5(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:a})=>{let i=u5(a.schema,e,t,n);if(o){let s=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection($.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>qI(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>$I(e,t),deleteColumn:()=>({state:e,dispatch:t})=>VI(e,t),addRowBefore:()=>({state:e,dispatch:t})=>KI(e,t),addRowAfter:()=>({state:e,dispatch:t})=>GI(e,t),deleteRow:()=>({state:e,dispatch:t})=>jI(e,t),deleteTable:()=>({state:e,dispatch:t})=>ZI(e,t),mergeCells:()=>({state:e,dispatch:t})=>N1(e,t),splitCell:()=>({state:e,dispatch:t})=>D1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>bs("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>bs("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>JI(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>N1(e,t)?!0:D1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>XI(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>R1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>R1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&M1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=ge.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:cp,"Mod-Backspace":cp,Delete:cp,"Mod-Delete":cp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[QI({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],t_({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(X(e,"tableRole",t))}}}),fX=ae.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(z1.configure(this.options.table)),this.options.tableCell!==!1&&e.push(P1.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(B1.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(F1.configure(this.options.tableRow)),e}});var S_=P(w_(),1);var mp=S_.default;function I_(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?I_(n.children,r):{text:n.value,classes:r}})}function E_(e){return e.value||e.children||[]}function oz(e){return!!mp.getLanguage(e)}function L_({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return of(e,a=>a.type.name===t).forEach(a=>{var i;let s=a.pos+1,l=a.node.attrs.language||r,u=n.listLanguages(),c=l&&(u.includes(l)||oz(l)||(i=n.registered)!=null&&i.call(n,l))?E_(n.highlight(l,a.node.textContent)):E_(n.highlightAuto(a.node.textContent));I_(c).forEach(d=>{let f=s+d.text.length;if(d.classes.length){let p=Re.inline(s,f,{class:d.classes.join(" ")});o.push(p)}s=f})}),Ce.create(e,o)}function az(e){return typeof e=="function"}function iz({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>az(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new W({key:new Y("lowlight"),state:{init:(o,{doc:a})=>L_({doc:a,name:e,lowlight:t,defaultLanguage:n}),apply:(o,a,i,s)=>{let l=i.selection.$head.parent.type.name,u=s.selection.$head.parent.type.name,c=of(i.doc,f=>f.type.name===e),d=of(s.doc,f=>f.type.name===e);return o.docChanged&&([l,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?L_({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):a.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var sz=AL.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],iz({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),__=sz;function lz(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},v={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},C=[v,d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:C.concat([{begin:/\(/,end:/\)/,keywords:k,contains:C.concat(["self"]),relevance:0}]),relevance:0},S={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"",keywords:k,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function A_(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=lz(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function T_(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(s);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],v=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...x,...y,"set","shopt",...k,...v]},contains:[p,e.SHEBANG(),h,d,a,i,g,s,l,u,c,n]}}function M_(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},y={begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function N_(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},v={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},C=[v,d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:C.concat([{begin:/\(/,end:/\)/,keywords:k,contains:C.concat(["self"]),relevance:0}]),relevance:0},S={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"",keywords:k,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function D_(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],i={keyword:o.concat(a),built_in:t,literal:r},s=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:i},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},s]},y=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:i,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},s,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+y+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:i,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,relevance:0,contains:[g,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k]}}var uz=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),cz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],fz=[...cz,...dz],pz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),hz=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),mz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),gz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function R_(e){let t=e.regex,n=uz(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",a=/@-?\w[\w]*(-\w+)*/,i="[a-zA-Z-][a-zA-Z0-9_-]*",s=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+i,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+hz.join("|")+")"},{begin:":(:)?("+mz.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+gz.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...s,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...s,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:pz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...s,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+fz.join("|")+")\\b"}]}}function O_(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function P_(e){let a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"U_(e,t,n-1))}function H_(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+U_("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,z_,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},z_,u]}}var q_="[A-Za-z$_][0-9A-Za-z$_]*",bz=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],xz=["true","false","null","undefined","NaN","Infinity"],$_=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],V_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],W_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],yz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],kz=[].concat(W_,$_,V_);function K_(e){let t=e.regex,n=(O,{after:G})=>{let oe="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(O,G)=>{let oe=O[0].length+O.index,fe=O.input[oe];if(fe==="<"||fe===","){G.ignoreMatch();return}fe===">"&&(n(O,{after:oe})||G.ignoreMatch());let xe,xt=O.input.substring(oe);if(xe=xt.match(/^\s*=/)){G.ignoreMatch();return}if((xe=xt.match(/^\s+extends\s+/))&&xe.index===0){G.ignoreMatch();return}}},s={$pattern:q_,keyword:bz,literal:xz,built_in:kz,"variable.language":yz},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(y)});let k=[].concat(x,f.contains),v=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(k)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...$_,...V_]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(O){return t.concat("(?!",O.join("|"),")")}let A={match:t.concat(/\b/,V([...W_,"super","import"].map(O=>`${O}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},F={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",T={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,x,{match:/\$\d+/},d,S,{scope:"attr",match:r+t.lookahead(":"),relevance:0},T,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},F,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},A,U,w,M,{match:/\$[(.]/}]}}function G_(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var vs="[0-9](_*[0-9])*",xp=`\\.(${vs})`,yp="[0-9a-fA-F](_*[0-9a-fA-F])*",vz={className:"number",variants:[{begin:`(\\b(${vs})((${xp})|\\.)?|(${xp}))[eE][+-]?(${vs})[fFdD]?\\b`},{begin:`\\b(${vs})((${xp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${xp})[fFdD]?\\b`},{begin:`\\b(${vs})[fFdD]\\b`},{begin:`\\b0[xX]((${yp})\\.?|(${yp})?\\.(${yp}))[pP][+-]?(${vs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${yp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function j_(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},i={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,o]}]};o.contains.push(i);let s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(i,{className:"string"}),"self"]}]},u=vz,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,s,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,l,i,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,l]},i,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},u]}}var Cz=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),wz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Sz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Ez=[...wz,...Sz],Lz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),X_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),J_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Iz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),_z=X_.concat(J_).sort().reverse();function Z_(e){let t=Cz(e),n=_z,r="and or not only",o="[\\w-]+",a="("+o+"|@\\{"+o+"\\})",i=[],s=[],l=function(y){return{className:"string",begin:"~?"+y+".*?"+y}},u=function(y,k,v){return{className:y,begin:k,relevance:v}},c={$pattern:/[a-z-]+/,keyword:r,attribute:Lz.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=s.concat({begin:/\{/,end:/\}/,contains:i}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Iz.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+Ez.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",a,0),u("selector-id","#"+a),u("selector-class","\\."+a,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+X_.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+J_.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},x={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,x,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function Y_(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function Q_(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},s=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,s,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,a,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,l,i,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function tA(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,s={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:s,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function nA(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},i={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,a,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let x=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),i,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=h,i.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function rA(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),i={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(F,M)=>{M.data._beginMatch=F[1]||F[2]},"on:end":(F,M)=>{M.data._beginMatch!==F[1]&&M.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ +]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],k={keyword:g,literal:(F=>{let M=[];return F.forEach(E=>{M.push(E),E.toLowerCase()===E?M.push(E.toUpperCase()):M.push(E.toLowerCase())}),M})(b),built_in:x},v=F=>F.map(M=>M.replace(/\|\d+$/,"")),C={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",v(x).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),S={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},I={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[I,i,S,e.C_BLOCK_COMMENT_MODE,h,m,C]},U={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",v(g).join("\\b|"),"|",v(x).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(U);let V=[I,S,e.C_BLOCK_COMMENT_MODE,h,m,C],A={begin:t.concat(/#\[\s*\\?/,t.either(o,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...V]},...V,{scope:"meta",variants:[{match:o},{match:a}]}]};return{case_insensitive:!1,keywords:k,contains:[A,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},i,U,S,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},C,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:k,contains:["self",A,i,S,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function oA(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function aA(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function iA(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:s,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:s,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function sA(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function lA(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function uA(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),i={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:i},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:i}]},C=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:i},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=C,m.contains=C;let L=[{begin:/^\s*=>/,starts:{end:"$",contains:C}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:i,contains:C}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(u).concat(C)}}function cA(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",s=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:s,literal:l,built_in:u},illegal:""},a]}}var Az=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Tz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Mz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Nz=[...Tz,...Mz],Dz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Rz=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Oz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Pz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function dA(e){let t=Az(e),n=Oz,r=Rz,o="@[a-z-]+",a="and or not only",s={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Nz.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},s,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Pz.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,s,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:Dz.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},s,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function fA(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function pA(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],s=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(v=>!c.includes(v)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(v){return t.concat(/\b/,t.either(...v.map(C=>C.replace(/\s+/,"\\s+"))),/\b/)}let y={scope:"keyword",match:x(f),relevance:0};function k(v,{exceptions:C,when:w}={}){let S=w;return C=C||[],v.map(I=>I.match(/\|\d+$/)||C.includes(I)?I:S(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(h,{when:v=>v.length<3}),literal:a,type:s,built_in:d},contains:[{scope:"type",match:x(i)},y,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function bA(e){return e?typeof e=="string"?e:e.source:null}function xu(e){return Ee("(?=",e,")")}function Ee(...e){return e.map(n=>bA(n)).join("")}function Bz(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function $t(...e){return"("+(Bz(e).capture?"":"?:")+e.map(r=>bA(r)).join("|")+")"}var J1=e=>Ee(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Fz=["Protocol","Type"].map(J1),hA=["init","self"].map(J1),zz=["Any","Self"],j1=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],mA=["false","nil","true"],Uz=["assignment","associativity","higherThan","left","lowerThan","none","right"],Hz=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],gA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],xA=$t(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),yA=$t(xA,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),X1=Ee(xA,yA,"*"),kA=$t(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),vp=$t(kA,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),gr=Ee(kA,vp,"*"),kp=Ee(/[A-Z]/,vp,"*"),qz=["attached","autoclosure",Ee(/convention\(/,$t("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ee(/objc\(/,gr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],$z=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function vA(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,$t(...Fz,...hA)],className:{2:"keyword"}},a={match:Ee(/\./,$t(...j1)),relevance:0},i=j1.filter(Se=>typeof Se=="string").concat(["_|0"]),s=j1.filter(Se=>typeof Se!="string").concat(zz).map(J1),l={variants:[{className:"keyword",match:$t(...s,...hA)}]},u={$pattern:$t(/\b\w+/,/#\w+/),keyword:i.concat(Hz),literal:mA},c=[o,a,l],d={match:Ee(/\./,$t(...gA)),relevance:0},f={className:"built_in",match:Ee(/\b/,$t(...gA),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:X1},{match:`\\.(\\.|${yA})+`}]},b=[h,m],g="([0-9]_*)+",x="([0-9a-fA-F]_*)+",y={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},k=(Se="")=>({className:"subst",variants:[{match:Ee(/\\/,Se,/[0\\tnr"']/)},{match:Ee(/\\/,Se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),v=(Se="")=>({className:"subst",match:Ee(/\\/,Se,/[\t ]*(?:[\r\n]|\r\n)/)}),C=(Se="")=>({className:"subst",label:"interpol",begin:Ee(/\\/,Se,/\(/),end:/\)/}),w=(Se="")=>({begin:Ee(Se,/"""/),end:Ee(/"""/,Se),contains:[k(Se),v(Se),C(Se)]}),S=(Se="")=>({begin:Ee(Se,/"/),end:Ee(/"/,Se),contains:[k(Se),C(Se)]}),I={className:"string",variants:[w(),w("#"),w("##"),w("###"),S(),S("#"),S("##"),S("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],U={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},V=Se=>{let fo=Ee(Se,/\//),te=Ee(/\//,Se);return{begin:fo,end:te,contains:[...L,{scope:"comment",begin:`#(?!.*${te})`,end:/$/}]}},A={scope:"regexp",variants:[V("###"),V("##"),V("#"),U]},F={match:Ee(/`/,gr,/`/)},M={className:"variable",match:/\$\d+/},E={className:"variable",match:`\\$${vp}+`},T=[F,M,E],O={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:$z,contains:[...b,y,I]}]}},G={scope:"keyword",match:Ee(/@/,$t(...qz),xu($t(/\(/,/\s+/)))},oe={scope:"meta",match:Ee(/@/,gr)},fe=[O,G,oe],xe={match:xu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ee(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,vp,"+")},{className:"type",match:kp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ee(/\s+&\s+/,xu(kp)),relevance:0}]},xt={begin://,keywords:u,contains:[...r,...c,...fe,h,xe]};xe.contains.push(xt);let ze={match:Ee(gr,/\s*:/),keywords:"_|0",relevance:0},yt={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",ze,...r,A,...c,...p,...b,y,I,...T,...fe,xe]},co={begin://,keywords:"repeat each",contains:[...r,xe]},Vu={begin:$t(xu(Ee(gr,/\s*:/)),xu(Ee(gr,/\s+/,gr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:gr}]},Ps={begin:/\(/,end:/\)/,keywords:u,contains:[Vu,...r,...c,...b,y,I,...fe,xe,yt],endsParent:!0,illegal:/["']/},Sh={match:[/(func|macro)/,/\s+/,$t(F.match,gr,X1)],className:{1:"keyword",3:"title.function"},contains:[co,Ps,t],illegal:[/\[/,/%/]},Eh={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[co,Ps,t],illegal:/\[|%/},Lh={match:[/operator/,/\s+/,X1],className:{1:"keyword",3:"title"}},Ih={begin:[/precedencegroup/,/\s+/,kp],className:{1:"keyword",3:"title"},contains:[xe],keywords:[...Uz,...mA],end:/}/},hi={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Wu={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},mn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,gr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[co,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:kp},...c],relevance:0}]};for(let Se of I.variants){let fo=Se.contains.find(Ku=>Ku.label==="interpol");fo.keywords=u;let te=[...c,...p,...b,y,I,...T];fo.contains=[...te,{begin:/\(/,end:/\)/,contains:["self",...te]}]}return{name:"Swift",keywords:u,contains:[...r,Sh,Eh,hi,Wu,mn,Lh,Ih,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},A,...c,...p,...b,y,I,...T,...fe,xe,yt]}}var Cp="[A-Za-z$_][0-9A-Za-z$_]*",CA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],wA=["true","false","null","undefined","NaN","Infinity"],SA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],EA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],LA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],IA=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],_A=[].concat(LA,SA,EA);function Vz(e){let t=e.regex,n=(O,{after:G})=>{let oe="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(O,G)=>{let oe=O[0].length+O.index,fe=O.input[oe];if(fe==="<"||fe===","){G.ignoreMatch();return}fe===">"&&(n(O,{after:oe})||G.ignoreMatch());let xe,xt=O.input.substring(oe);if(xe=xt.match(/^\s*=/)){G.ignoreMatch();return}if((xe=xt.match(/^\s+extends\s+/))&&xe.index===0){G.ignoreMatch();return}}},s={$pattern:Cp,keyword:CA,literal:wA,built_in:_A,"variable.language":IA},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(y)});let k=[].concat(x,f.contains),v=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(k)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...SA,...EA]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(O){return t.concat("(?!",O.join("|"),")")}let A={match:t.concat(/\b/,V([...LA,"super","import"].map(O=>`${O}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},F={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",T={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,x,{match:/\$\d+/},d,S,{scope:"attr",match:r+t.lookahead(":"),relevance:0},T,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},F,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},A,U,w,M,{match:/\$[(.]/}]}}function AA(e){let t=e.regex,n=Vz(e),r=Cp,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},i={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Cp,keyword:CA.concat(l),literal:wA,built_in:_A.concat(o),"variable.language":IA},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let x=m.contains.findIndex(y=>y.label===b);if(x===-1)throw new Error("can not find mode to replace");m.contains.splice(x,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,a,i,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",s);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function TA(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,o),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,i,/ *#/)},{begin:t.concat(/# */,t.either(a,o),/ +/,t.either(i,s),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function MA(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},i={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},s={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,i,o,e.QUOTE_STRING_MODE,l,u,s]}}function NA(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,l,s,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,i,l,s]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function DA(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},i={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},s=e.inherit(i,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,a,i],g=[...b];return g.pop(),g.push(s),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var Za={arduino:A_,bash:T_,c:M_,cpp:N_,csharp:D_,css:R_,diff:O_,go:P_,graphql:B_,ini:F_,java:H_,javascript:K_,json:G_,kotlin:j_,less:Z_,lua:Y_,makefile:Q_,markdown:eA,objectivec:tA,perl:nA,php:rA,"php-template":oA,plaintext:aA,python:iA,"python-repl":sA,r:lA,ruby:uA,rust:cA,scss:dA,shell:fA,sql:pA,swift:vA,typescript:AA,vbnet:TA,wasm:MA,xml:NA,yaml:DA};var RA={},Wz="hljs-";function Ya(e){let t=mp.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:o,register:a,registerAlias:i,registered:s};function n(l,u,c){let d=c||RA,f=typeof d.prefix=="string"?d.prefix:Wz;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Z1,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(l,u){let d=(u||RA).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function a(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&t.registerLanguage(c,l[c])}}function i(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){let d=l[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function s(l){return!!t.getLanguage(l)}}var Z1=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(i,s){return s?i+"_".repeat(s):n.options.classPrefix+i}),o=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var ix={};Bs(ix,{arrayReplaceAt:()=>ax,assign:()=>Ss,escapeHtml:()=>to,escapeRE:()=>_9,fromCodePoint:()=>vu,has:()=>b9,isMdAsciiPunct:()=>ti,isPunctChar:()=>ei,isSpace:()=>ce,isString:()=>Rp,isValidEntityCode:()=>Op,isWhiteSpace:()=>Qa,lib:()=>A9,normalizeReference:()=>ni,unescapeAll:()=>eo,unescapeMd:()=>C9});var Ip={};Bs(Ip,{decode:()=>yu,encode:()=>Ep,format:()=>Cs,parse:()=>ku});var OA={};function Kz(e){let t=OA[e];if(t)return t;t=OA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),a+=6;continue}}if((s&248)===240&&a+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),a+=9;continue}}o+="\uFFFD"}return o})}wp.defaultChars=";/?:@&=+$,#";wp.componentChars="";var yu=wp;var PA={};function Gz(e){let t=PA[e];if(t)return t;t=PA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=Gz(t),o="";for(let a=0,i=e.length;a=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1=56320&&l<=57343){o+=encodeURIComponent(e[a]+e[a+1]),a++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[a])}return o}Sp.defaultChars=";/?:@&=+$,-_.!~*'()#";Sp.componentChars="-_.!~*'()";var Ep=Sp;function Cs(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Lp(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var jz=/^([a-z0-9.+-]+:)/i,Xz=/:[0-9]*$/,Jz=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Zz=["<",">",'"',"`"," ","\r",` +`," "],Yz=["{","}","|","\\","^","`"].concat(Zz),Qz=["'"].concat(Yz),BA=["%","/","?",";","#"].concat(Qz),FA=["/","?","#"],e9=255,zA=/^[+a-z0-9A-Z_-]{0,63}$/,t9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,UA={javascript:!0,"javascript:":!0},HA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function n9(e,t){if(e&&e instanceof Lp)return e;let n=new Lp;return n.parse(e,t),n}Lp.prototype.parse=function(e,t){let n,r,o,a=e;if(a=a.trim(),!t&&e.split("#").length===1){let u=Jz.exec(a);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let i=jz.exec(a);if(i&&(i=i[0],n=i.toLowerCase(),this.protocol=i,a=a.substr(i.length)),(t||i||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=a.substr(0,2)==="//",o&&!(i&&UA[i])&&(a=a.substr(2),this.slashes=!0)),!UA[i]&&(o||i&&!HA[i])){let u=-1;for(let h=0;h127?x+="x":x+=g[y];if(!x.match(zA)){let y=h.slice(0,m),k=h.slice(m+1),v=g.match(t9);v&&(y.push(v[1]),k.unshift(v[2])),k.length&&(a=k.join(".")+a),this.hostname=y.join(".");break}}}}this.hostname.length>e9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf("#");s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let l=a.indexOf("?");return l!==-1&&(this.search=a.substr(l),a=a.slice(0,l)),a&&(this.pathname=a),HA[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Lp.prototype.parseHost=function(e){let t=Xz.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var ku=n9;var Y1={};Bs(Y1,{Any:()=>_p,Cc:()=>Ap,Cf:()=>qA,P:()=>ws,S:()=>Tp,Z:()=>Mp});var _p=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Ap=/[\0-\x1F\x7F-\x9F]/;var qA=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var ws=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Tp=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Mp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var $A=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var VA=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Q1,r9=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]]),ex=(Q1=String.fromCodePoint)!==null&&Q1!==void 0?Q1:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function tx(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=r9.get(e))!==null&&t!==void 0?t:e}var lt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(lt||(lt={}));var o9=32,Yo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yo||(Yo={}));function nx(e){return e>=lt.ZERO&&e<=lt.NINE}function a9(e){return e>=lt.UPPER_A&&e<=lt.UPPER_F||e>=lt.LOWER_A&&e<=lt.LOWER_F}function i9(e){return e>=lt.UPPER_A&&e<=lt.UPPER_Z||e>=lt.LOWER_A&&e<=lt.LOWER_Z||nx(e)}function s9(e){return e===lt.EQUALS||i9(e)}var st;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(st||(st={}));var br;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(br||(br={}));var Np=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=st.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=br.Strict}startEntity(t){this.decodeMode=t,this.state=st.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case st.EntityStart:return t.charCodeAt(n)===lt.NUM?(this.state=st.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=st.NamedEntity,this.stateNamedEntity(t,n));case st.NumericStart:return this.stateNumericStart(t,n);case st.NumericDecimal:return this.stateNumericDecimal(t,n);case st.NumericHex:return this.stateNumericHex(t,n);case st.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|o9)===lt.LOWER_X?(this.state=st.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=st.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let a=r-n;this.result=this.result*Math.pow(o,a)+parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,a!==0){if(i===lt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==br.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&Yo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Yo.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case st.NamedEntity:return this.result!==0&&(this.decodeMode!==br.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case st.NumericDecimal:return this.emitNumericEntity(0,2);case st.NumericHex:return this.emitNumericEntity(0,3);case st.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case st.EntityStart:return 0}}};function WA(e){let t="",n=new Np(e,r=>t+=ex(r));return function(o,a){let i=0,s=0;for(;(s=o.indexOf("&",s))>=0;){t+=o.slice(i,s),n.startEntity(a);let u=n.write(o,s+1);if(u<0){i=s+n.end();break}i=s+u,s=u===0?i+1:i}let l=t+o.slice(i);return t="",l}}function l9(e,t,n,r){let o=(t&Yo.BRANCH_LENGTH)>>7,a=t&Yo.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){let l=r-a;return l<0||l>=o?-1:e[n+l]-1}let i=n,s=i+o-1;for(;i<=s;){let l=i+s>>>1,u=e[l];if(ur)s=l-1;else return e[l+o]}return-1}var u9=WA($A),CZ=WA(VA);function Qo(e,t=br.Legacy){return u9(e,t)}function Dp(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function rx(e,t){return function(r){let o,a=0,i="";for(;o=e.exec(r);)a!==o.index&&(i+=r.substring(a,o.index)),i+=t.get(o[0].charCodeAt(0)),a=o.index+1;return i+r.substring(a)}}var KA=rx(/[&<>'"]/g,d9),GA=rx(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),jA=rx(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var XA;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(XA||(XA={}));var JA;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(JA||(JA={}));function m9(e){return Object.prototype.toString.call(e)}function Rp(e){return m9(e)==="[object String]"}var g9=Object.prototype.hasOwnProperty;function b9(e,t){return g9.call(e,t)}function Ss(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function ax(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Op(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function vu(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var QA=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,x9=/&([a-z#][a-z0-9]{1,31});/gi,y9=new RegExp(QA.source+"|"+x9.source,"gi"),k9=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function v9(e,t){if(t.charCodeAt(0)===35&&k9.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Op(r)?vu(r):e}let n=Qo(e);return n!==e?n:e}function C9(e){return e.indexOf("\\")<0?e:e.replace(QA,"$1")}function eo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(y9,function(t,n,r){return n||v9(t,r)})}var w9=/[&<>"]/,S9=/[&<>"]/g,E9={"&":"&","<":"<",">":">",'"':"""};function L9(e){return E9[e]}function to(e){return w9.test(e)?e.replace(S9,L9):e}var I9=/[.?*+^$[\]\\(){}|-]/g;function _9(e){return e.replace(I9,"\\$&")}function ce(e){switch(e){case 9:case 32:return!0}return!1}function Qa(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ei(e){return ws.test(e)||Tp.test(e)}function ti(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ni(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var A9={mdurl:Ip,ucmicro:Y1};var cx={};Bs(cx,{parseLinkDestination:()=>lx,parseLinkLabel:()=>sx,parseLinkTitle:()=>ux});function sx(e,t,n){let r,o,a,i,s=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos32))return a;if(r===41){if(i===0)break;i--}o++}return t===o||i!==0||(a.str=eo(e.slice(t,o)),a.pos=o,a.ok=!0),a}function ux(e,t,n,r){let o,a=t,i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)i.str=r.str,i.marker=r.marker;else{if(a>=n)return i;let s=e.charCodeAt(a);if(s!==34&&s!==39&&s!==40)return i;t++,a++,s===40&&(s=41),i.marker=s}for(;a"+to(a.content)+""};xr.code_block=function(e,t,n,r,o){let a=e[t];return""+to(e[t].content)+` +`};xr.fence=function(e,t,n,r,o){let a=e[t],i=a.info?eo(a.info).trim():"",s="",l="";if(i){let c=i.split(/(\s+)/g);s=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(a.content,s,l)||to(a.content):u=to(a.content),u.indexOf("${u} +`}return`
${u}
+`};xr.image=function(e,t,n,r,o){let a=e[t];return a.attrs[a.attrIndex("alt")][1]=o.renderInlineAsText(a.children,n,r),o.renderToken(e,t,n)};xr.hardbreak=function(e,t,n){return n.xhtmlOut?`
`:`
-`};br.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
+`};xr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};br.text=function(e,t){return eo(e[t].content)};br.html_block=function(e,t){return e[t].content};br.html_inline=function(e,t){return e[t].content};function wa(){this.rules=ka({},br)}wa.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n -`:">",i};wa.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let i=0,s=e.length;i=0&&(r=this.attrs[n][1]),r};Ea.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var to=Ea;function qA(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}qA.prototype.Token=to;var VA=qA;var dz=/\r\n?|\n/g,fz=/\0/g;function Z1(e){let t;t=e.src.replace(dz,` -`),t=t.replace(fz,"\uFFFD"),e.src=t}function X1(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Q1(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function hz(e){return/^<\/a\s*>/i.test(e)}function ey(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;s--){let a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(pz(a.content)&&i>0&&i--,hz(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){let l=a.content,u=e.md.linkify.match(l),c=[],d=a.level,f=0;u.length>0&&u[0].index===0&&s>0&&o[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let k=new e.Token("text","",0);k.content=l.slice(f,g),k.level=d,c.push(k)}let y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let v=new e.Token("text","",0);v.content=b,v.level=d,c.push(v);let x=new e.Token("link_close","a",-1);x.level=--d,x.markup="linkify",x.info="auto",c.push(x),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(gz,yz)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function xz(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&WA.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function ty(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(mz.test(e.tokens[t].content)&&vz(e.tokens[t].children),WA.test(e.tokens[t].content)&&xz(e.tokens[t].children))}var kz=/['"]/,jA=/['"]/g,KA="\u2019";function Sp(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function wz(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,i.type!=="text")continue;let a=i.content,l=0,u=a.length;e:for(;l=0)h=a.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(i.content=Sp(i.content,c.index,KA));continue}if(f)for(n=r.length-1;n>=0;n--){let x=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!kz.test(e.tokens[t].content)||wz(e.tokens[t].children,e)}function ry(e){let t,n,r=e.tokens,o=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};yr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};yr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t};yr.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};yr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let i=new Array(n-t);for(let s=0,a=t;ar?i[s]=new Array(l-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};yr.prototype.Token=to;var JA=yr;var Ez=65536;function sy(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function YA(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;let s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;let a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!ce(a)||s===45&&ce(a))return!1;for(;i=4)return!1;u=YA(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let x=0;x=4||(u=YA(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),v+=d-u.length,v>Ez))break;if(o===t+2){let w=e.push("tbody_open","tbody",1);w.map=y=[t+2,0]}let k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let w=0;w=4){r++,o=r;continue}break}e.line=o;let i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+` -`,i.map=[t,e.line],!0}function uy(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;let s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let l=o-a;if(l<3)return!1;let u=e.src.slice(a,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o=4)&&(o=e.skipChars(o,s),!(o-a=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let a=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=i)break;if(e.src.charCodeAt(o++)===62&&!v){let k=e.sCount[h]+1,w,E;e.src.charCodeAt(o)===32?(o++,k++,E=!1,w=!0):e.src.charCodeAt(o)===9?(w=!0,(e.bsCount[h]+k)%4===3?(o++,k++,E=!1):E=!0):w=!1;let _=k;for(a.push(e.bMarks[h]),e.bMarks[h]=o;o=i,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(w?1:0),u.push(e.sCount[h]),e.sCount[h]=_-k,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let x=!1;for(let k=0,w=d.length;k";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=f,g[1]=e.line;for(let v=0;v=4)return!1;let i=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(c=!0);let d,f,p;if((p=XA(e,l))>=0){if(d=!0,s=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=ZA(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);let b=[l,0];a.map=b,a.markup=String.fromCharCode(h);let g=!1,y=e.md.block.ruler.getRules("list"),v=e.parentType;for(e.parentType="list";l=o?E=1:E=k-x,E>4&&(E=1);let _=x+E;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);let T=[l,0];a.map=T,d&&(a.info=e.src.slice(s,p-1));let C=e.tight,U=e.tShift[l],V=e.sCount[l],A=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[l]=w-e.bMarks[l],e.sCount[l]=k,w>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||g)&&(u=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=A,e.tShift[l]=U,e.sCount[l]=V,e.tight=C,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),l=e.line,T[1]=l,l>=n||e.sCount[l]=4)break;let F=!1;for(let R=0,S=y.length;R=4||e.src.charCodeAt(o)!==91)return!1;function a(y){let v=e.lineMax;if(y>=v||e.isEmpty(y))return null;let x=!1;if(e.sCount[y]-e.blkIndent>3&&(x=!0),e.sCount[y]<0&&(x=!0),!x){let E=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let T=!1;for(let C=0,U=E.length;C"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=s),!0):!1}var QA=["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"];var Sz="[a-zA-Z_:][a-zA-Z0-9:._-]*",Cz="[^\"'=<>`\\x00-\\x20]+",Tz="'[^']*'",Nz='"[^"]*"',Az="(?:"+Cz+"|"+Tz+"|"+Nz+")",Mz="(?:\\s+"+Sz+"(?:\\s*=\\s*"+Az+")?)",e3="<[A-Za-z][A-Za-z0-9\\-]*"+Mz+"*\\s*\\/?>",t3="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Rz="",Dz="<[?][\\s\\S]*?[?]>",Oz="]*>",Iz="",n3=new RegExp("^(?:"+e3+"|"+t3+"|"+Rz+"|"+Dz+"|"+Oz+"|"+Iz+")"),r3=new RegExp("^(?:"+e3+"|"+t3+")");var _a=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(r3.source+"\\s*$"),/^$/,!1]];function hy(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<_a.length&&!_a[a][0].test(s);a++);if(a===_a.length)return!1;if(r)return _a[a][2];let l=t+1;if(!_a[a][1].test(s)){for(;l=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o6||oo&&ce(e.src.charCodeAt(l-1))&&(i=l),e.line=t+1;let u=e.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,i).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function gy(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(p=h))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[i]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[s]=i){e.line=n;break}let l=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};yu.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,i=e;for(;i0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(Pz);if(!o)return!1;let i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");let l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let u=e.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(a);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=a.length-i.length,!0}function xy(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){ky[e.charCodeAt(0)]=1});function wy(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&a<=57343&&(i+=e.src[n+1],n++)}let s="\\"+i;if(!t){let a=e.push("text_special","",0);o<256&&ky[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function Ey(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let i=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";let u=e.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function Uz(e){let t=e.tokens_meta,n=e.tokens_meta.length;a3(e,e.delimiters);for(let r=0;r=d)return!1;if(l=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",l=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[Qi(r)],!i)return e.pos=c,!1;s=i.href,a=i.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function Ty(e,t){let n,r,o,i,s,a,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;for(u=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?i=a.pos:c=""),u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?o=e.src.slice(u,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[Qi(o)],!s)return e.pos=d,!1;c=s.href,l=s.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,l&&g.push(["title",l])}return e.pos=i,e.posMax=f,!0}var Hz=/^([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])?)*)$/,$z=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Ny(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let i=e.src.slice(r+1,n);if($z.test(i)){let s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(Hz.test(i)){let s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function qz(e){return/^\s]/i.test(e)}function Vz(e){return/^<\/a\s*>/i.test(e)}function Wz(e){let t=e|32;return t>=97&&t<=122}function Ay(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!Wz(o))return!1;let i=e.src.slice(r).match(n3);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=i[0],qz(s.content)&&e.linkLevel++,Vz(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var jz=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Kz=/^&([a-z][a-z0-9]{1,31});/i;function My(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(jz);if(i){if(!t){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=_p(s)?bu(s):bu(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(Kz);if(i){let s=Xo(i[0]);if(s!==i[0]){if(!t){let a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function l3(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,i=[];for(let s=0;sl;u-=i[u]+1){let d=e[u];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,a.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function Ry(e){let t=e.tokens_meta,n=e.tokens_meta.length;l3(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};vu.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};vu.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let i=this.ruler2.getRules(""),s=i.length;for(let a=0;a|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Ly(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ap(e){return Object.prototype.toString.call(e)}function Gz(e){return Ap(e)==="[object String]"}function Jz(e){return Ap(e)==="[object Object]"}function Yz(e){return Ap(e)==="[object RegExp]"}function d3(e){return Ap(e)==="[object Function]"}function Zz(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var p3={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Xz(e){return Object.keys(e||{}).reduce(function(t,n){return t||p3.hasOwnProperty(n)},!1)}var Qz={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},e7="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",t7="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function n7(e){e.__index__=-1,e.__text_cache__=""}function r7(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function f3(){return function(e,t){t.normalize(e)}}function Np(e){let t=e.re=c3(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(e7),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function i(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){let l=e.__schemas__[a];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[a]=u,Jz(l)){Yz(l.validate)?u.validate=r7(l.validate):d3(l.validate)?u.validate=l.validate:i(a,l),d3(l.normalize)?u.normalize=l.normalize:l.normalize?i(a,l):u.normalize=f3();return}if(Gz(l)){o.push(a);return}i(a,l)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:f3()};let s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(Zz).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),n7(e)}function o7(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function Py(e,t){let n=new o7(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function fn(e,t){if(!(this instanceof fn))return new fn(e,t);t||Xz(e)&&(t=e,e={}),this.__opts__=Ly({},p3,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Ly({},Qz,e),this.__compiled__={},this.__tlds__=t7,this.__tlds_replaced__=!1,this.re={},Np(this)}fn.prototype.add=function(t,n){return this.__schemas__[t]=n,Np(this),this};fn.prototype.set=function(t){return this.__opts__=Ly(this.__opts__,t),this};fn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,i,s,a,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],l.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};fn.prototype.pretest=function(t){return this.re.pretest.test(t)};fn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};fn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Py(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(Py(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};fn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,Py(this,0)):null};fn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Np(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Np(this),this)};fn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};fn.prototype.onCompile=function(){};var h3=fn;var i7=/^xn--/,s7=/[^\0-\x7F]/,a7=/[\x2E\u3002\uFF0E\uFF61]/g,l7={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},By=35,vr=Math.floor,Fy=String.fromCharCode;function Qo(e){throw new RangeError(l7[e])}function u7(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function g3(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(a7,".");let o=e.split("."),i=u7(o,t).join(".");return r+i}function b3(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),d7=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},m3=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},y3=function(e,t,n){let r=0;for(e=n?vr(e/700):e>>1,e+=vr(e/t);e>By*26>>1;r+=36)e=vr(e/By);return vr(r+(By+1)*e/(e+38))},v3=function(e){let t=[],n=e.length,r=0,o=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let a=0;a=128&&Qo("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a=n&&Qo("invalid-input");let f=d7(e.charCodeAt(a++));f>=36&&Qo("invalid-input"),f>vr((2147483647-r)/c)&&Qo("overflow"),r+=f*c;let p=d<=i?1:d>=i+26?26:d-i;if(fvr(2147483647/h)&&Qo("overflow"),c*=h}let u=t.length+1;i=y3(r-l,u,l==0),vr(r/u)>2147483647-o&&Qo("overflow"),o+=vr(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},x3=function(e){let t=[];e=b3(e);let n=e.length,r=128,o=0,i=72;for(let l of e)l<128&&t.push(Fy(l));let s=t.length,a=s;for(s&&t.push("-");a=r&&cvr((2147483647-o)/u)&&Qo("overflow"),o+=(l-r)*u,r=l;for(let c of e)if(c2147483647&&Qo("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=i?1:f>=i+26?26:f-i;if(d=0))try{t.hostname=zy.toASCII(t.hostname)}catch{}return hp(va(t))}function x7(e){let t=gu(e,!0);if(t.hostname&&(!t.protocol||_3.indexOf(t.protocol)>=0))try{t.hostname=zy.toUnicode(t.hostname)}catch{}return mu(va(t),mu.defaultChars+"%")}function Rn(e,t){if(!(this instanceof Rn))return new Rn(e,t);t||Ep(e)||(t=e||{},e="default"),this.inline=new u3,this.block=new o3,this.core=new GA,this.renderer=new $A,this.linkify=new h3,this.validateLink=y7,this.normalizeLink=v7,this.normalizeLinkText=x7,this.utils=j1,this.helpers=ka({},Y1),this.options={},this.configure(e),t&&this.set(t)}Rn.prototype.set=function(e){return ka(this.options,e),this};Rn.prototype.configure=function(e){let t=this;if(Ep(e)){let n=e;if(e=m7[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Rn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Rn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Rn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Rn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Rn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Rn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Rn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Sa=Rn;var k7=new Oo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function w7(e,t){if(e.isText&&t.isText&&de.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var $y=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:de.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks),s;o&&(s=w7(o,i))?r[r.length-1]=s:r.push(i)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{s.openNode(i,xu(o,a,l,u)),s.addText(S3(a.content)),s.closeNode()}:(n[r+"_open"]=(s,a,l,u)=>s.openNode(i,xu(o,a,l,u)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=e.nodeType(o.node);n[r]=(s,a,l,u)=>s.addNode(i,xu(o,a,l,u))}else if(o.mark){let i=e.marks[o.mark];Uy(o,r)?n[r]=(s,a,l,u)=>{s.openMark(i.create(xu(o,a,l,u))),s.addText(S3(a.content)),s.closeMark(i)}:(n[r+"_open"]=(s,a,l,u)=>s.openMark(i.create(xu(o,a,l,u))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)Uy(o,r)?n[r]=Hy:(n[r+"_open"]=Hy,n[r+"_close"]=Hy);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var qy=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=E7(t,r)}parse(t,n={}){let r=new $y(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function C3(e,t){for(;++t({tight:C3(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:C3(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),_7={open:"",close:"",mixable:!0},Vy=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new ku(this.nodes,this.marks,n);return r.renderContent(t),r.out}},Gn=new Vy({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` +`};xr.text=function(e,t){return to(e[t].content)};xr.html_block=function(e,t){return e[t].content};xr.html_inline=function(e,t){return e[t].content};function Es(){this.rules=Ss({},xr)}Es.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n +`:">",a};Es.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let a=0,i=e.length;a=0&&(r=this.attrs[n][1]),r};Ls.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var no=Ls;function tT(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}tT.prototype.Token=no;var nT=tT;var T9=/\r\n?|\n/g,M9=/\0/g;function dx(e){let t;t=e.src.replace(T9,` +`),t=t.replace(M9,"\uFFFD"),e.src=t}function fx(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function px(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function D9(e){return/^<\/a\s*>/i.test(e)}function hx(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;i--){let s=o[i];if(s.type==="link_close"){for(i--;o[i].level!==s.level&&o[i].type!=="link_open";)i--;continue}if(s.type==="html_inline"&&(N9(s.content)&&a>0&&a--,D9(s.content)&&a++),!(a>0)&&s.type==="text"&&e.md.linkify.test(s.content)){let l=s.content,u=e.md.linkify.match(l),c=[],d=s.level,f=0;u.length>0&&u[0].index===0&&i>0&&o[i-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let v=new e.Token("text","",0);v.content=l.slice(f,g),v.level=d,c.push(v)}let x=new e.Token("link_open","a",1);x.attrs=[["href",m]],x.level=d++,x.markup="linkify",x.info="auto",c.push(x);let y=new e.Token("text","",0);y.content=b,y.level=d,c.push(y);let k=new e.Token("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",c.push(k),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(O9,B9)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function z9(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&rT.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function mx(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(R9.test(e.tokens[t].content)&&F9(e.tokens[t].children),rT.test(e.tokens[t].content)&&z9(e.tokens[t].children))}var U9=/['"]/,oT=/['"]/g,aT="\u2019";function Pp(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function H9(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=i);n--);if(r.length=n+1,a.type!=="text")continue;let s=a.content,l=0,u=s.length;e:for(;l=0)h=s.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(a.content=Pp(a.content,c.index,aT));continue}if(f)for(n=r.length-1;n>=0;n--){let k=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!U9.test(e.tokens[t].content)||H9(e.tokens[t].children,e)}function bx(e){let t,n,r=e.tokens,o=r.length;for(let a=0;a0&&this.level++,this.tokens.push(r),r};yr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};yr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t};yr.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};yr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let a=new Array(n-t);for(let i=0,s=t;sr?a[i]=new Array(l-r+1).join(" ")+this.src.slice(c,d):a[i]=this.src.slice(c,d)}return a.join("")};yr.prototype.Token=no;var sT=yr;var q9=65536;function kx(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function lT(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),a=!1,i=0,s="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let a=e.bMarks[o]+e.tShift[o];if(a>=e.eMarks[o])return!1;let i=e.src.charCodeAt(a++);if(i!==124&&i!==45&&i!==58||a>=e.eMarks[o])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!ce(s)||i===45&&ce(s))return!1;for(;a=4)return!1;u=lT(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let k=0;k=4||(u=lT(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),y+=d-u.length,y>q9))break;if(o===t+2){let C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}let v=e.push("tr_open","tr",1);v.map=[o,o+1];for(let C=0;C=4){r++,o=r;continue}break}e.line=o;let a=e.push("code_block","code",0);return a.content=e.getLines(t,o,4+e.blkIndent,!1)+` +`,a.map=[t,e.line],!0}function wx(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>a)return!1;let i=e.src.charCodeAt(o);if(i!==126&&i!==96)return!1;let s=o;o=e.skipChars(o,i);let l=o-s;if(l<3)return!1;let u=e.src.slice(s,o),c=e.src.slice(o,a);if(i===96&&c.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],o=4)&&(o=e.skipChars(o,i),!(o-s=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let s=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=a)break;if(e.src.charCodeAt(o++)===62&&!y){let v=e.sCount[h]+1,C,w;e.src.charCodeAt(o)===32?(o++,v++,w=!1,C=!0):e.src.charCodeAt(o)===9?(C=!0,(e.bsCount[h]+v)%4===3?(o++,v++,w=!1):w=!0):C=!1;let S=v;for(s.push(e.bMarks[h]),e.bMarks[h]=o;o=a,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(C?1:0),u.push(e.sCount[h]),e.sCount[h]=S-v,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let k=!1;for(let v=0,C=d.length;v";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=i,e.parentType=f,g[1]=e.line;for(let y=0;y=4)return!1;let a=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(a++);if(i!==42&&i!==45&&i!==95)return!1;let s=1;for(;a=r)return-1;let a=e.src.charCodeAt(o++);if(a<48||a>57)return-1;for(;;){if(o>=r)return-1;if(a=e.src.charCodeAt(o++),a>=48&&a<=57){if(o-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(c=!0);let d,f,p;if((p=cT(e,l))>=0){if(d=!0,i=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(i,p-1)),c&&f!==1)return!1}else if((p=uT(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(s=e.push("ordered_list_open","ol",1),f!==1&&(s.attrs=[["start",f]])):s=e.push("bullet_list_open","ul",1);let b=[l,0];s.map=b,s.markup=String.fromCharCode(h);let g=!1,x=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";l=o?w=1:w=v-k,w>4&&(w=1);let S=k+w;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(h);let I=[l,0];s.map=I,d&&(s.info=e.src.slice(i,p-1));let L=e.tight,U=e.tShift[l],V=e.sCount[l],A=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[l]=C-e.bMarks[l],e.sCount[l]=v,C>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||g)&&(u=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=A,e.tShift[l]=U,e.sCount[l]=V,e.tight=L,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(h),l=e.line,I[1]=l,l>=n||e.sCount[l]=4)break;let F=!1;for(let M=0,E=x.length;M=4||e.src.charCodeAt(o)!==91)return!1;function s(x){let y=e.lineMax;if(x>=y||e.isEmpty(x))return null;let k=!1;if(e.sCount[x]-e.blkIndent>3&&(k=!0),e.sCount[x]<0&&(k=!0),!k){let w=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let I=!1;for(let L=0,U=w.length;L"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=i),!0):!1}var dT=["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"];var V9="[a-zA-Z_:][a-zA-Z0-9:._-]*",W9="[^\"'=<>`\\x00-\\x20]+",K9="'[^']*'",G9='"[^"]*"',j9="(?:"+W9+"|"+K9+"|"+G9+")",X9="(?:\\s+"+V9+"(?:\\s*=\\s*"+j9+")?)",fT="<[A-Za-z][A-Za-z0-9\\-]*"+X9+"*\\s*\\/?>",pT="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",J9="",Z9="<[?][\\s\\S]*?[?]>",Y9="]*>",Q9="",hT=new RegExp("^(?:"+fT+"|"+pT+"|"+J9+"|"+Z9+"|"+Y9+"|"+Q9+")"),mT=new RegExp("^(?:"+fT+"|"+pT+")");var Is=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(mT.source+"\\s*$"),/^$/,!1]];function _x(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let i=e.src.slice(o,a),s=0;for(;s=4)return!1;let i=e.src.charCodeAt(o);if(i!==35||o>=a)return!1;let s=1;for(i=e.src.charCodeAt(++o);i===35&&o6||oo&&ce(e.src.charCodeAt(l-1))&&(a=l),e.line=t+1;let u=e.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,a).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(s),-1);return d.markup="########".slice(0,s),!0}function Tx(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let a=0,i,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s],h=e.eMarks[s];if(p=h))){a=i===61?1:2;break}}if(e.sCount[s]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[a]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[i]=a){e.line=n;break}let l=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),i=e.line,i0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Cu.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,a=e;for(;a0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(tU);if(!o)return!1;let a=o[1],i=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!i)return!1;let s=i.url;if(s.length<=a.length)return!1;s=s.replace(/\*+$/,"");let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let u=e.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=s.length-a.length,!0}function Rx(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let a=r-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){Ox[e.charCodeAt(0)]=1});function Px(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&s<=57343&&(a+=e.src[n+1],n++)}let i="\\"+a;if(!t){let s=e.push("text_special","",0);o<256&&Ox[o]!==0?s.content=a:s.content=i,s.markup=i,s.info="escape"}return e.pos=n+1,!0}function Bx(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let a=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let a=t[o.end],i=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===a.token+1,s=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=i?"strong_open":"em_open",l.tag=i?"strong":"em",l.nesting=1,l.markup=i?s+s:s,l.content="";let u=e.tokens[a.token];u.type=i?"strong_close":"em_close",u.tag=i?"strong":"em",u.nesting=-1,u.markup=i?s+s:s,u.content="",i&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function aU(e){let t=e.tokens_meta,n=e.tokens_meta.length;yT(e,e.delimiters);for(let r=0;r=d)return!1;if(l=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(i=e.md.normalizeLink(o.str),e.md.validateLink(i)?h=o.pos:i="",l=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),a=e.env.references[ni(r)],!a)return e.pos=c,!1;i=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",i]];m.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function Hx(e,t){let n,r,o,a,i,s,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(a=h+1,a=f)return!1;for(u=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?a=s.pos:c=""),u=a;a=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a=0?o=e.src.slice(u,a++):a=h+1):a=h+1,o||(o=e.src.slice(p,h)),i=e.env.references[ni(o)],!i)return e.pos=d,!1;c=i.href,l=i.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,l&&g.push(["title",l])}return e.pos=a,e.posMax=f,!0}var iU=/^([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])?)*)$/,sU=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function qx(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let i=e.src.charCodeAt(n);if(i===60)return!1;if(i===62)break}let a=e.src.slice(r+1,n);if(sU.test(a)){let i=e.md.normalizeLink(a);if(!e.md.validateLink(i))return!1;if(!t){let s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=a.length+2,!0}if(iU.test(a)){let i=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(i))return!1;if(!t){let s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=a.length+2,!0}return!1}function lU(e){return/^\s]/i.test(e)}function uU(e){return/^<\/a\s*>/i.test(e)}function cU(e){let t=e|32;return t>=97&&t<=122}function $x(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!cU(o))return!1;let a=e.src.slice(r).match(hT);if(!a)return!1;if(!t){let i=e.push("html_inline","",0);i.content=a[0],lU(i.content)&&e.linkLevel++,uU(i.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var dU=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,fU=/^&([a-z][a-z0-9]{1,31});/i;function Vx(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let a=e.src.slice(n).match(dU);if(a){if(!t){let i=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),s=e.push("text_special","",0);s.content=Op(i)?vu(i):vu(65533),s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}else{let a=e.src.slice(n).match(fU);if(a){let i=Qo(a[0]);if(i!==a[0]){if(!t){let s=e.push("text_special","",0);s.content=i,s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function kT(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,a=[];for(let i=0;il;u-=a[u]+1){let d=e[u];if(d.marker===s.marker&&d.open&&d.end<0){let f=!1;if((d.close||s.open)&&(d.length+s.length)%3===0&&(d.length%3!==0||s.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?a[u-1]+1:0;a[i]=i-u+p,a[u]=p,s.open=!1,d.end=i,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function Wx(e){let t=e.tokens_meta,n=e.tokens_meta.length;kT(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,a[t]=e.pos};wu.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};wu.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let a=this.ruler2.getRules(""),i=a.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Xx(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Up(e){return Object.prototype.toString.call(e)}function pU(e){return Up(e)==="[object String]"}function hU(e){return Up(e)==="[object Object]"}function mU(e){return Up(e)==="[object RegExp]"}function wT(e){return Up(e)==="[object Function]"}function gU(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var ET={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function bU(e){return Object.keys(e||{}).reduce(function(t,n){return t||ET.hasOwnProperty(n)},!1)}var xU={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},yU="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",kU="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function vU(e){e.__index__=-1,e.__text_cache__=""}function CU(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function ST(){return function(e,t){t.normalize(e)}}function zp(e){let t=e.re=CT(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(yU),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function a(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){let l=e.__schemas__[s];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[s]=u,hU(l)){mU(l.validate)?u.validate=CU(l.validate):wT(l.validate)?u.validate=l.validate:a(s,l),wT(l.normalize)?u.normalize=l.normalize:l.normalize?a(s,l):u.normalize=ST();return}if(pU(l)){o.push(s);return}a(s,l)}),o.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:ST()};let i=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(gU).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),vU(e)}function wU(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function Jx(e,t){let n=new wU(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function pn(e,t){if(!(this instanceof pn))return new pn(e,t);t||bU(e)&&(t=e,e={}),this.__opts__=Xx({},ET,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Xx({},xU,e),this.__compiled__={},this.__tlds__=kU,this.__tlds_replaced__=!1,this.re={},zp(this)}pn.prototype.add=function(t,n){return this.__schemas__[t]=n,zp(this),this};pn.prototype.set=function(t){return this.__opts__=Xx(this.__opts__,t),this};pn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,a,i,s,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(a=this.testSchemaAt(t,n[2],l.lastIndex),a){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(i=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s))),this.__index__>=0};pn.prototype.pretest=function(t){return this.re.pretest.test(t)};pn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};pn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Jx(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(Jx(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};pn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,Jx(this,0)):null};pn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,a){return r!==a[o-1]}).reverse(),zp(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,zp(this),this)};pn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};pn.prototype.onCompile=function(){};var LT=pn;var SU=/^xn--/,EU=/[^\0-\x7F]/,LU=/[\x2E\u3002\uFF0E\uFF61]/g,IU={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Zx=35,kr=Math.floor,Yx=String.fromCharCode;function ea(e){throw new RangeError(IU[e])}function _U(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function _T(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(LU,".");let o=e.split("."),a=_U(o,t).join(".");return r+a}function AT(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),TU=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},IT=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},TT=function(e,t,n){let r=0;for(e=n?kr(e/700):e>>1,e+=kr(e/t);e>Zx*26>>1;r+=36)e=kr(e/Zx);return kr(r+(Zx+1)*e/(e+38))},MT=function(e){let t=[],n=e.length,r=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(let s=0;s=128&&ea("not-basic"),t.push(e.charCodeAt(s));for(let s=i>0?i+1:0;s=n&&ea("invalid-input");let f=TU(e.charCodeAt(s++));f>=36&&ea("invalid-input"),f>kr((2147483647-r)/c)&&ea("overflow"),r+=f*c;let p=d<=a?1:d>=a+26?26:d-a;if(fkr(2147483647/h)&&ea("overflow"),c*=h}let u=t.length+1;a=TT(r-l,u,l==0),kr(r/u)>2147483647-o&&ea("overflow"),o+=kr(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},NT=function(e){let t=[];e=AT(e);let n=e.length,r=128,o=0,a=72;for(let l of e)l<128&&t.push(Yx(l));let i=t.length,s=i;for(i&&t.push("-");s=r&&ckr((2147483647-o)/u)&&ea("overflow"),o+=(l-r)*u,r=l;for(let c of e)if(c2147483647&&ea("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=a?1:f>=a+26?26:f-a;if(d=0))try{t.hostname=Qx.toASCII(t.hostname)}catch{}return Ep(Cs(t))}function zU(e){let t=ku(e,!0);if(t.hostname&&(!t.protocol||PT.indexOf(t.protocol)>=0))try{t.hostname=Qx.toUnicode(t.hostname)}catch{}return yu(Cs(t),yu.defaultChars+"%")}function Nn(e,t){if(!(this instanceof Nn))return new Nn(e,t);t||Rp(e)||(t=e||{},e="default"),this.inline=new vT,this.block=new gT,this.core=new iT,this.renderer=new eT,this.linkify=new LT,this.validateLink=BU,this.normalizeLink=FU,this.normalizeLinkText=zU,this.utils=ix,this.helpers=Ss({},cx),this.options={},this.configure(e),t&&this.set(t)}Nn.prototype.set=function(e){return Ss(this.options,e),this};Nn.prototype.configure=function(e){let t=this;if(Rp(e)){let n=e;if(e=RU[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Nn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Nn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Nn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Nn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Nn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Nn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Nn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var _s=Nn;var UU=new Ro({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function HU(e,t){if(e.isText&&t.isText&&de.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var ny=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:de.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],a=this.schema.text(t,n.marks),i;o&&(i=HU(o,a))?r[r.length-1]=i:r.push(a)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{i.openNode(a,Su(o,s,l,u)),i.addText(BT(s.content)),i.closeNode()}:(n[r+"_open"]=(i,s,l,u)=>i.openNode(a,Su(o,s,l,u)),n[r+"_close"]=i=>i.closeNode())}else if(o.node){let a=e.nodeType(o.node);n[r]=(i,s,l,u)=>i.addNode(a,Su(o,s,l,u))}else if(o.mark){let a=e.marks[o.mark];ey(o,r)?n[r]=(i,s,l,u)=>{i.openMark(a.create(Su(o,s,l,u))),i.addText(BT(s.content)),i.closeMark(a)}:(n[r+"_open"]=(i,s,l,u)=>i.openMark(a.create(Su(o,s,l,u))),n[r+"_close"]=i=>i.closeMark(a))}else if(o.ignore)ey(o,r)?n[r]=ty:(n[r+"_open"]=ty,n[r+"_close"]=ty);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var ry=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=qU(t,r)}parse(t,n={}){let r=new ny(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function FT(e,t){for(;++t({tight:FT(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:FT(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),$U={open:"",close:"",mixable:!0},oy=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new Eu(this.nodes,this.marks,n);return r.renderContent(t),r.out}},Xn=new oy({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` `),e.text(t.textContent,!1),e.write(` -`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,i=>{let s=String(n+i);return e.repeat(" ",r-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return T3(n.child(r),-1)},close(e,t,n,r){return T3(n.child(r-1),1)},escape:!1}});function T3(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let i=o>0&&t>0?" `":"`";for(let s=0;s0&&t<0&&(i+=" "),i}function S7(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var ku=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` +`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,a=>{let i=String(n+a);return e.repeat(" ",r-i.length)+i+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return zT(n.child(r),-1)},close(e,t,n,r){return zT(n.child(r-1),1)},escape:!1}});function zT(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let a=o>0&&t>0?" `":"`";for(let i=0;i0&&t<0&&(a+=" "),a}function VU(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Eu=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` `),t>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let o=1;othis.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,a,l)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=g?s.withText(g):null,s||(u=r))}if(s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&(l==t.childCount-1||!m.isInSet(t.child(l+1).marks))})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(s.text);g&&(o=g,s=b?s.withText(b):null,s||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;mg?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(i),i(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((s,a,l)=>{l&&o&&this.flushClose(1),this.wrapBlock(n,r(l),t,()=>this.render(s,t,l))}),this.inTightList=i}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?B7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mp=(e,t,n)=>(F7(e,typeof t!="symbol"?t+"":t,n),n),z7=oe.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;let a=r.getAttributes(s);return o.updateAttributes(s,{tight:t??!(a!=null&&a.tight)})}return e.options.listTypes.some(s=>i(s))}}}}}),O3=Sa();function B3(e,t){return O3.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new O3.inline.State(e,null,null,[]).scanDelims(t,!0)}function F3(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function U7(e,t,n,r){let o=n,i=e;for(;on&&!B3(i,o).can_close;)i=F3(i,t,o,-1),o--;return{text:i,from:n,to:o}}function $7(e,t,n,r){let o={text:e,from:n,to:r};return o=U7(o.text,t,o.from,o.to),o=H7(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function Yy(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function q7(e){return e?.replace(//g,">")}function V7(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function W7(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var Dp=ee.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(j7(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function j7(e,t){let n=e.type.schema,r=ua(N.from(e),n);return e.isBlock&&(t instanceof N||t.type.name===n.topNodeType.name)?K7(r):r}function K7(e){let n=Yy(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` +`)}render(t,n,r){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,r,o)=>this.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",a=(i,s,l)=>{let u=i?i.marks:[];i&&i.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",i&&i.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(i.text);b&&(c+=b,i=g?i.withText(g):null,i||(u=r))}if(i&&i.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&(l==t.childCount-1||!m.isInSet(t.child(l+1).marks))})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(i.text);g&&(o=g,i=b?i.withText(b):null,i||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;mg?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(a),a(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,a=this.inTightList;this.inTightList=o,t.forEach((i,s,l)=>{l&&o&&this.flushClose(1),this.wrapBlock(n,r(l),t,()=>this.render(i,t,l))}),this.inTightList=a}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?n7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hp=(e,t,n)=>(r7(e,typeof t!="symbol"?t+"":t,n),n),o7=ae.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function a(i){if(!r.isActive(i))return!1;let s=r.getAttributes(i);return o.updateAttributes(i,{tight:t??!(s!=null&&s.tight)})}return e.options.listTypes.some(i=>a(i))}}}}}),WT=_s();function XT(e,t){return WT.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new WT.inline.State(e,null,null,[]).scanDelims(t,!0)}function JT(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function a7(e,t,n,r){let o=n,a=e;for(;on&&!XT(a,o).can_close;)a=JT(a,t,o,-1),o--;return{text:a,from:n,to:o}}function s7(e,t,n,r){let o={text:e,from:n,to:r};return o=a7(o.text,t,o.from,o.to),o=i7(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function cy(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function l7(e){return e?.replace(//g,">")}function u7(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function c7(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var $p=ee.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(d7(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function d7(e,t){let n=e.type.schema,r=fs(_.from(e),n);return e.isBlock&&(t instanceof _||t.type.name===n.topNodeType.name)?f7(r):r}function f7(e){let n=cy(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` ${n.innerHTML} `:` -`,n.outerHTML}var G7=ee.create({name:"blockquote"}),J7=G7.extend({addStorage(){return{markdown:{serialize:Gn.nodes.blockquote,parse:{}}}}}),Y7=ee.create({name:"bulletList"}),U3=Y7.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),Z7=ee.create({name:"codeBlock"}),X7=Z7.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` -`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),Q7=ee.create({name:"hardBreak"}),H3=Q7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var cU=lU.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,i=String(o+t.childCount-1).length,s=e.repeat(" ",i+2),l=uU(t,n,r)%2?") ":". ";e.renderList(t,s,u=>{let c=String(o+u);return e.repeat(" ",i-c.length)+c+l})},parse:{}}}}}),dU=ee.create({name:"paragraph"}),fU=dU.extend({addStorage(){return{markdown:{serialize:Gn.nodes.paragraph,parse:{}}}}});function jy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var pU=ee.create({name:"table"}),hU=pU.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!mU(t)){Dp.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,i)=>{if(e.write("| "),r.forEach((s,a,l)=>{l&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!i){let s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function L3(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function mU(e){let t=jy(e),n=t[0],r=t.slice(1);return!(jy(n).some(o=>o.type.name!=="tableHeader"||L3(o)||o.childCount>1)||r.some(o=>jy(o).some(i=>i.type.name==="tableHeader"||L3(i)||i.childCount>1)))}var gU=ee.create({name:"taskItem"}),bU=gU.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),yU=ee.create({name:"taskList"}),vU=yU.extend({addStorage(){return{markdown:{serialize:U3.storage.markdown.serialize,parse:{setup(e){e.use(P3.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),xU=ee.create({name:"text"}),kU=xU.extend({addStorage(){return{markdown:{serialize(e,t){e.text(q7(t.text))},parse:{}}}}}),wU=et.create({name:"bold"}),EU=wU.extend({addStorage(){return{markdown:{serialize:Gn.marks.strong,parse:{}}}}}),_U=et.create({name:"code"}),SU=_U.extend({addStorage(){return{markdown:{serialize:Gn.marks.code,parse:{}}}}}),CU=et.create({name:"italic"}),TU=CU.extend({addStorage(){return{markdown:{serialize:Gn.marks.em,parse:{}}}}}),NU=et.create({name:"link"}),AU=NU.extend({addStorage(){return{markdown:{serialize:Gn.marks.link,parse:{}}}}}),MU=et.create({name:"strike"}),RU=MU.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),DU=[J7,U3,X7,H3,tU,rU,Dp,iU,aU,cU,fU,hU,bU,vU,kU,EU,SU,z3,TU,AU,RU];function Rp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=DU.find(i=>i.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var Gy=class{constructor(t){Mp(this,"editor",null),this.editor=t}serialize(t){let n=new Ky(this.nodes,this.marks,{hardBreakNodeName:H3.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(Dp)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(z3)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=Rp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=Rp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},Jy=class{constructor(t,n){Mp(this,"editor",null),Mp(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=t,this.md=this.withPatchedRenderer(Sa({html:r,linkify:o,breaks:i}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=Rp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});let r=this.md.render(t),o=Yy(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=Rp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&V7(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,a;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",d=u?"":(s=(a=n.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}W7(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` +`,n.outerHTML}var p7=ee.create({name:"blockquote"}),h7=p7.extend({addStorage(){return{markdown:{serialize:Xn.nodes.blockquote,parse:{}}}}}),m7=ee.create({name:"bulletList"}),YT=m7.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),g7=ee.create({name:"codeBlock"}),b7=g7.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` +`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),x7=ee.create({name:"hardBreak"}),QT=x7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var A7=I7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,a=String(o+t.childCount-1).length,i=e.repeat(" ",a+2),l=_7(t,n,r)%2?") ":". ";e.renderList(t,i,u=>{let c=String(o+u);return e.repeat(" ",a-c.length)+c+l})},parse:{}}}}}),T7=ee.create({name:"paragraph"}),M7=T7.extend({addStorage(){return{markdown:{serialize:Xn.nodes.paragraph,parse:{}}}}});function iy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var N7=ee.create({name:"table"}),D7=N7.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!R7(t)){$p.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,a)=>{if(e.write("| "),r.forEach((i,s,l)=>{l&&e.write(" | ");let u=i.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!a){let i=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${i} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function GT(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function R7(e){let t=iy(e),n=t[0],r=t.slice(1);return!(iy(n).some(o=>o.type.name!=="tableHeader"||GT(o)||o.childCount>1)||r.some(o=>iy(o).some(a=>a.type.name==="tableHeader"||GT(a)||a.childCount>1)))}var O7=ee.create({name:"taskItem"}),P7=O7.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),B7=ee.create({name:"taskList"}),F7=B7.extend({addStorage(){return{markdown:{serialize:YT.storage.markdown.serialize,parse:{setup(e){e.use(jT.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),z7=ee.create({name:"text"}),U7=z7.extend({addStorage(){return{markdown:{serialize(e,t){e.text(l7(t.text))},parse:{}}}}}),H7=et.create({name:"bold"}),q7=H7.extend({addStorage(){return{markdown:{serialize:Xn.marks.strong,parse:{}}}}}),$7=et.create({name:"code"}),V7=$7.extend({addStorage(){return{markdown:{serialize:Xn.marks.code,parse:{}}}}}),W7=et.create({name:"italic"}),K7=W7.extend({addStorage(){return{markdown:{serialize:Xn.marks.em,parse:{}}}}}),G7=et.create({name:"link"}),j7=G7.extend({addStorage(){return{markdown:{serialize:Xn.marks.link,parse:{}}}}}),X7=et.create({name:"strike"}),J7=X7.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),Z7=[h7,YT,b7,QT,k7,C7,$p,S7,L7,A7,M7,D7,P7,F7,U7,q7,V7,ZT,K7,j7,J7];function qp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=Z7.find(a=>a.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var ly=class{constructor(t){Hp(this,"editor",null),this.editor=t}serialize(t){let n=new sy(this.nodes,this.marks,{hardBreakNodeName:QT.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode($p)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(ZT)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=qp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=qp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},uy=class{constructor(t,n){Hp(this,"editor",null),Hp(this,"md",null);let{html:r,linkify:o,breaks:a}=n;this.editor=t,this.md=this.withPatchedRenderer(_s({html:r,linkify:o,breaks:a}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(a=>{var i;return(i=qp(a))===null||i===void 0||(i=i.parse)===null||i===void 0||(i=i.setup)===null||i===void 0?void 0:i.call({editor:this.editor,options:a.options},this.md)});let r=this.md.render(t),o=cy(r);return this.editor.extensionManager.extensions.forEach(a=>{var i;return(i=qp(a))===null||i===void 0||(i=i.parse)===null||i===void 0||(i=i.updateDOM)===null||i===void 0?void 0:i.call({editor:this.editor,options:a.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(a=>{var i;((i=a.nextSibling)===null||i===void 0?void 0:i.nodeType)===Node.TEXT_NODE&&!a.closest("pre")&&(a.nextSibling.textContent=a.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var a;return(a=o.spec.parseDOM)===null||a===void 0?void 0:a.map(i=>i.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&u7(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,a,i,s;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(o=(a=n.match(/^\s+/))===null||a===void 0?void 0:a[0])!==null&&o!==void 0?o:"",d=u?"":(i=(s=n.match(/\s+$/))===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}c7(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` `?o:o[o.length-1]===` -`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},OU=oe.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new W({key:new X("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return wn.fromSchema(this.editor.schema).parseSlice(Yy(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),$3=oe.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=gb.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new Jy(this.editor,this.options),serializer:new Gy(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[z7.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),OU.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var ss=P(Se());var Zy=["top","right","bottom","left"],q3=["start","end"],Xy=Zy.reduce((e,t)=>e.concat(t,t+"-"+q3[0],t+"-"+q3[1]),[]),Dn=Math.min,bt=Math.max,_u=Math.round;var Jn=e=>({x:e,y:e}),IU={left:"right",right:"left",bottom:"top",top:"bottom"},LU={start:"end",end:"start"};function Op(e,t,n){return bt(e,Dn(t,n))}function xr(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function Qy(e){return e==="x"?"y":"x"}function Ip(e){return e==="y"?"height":"width"}var PU=new Set(["top","bottom"]);function Yn(e){return PU.has(pn(e))?"y":"x"}function Lp(e){return Qy(Yn(e))}function ev(e,t,n){n===void 0&&(n=!1);let r=On(e),o=Lp(e),i=Ip(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Eu(s)),[s,Eu(s)]}function j3(e){let t=Eu(e);return[wu(e),t,wu(t)]}function wu(e){return e.replace(/start|end/g,t=>LU[t])}var V3=["left","right"],W3=["right","left"],BU=["top","bottom"],FU=["bottom","top"];function zU(e,t,n){switch(e){case"top":case"bottom":return n?t?W3:V3:t?V3:W3;case"left":case"right":return t?BU:FU;default:return[]}}function K3(e,t,n,r){let o=On(e),i=zU(pn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(wu)))),i}function Eu(e){return e.replace(/left|right|bottom|top/g,t=>IU[t])}function UU(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pp(e){return typeof e!="number"?UU(e):{top:e,right:e,bottom:e,left:e}}function no(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function G3(e,t,n){let{reference:r,floating:o}=e,i=Yn(t),s=Lp(t),a=Ip(s),l=pn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(On(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}var Z3=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=G3(u,r,l),f=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=xr(e,t)||{};if(u==null)return{};let d=Pp(c),f={x:n,y:r},p=Lp(o),h=Ip(p),m=await s.getDimensions(u),b=p==="y",g=b?"top":"left",y=b?"bottom":"right",v=b?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-f[p]-i.floating[h],k=f[p]-i.reference[p],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),E=w?w[v]:0;(!E||!await(s.isElement==null?void 0:s.isElement(w)))&&(E=a.floating[v]||i.floating[h]);let _=x/2-k/2,T=E/2-m[h]/2-1,C=Dn(d[g],T),U=Dn(d[y],T),V=C,A=E-m[h]-U,F=E/2-m[h]/2+_,R=Op(V,F,A),S=!l.arrow&&On(o)!=null&&F!==R&&i.reference[h]/2-(FOn(o)===e),...n.filter(o=>On(o)!==e)]:n.filter(o=>pn(o)===o)).filter(o=>e?On(o)===e||(t?wu(o)!==o:!1):!0)}var Q3=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:i,middlewareData:s,placement:a,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=Xy,autoAlignment:p=!0,...h}=xr(e,t),m=d!==void 0||f===Xy?HU(d||null,p,f):f,b=await ts(t,h),g=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[g];if(y==null)return{};let v=ev(y,i,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(a!==y)return{reset:{placement:m[0]}};let x=[b[pn(y)],b[v[0]],b[v[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:x}],w=m[g+1];if(w)return{data:{index:g+1,overflows:k},reset:{placement:w}};let E=k.map(C=>{let U=On(C.placement);return[C.placement,U&&c?C.overflows.slice(0,2).reduce((V,A)=>V+A,0):C.overflows[0],C.overflows]}).sort((C,U)=>C[1]-U[1]),T=((o=E.filter(C=>C[2].slice(0,On(C[0])?2:3).every(U=>U<=0))[0])==null?void 0:o[0])||E[0][0];return T!==a?{data:{index:g+1,overflows:k},reset:{placement:T}}:{}}}},eM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=xr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pn(o),y=Yn(a),v=pn(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=f||(v||!m?[Eu(a)]:j3(a)),w=h!=="none";!f&&w&&k.push(...K3(a,m,h,x));let E=[a,...k],_=await ts(t,b),T=[],C=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(_[g]),d){let F=ev(o,s,x);T.push(_[F[0]],_[F[1]])}if(C=[...C,{placement:o,overflows:T}],!T.every(F=>F<=0)){var U,V;let F=(((U=i.flip)==null?void 0:U.index)||0)+1,R=E[F];if(R&&(!(d==="alignment"?y!==Yn(R):!1)||C.every(L=>Yn(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:F,overflows:C},reset:{placement:R}};let S=(V=C.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:V.placement;if(!S)switch(p){case"bestFit":{var A;let M=(A=C.filter(L=>{if(w){let K=Yn(L.placement);return K===y||K==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(K=>K>0).reduce((K,re)=>K+re,0)]).sort((L,K)=>L[1]-K[1])[0])==null?void 0:A[0];M&&(S=M);break}case"initialPlacement":S=a;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function J3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Y3(e){return Zy.some(t=>e[t]>=0)}var tM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=xr(e,t);switch(r){case"referenceHidden":{let i=await ts(t,{...o,elementContext:"reference"}),s=J3(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Y3(s)}}}case"escaped":{let i=await ts(t,{...o,altBoundary:!0}),s=J3(i,n.floating);return{data:{escapedOffsets:s,escaped:Y3(s)}}}default:return{}}}}};function nM(e){let t=Dn(...e.map(i=>i.left)),n=Dn(...e.map(i=>i.top)),r=bt(...e.map(i=>i.right)),o=bt(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function $U(e){let t=e.slice().sort((o,i)=>o.y-i.y),n=[],r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>no(nM(o)))}var rM=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:a=2,x:l,y:u}=xr(e,t),c=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),d=$U(c),f=no(nM(c)),p=Pp(a);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&u!=null)return d.find(b=>l>b.left-p.left&&lb.top-p.top&&u=2){if(Yn(n)==="y"){let C=d[0],U=d[d.length-1],V=pn(n)==="top",A=C.top,F=U.bottom,R=V?C.left:U.left,S=V?C.right:U.right,M=S-R,L=F-A;return{top:A,bottom:F,left:R,right:S,width:M,height:L,x:R,y:A}}let b=pn(n)==="left",g=bt(...d.map(C=>C.right)),y=Dn(...d.map(C=>C.left)),v=d.filter(C=>b?C.left===y:C.right===g),x=v[0].top,k=v[v.length-1].bottom,w=y,E=g,_=E-w,T=k-x;return{top:x,bottom:k,left:w,right:E,width:_,height:T,x:w,y:x}}return f}let m=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},qU=new Set(["left","top"]);async function VU(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=pn(n),a=On(n),l=Yn(n)==="y",u=qU.has(s)?-1:1,c=i&&l?-1:1,d=xr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var oM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:a}=t,l=await VU(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},iM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...l}=xr(e,t),u={x:n,y:r},c=await ts(t,l),d=Yn(pn(o)),f=Qy(d),p=u[f],h=u[d];if(i){let b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[b],v=p-c[g];p=Op(y,p,v)}if(s){let b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+c[b],v=h-c[g];h=Op(y,h,v)}let m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}};var sM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=xr(e,t),c=await ts(t,u),d=pn(o),f=On(o),p=Yn(o)==="y",{width:h,height:m}=i.floating,b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");let y=m-c.top-c.bottom,v=h-c.left-c.right,x=Dn(m-c[b],y),k=Dn(h-c[g],v),w=!t.middlewareData.shift,E=x,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),w&&!f){let C=bt(c.left,0),U=bt(c.right,0),V=bt(c.top,0),A=bt(c.bottom,0);p?_=h-2*(C!==0||U!==0?C+U:bt(c.left,c.right)):E=m-2*(V!==0||A!==0?V+A:bt(c.top,c.bottom))}await l({...t,availableWidth:_,availableHeight:E});let T=await s.getDimensions(a.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function Fp(){return typeof window<"u"}function ns(e){return lM(e)?(e.nodeName||"").toLowerCase():"#document"}function Qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(lM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lM(e){return Fp()?e instanceof Node||e instanceof Qt(e).Node:!1}function In(e){return Fp()?e instanceof Element||e instanceof Qt(e).Element:!1}function Zn(e){return Fp()?e instanceof HTMLElement||e instanceof Qt(e).HTMLElement:!1}function aM(e){return!Fp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qt(e).ShadowRoot}var WU=new Set(["inline","contents"]);function Ca(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Ln(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!WU.has(o)}var jU=new Set(["table","td","th"]);function uM(e){return jU.has(ns(e))}var KU=[":popover-open",":modal"];function Su(e){return KU.some(t=>{try{return e.matches(t)}catch{return!1}})}var GU=["transform","translate","scale","rotate","perspective"],JU=["transform","translate","scale","rotate","perspective","filter"],YU=["paint","layout","strict","content"];function zp(e){let t=Up(),n=In(e)?Ln(e):e;return GU.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||JU.some(r=>(n.willChange||"").includes(r))||YU.some(r=>(n.contain||"").includes(r))}function cM(e){let t=ro(e);for(;Zn(t)&&!rs(t);){if(zp(t))return t;if(Su(t))return null;t=ro(t)}return null}function Up(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var ZU=new Set(["html","body","#document"]);function rs(e){return ZU.has(ns(e))}function Ln(e){return Qt(e).getComputedStyle(e)}function Cu(e){return In(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ro(e){if(ns(e)==="html")return e;let t=e.assignedSlot||e.parentNode||aM(e)&&e.host||kr(e);return aM(t)?t.host:t}function dM(e){let t=ro(e);return rs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zn(t)&&Ca(t)?t:dM(t)}function Bp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=dM(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Qt(o);if(i){let a=Hp(s);return t.concat(s,s.visualViewport||[],Ca(o)?o:[],a&&n?Bp(a):[])}return t.concat(o,Bp(o,[],n))}function Hp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mM(e){let t=Ln(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Zn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=_u(n)!==i||_u(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function gM(e){return In(e)?e:e.contextElement}function Ta(e){let t=gM(e);if(!Zn(t))return Jn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=mM(t),s=(i?_u(n.width):n.width)/r,a=(i?_u(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var XU=Jn(0);function bM(e){let t=Qt(e);return!Up()||!t.visualViewport?XU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qt(e)?!1:t}function Tu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=gM(e),s=Jn(1);t&&(r?In(r)&&(s=Ta(r)):s=Ta(e));let a=QU(i,n,r)?bM(i):Jn(0),l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){let f=Qt(i),p=r&&In(r)?Qt(r):r,h=f,m=Hp(h);for(;m&&r&&p!==h;){let b=Ta(m),g=m.getBoundingClientRect(),y=Ln(m),v=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,x=g.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=v,u+=x,h=Qt(m),m=Hp(h)}}return no({width:c,height:d,x:l,y:u})}function $p(e,t){let n=Cu(e).scrollLeft;return t?t.left+n:Tu(kr(e)).left+n}function yM(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$p(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function eH(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=kr(r),a=t?Su(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Jn(1),c=Jn(0),d=Zn(r);if((d||!d&&!i)&&((ns(r)!=="body"||Ca(s))&&(l=Cu(r)),Zn(r))){let p=Tu(r);u=Ta(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!i?yM(s,l):Jn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function tH(e){return Array.from(e.getClientRects())}function nH(e){let t=kr(e),n=Cu(e),r=e.ownerDocument.body,o=bt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=bt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+$p(e),a=-n.scrollTop;return Ln(r).direction==="rtl"&&(s+=bt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}var fM=25;function rH(e,t){let n=Qt(e),r=kr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let c=Up();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}let u=$p(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=fM&&(i-=h)}else u<=fM&&(i+=u);return{width:i,height:s,x:a,y:l}}var oH=new Set(["absolute","fixed"]);function iH(e,t){let n=Tu(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zn(e)?Ta(e):Jn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function pM(e,t,n){let r;if(t==="viewport")r=rH(e,n);else if(t==="document")r=nH(kr(e));else if(In(t))r=iH(t,n);else{let o=bM(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return no(r)}function vM(e,t){let n=ro(e);return n===t||!In(n)||rs(n)?!1:Ln(n).position==="fixed"||vM(n,t)}function sH(e,t){let n=t.get(e);if(n)return n;let r=Bp(e,[],!1).filter(a=>In(a)&&ns(a)!=="body"),o=null,i=Ln(e).position==="fixed",s=i?ro(e):e;for(;In(s)&&!rs(s);){let a=Ln(s),l=zp(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&oH.has(o.position)||Ca(s)&&!l&&vM(e,s))?r=r.filter(c=>c!==s):o=a,s=ro(s)}return t.set(e,r),r}function aH(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Su(t)?[]:sH(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{let d=pM(t,c,o);return u.top=bt(d.top,u.top),u.right=Dn(d.right,u.right),u.bottom=Dn(d.bottom,u.bottom),u.left=bt(d.left,u.left),u},pM(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lH(e){let{width:t,height:n}=mM(e);return{width:t,height:n}}function uH(e,t,n){let r=Zn(t),o=kr(t),i=n==="fixed",s=Tu(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=Jn(0);function u(){l.x=$p(o)}if(r||!r&&!i)if((ns(t)!=="body"||Ca(o))&&(a=Cu(t)),r){let p=Tu(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();let c=o&&!r&&!i?yM(o,a):Jn(0),d=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function tv(e){return Ln(e).position==="static"}function hM(e,t){if(!Zn(e)||Ln(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function xM(e,t){let n=Qt(e);if(Su(e))return n;if(!Zn(e)){let o=ro(e);for(;o&&!rs(o);){if(In(o)&&!tv(o))return o;o=ro(o)}return n}let r=hM(e,t);for(;r&&uM(r)&&tv(r);)r=hM(r,t);return r&&rs(r)&&tv(r)&&!zp(r)?n:r||cM(e)||n}var cH=async function(e){let t=this.getOffsetParent||xM,n=this.getDimensions,r=await n(e.floating);return{reference:uH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dH(e){return Ln(e).direction==="rtl"}var fH={convertOffsetParentRelativeRectToViewportRelativeRect:eH,getDocumentElement:kr,getClippingRect:aH,getOffsetParent:xM,getElementRects:cH,getClientRects:tH,getDimensions:lH,getScale:Ta,isElement:In,isRTL:dH};var qp=oM,Vp=Q3,Wp=iM,jp=eM,Kp=sM,Gp=tM,Jp=X3,Yp=rM;var Zp=(e,t,n)=>{let r=new Map,o={platform:fH,...n},i={...o.platform,_c:r};return Z3(e,t,{...o,platform:i})};function pH(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-o,a=r-n,l=o,u=n;return new DOMRect(l,u,s,a)}var hH=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:i,appendTo:s,getReferencedVirtualElement:a,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:m}=d,{empty:b}=m,g=!h.textBetween(f,p).length&&Wd(d.selection),y=this.element.contains(document.activeElement);return!(!(c.hasFocus()||y)||b||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=s,this.scrollTarget=(u=l?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=a,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(jp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(Wp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(qp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Jp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Kp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(Vp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Gp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Yp(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=Qd(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof $){let i=this.view.nodeDOM(t.from),s=i.dataset.nodeViewWrapper?i:i.querySelector("[data-node-view-wrapper]");s&&(i=s),i&&(o={getBoundingClientRect:()=>i.getBoundingClientRect(),getClientRects:()=>[i.getBoundingClientRect()]})}if(t instanceof ge){let{$anchorCell:i,$headCell:s}=t,a=i?i.pos:s.pos,l=s?s.pos:i.pos,u=this.view.nodeDOM(a),c=this.view.nodeDOM(l);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():pH(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&Zp(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),i=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,i,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(l=>l.$from.pos)),s=Math.max(...o.map(l=>l.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:i,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},nv=e=>new W({key:typeof e.pluginKey=="string"?new X(e.pluginKey):e.pluginKey,view:t=>new hH({view:t,...e})}),cee=oe.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[nv({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var is=P(Se(),1),kM=P(qs(),1),wM=P(Z(),1);var mH=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:i}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:s,state:a})=>{let{selection:l}=a,{$anchor:u,empty:c}=l,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(s,a,l,u)=>{let{composing:c}=s;if(c||!a&&!l)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&((a=this.element.parentNode)!=null&&a.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return fb(e,{textSerializers:Yd(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(jp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(Wp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(qp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Jp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Kp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(Vp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Gp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Yp(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(l=>l.$from.pos)),s=Math.max(...o.map(l=>l.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:i,to:s})}updatePosition(){let{selection:e}=this.editor.state,t=Qd(this.view,e.from,e.to);Zp({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:i})=>{this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},rv=e=>new W({key:typeof e.pluginKey=="string"?new X(e.pluginKey):e.pluginKey,view:t=>new mH({view:t,...e})}),bee=oe.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[rv({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var Na=P(Se(),1),_M=P(qs(),1),SM=P(Z(),1),EM=is.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:i=null,getReferencedVirtualElement:s,options:a,children:l,...u},c)=>{let d=(0,is.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=sf(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:i,getReferencedVirtualElement:s,options:a},m=(0,is.useRef)(h);return m.current=h,(0,is.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let g=nv({...m.current,editor:p,element:b});p.registerPlugin(g);let y=m.current.pluginKey;return()=>{p.unregisterPlugin(y),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,kM.createPortal)((0,wM.jsx)("div",{...u,children:l}),d.current)}),_ee=Na.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:i,...s},a)=>{let l=(0,Na.useRef)(document.createElement("div"));typeof a=="function"?a(l.current):a&&(a.current=l.current);let{editor:u}=sf();return(0,Na.useEffect)(()=>{let c=l.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=rv({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,_M.createPortal)((0,SM.jsx)("div",{...s,children:i}),l.current)});var CM=document.createElement("style");CM.textContent=`/* Floating toolbar container */ +`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},Y7=ae.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new W({key:new Y("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return wn.fromSchema(this.editor.schema).parseSlice(cy(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),eM=ae.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=Ab.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new uy(this.editor,this.options),serializer:new ly(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[o7.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),Y7.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var li=P(ke());var dy=["top","right","bottom","left"],tM=["start","end"],fy=dy.reduce((e,t)=>e.concat(t,t+"-"+tM[0],t+"-"+tM[1]),[]),Dn=Math.min,bt=Math.max,_u=Math.round;var Jn=e=>({x:e,y:e}),Q7={left:"right",right:"left",bottom:"top",top:"bottom"},eH={start:"end",end:"start"};function Vp(e,t,n){return bt(e,Dn(t,n))}function vr(e,t){return typeof e=="function"?e(t):e}function hn(e){return e.split("-")[0]}function Rn(e){return e.split("-")[1]}function py(e){return e==="x"?"y":"x"}function Wp(e){return e==="y"?"height":"width"}var tH=new Set(["top","bottom"]);function Zn(e){return tH.has(hn(e))?"y":"x"}function Kp(e){return py(Zn(e))}function hy(e,t,n){n===void 0&&(n=!1);let r=Rn(e),o=Kp(e),a=Wp(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Iu(i)),[i,Iu(i)]}function oM(e){let t=Iu(e);return[Lu(e),t,Lu(t)]}function Lu(e){return e.replace(/start|end/g,t=>eH[t])}var nM=["left","right"],rM=["right","left"],nH=["top","bottom"],rH=["bottom","top"];function oH(e,t,n){switch(e){case"top":case"bottom":return n?t?rM:nM:t?nM:rM;case"left":case"right":return t?nH:rH;default:return[]}}function aM(e,t,n,r){let o=Rn(e),a=oH(hn(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Lu)))),a}function Iu(e){return e.replace(/left|right|bottom|top/g,t=>Q7[t])}function aH(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gp(e){return typeof e!="number"?aH(e):{top:e,right:e,bottom:e,left:e}}function ro(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function iM(e,t,n){let{reference:r,floating:o}=e,a=Zn(t),i=Kp(t),s=Wp(i),l=hn(t),u=a==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2,p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Rn(t)){case"start":p[i]-=f*(n&&u?-1:1);break;case"end":p[i]+=f*(n&&u?-1:1);break}return p}var uM=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=iM(u,r,l),f=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=vr(e,t)||{};if(u==null)return{};let d=Gp(c),f={x:n,y:r},p=Kp(o),h=Wp(p),m=await i.getDimensions(u),b=p==="y",g=b?"top":"left",x=b?"bottom":"right",y=b?"clientHeight":"clientWidth",k=a.reference[h]+a.reference[p]-f[p]-a.floating[h],v=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),w=C?C[y]:0;(!w||!await(i.isElement==null?void 0:i.isElement(C)))&&(w=s.floating[y]||a.floating[h]);let S=k/2-v/2,I=w/2-m[h]/2-1,L=Dn(d[g],I),U=Dn(d[x],I),V=L,A=w-m[h]-U,F=w/2-m[h]/2+S,M=Vp(V,F,A),E=!l.arrow&&Rn(o)!=null&&F!==M&&a.reference[h]/2-(FRn(o)===e),...n.filter(o=>Rn(o)!==e)]:n.filter(o=>hn(o)===o)).filter(o=>e?Rn(o)===e||(t?Lu(o)!==o:!1):!0)}var dM=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:a,middlewareData:i,placement:s,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=fy,autoAlignment:p=!0,...h}=vr(e,t),m=d!==void 0||f===fy?iH(d||null,p,f):f,b=await oi(t,h),g=((n=i.autoPlacement)==null?void 0:n.index)||0,x=m[g];if(x==null)return{};let y=hy(x,a,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(s!==x)return{reset:{placement:m[0]}};let k=[b[hn(x)],b[y[0]],b[y[1]]],v=[...((r=i.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:k}],C=m[g+1];if(C)return{data:{index:g+1,overflows:v},reset:{placement:C}};let w=v.map(L=>{let U=Rn(L.placement);return[L.placement,U&&c?L.overflows.slice(0,2).reduce((V,A)=>V+A,0):L.overflows[0],L.overflows]}).sort((L,U)=>L[1]-U[1]),I=((o=w.filter(L=>L[2].slice(0,Rn(L[0])?2:3).every(U=>U<=0))[0])==null?void 0:o[0])||w[0][0];return I!==s?{data:{index:g+1,overflows:v},reset:{placement:I}}:{}}}},fM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=vr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let g=hn(o),x=Zn(s),y=hn(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=f||(y||!m?[Iu(s)]:oM(s)),C=h!=="none";!f&&C&&v.push(...aM(s,m,h,k));let w=[s,...v],S=await oi(t,b),I=[],L=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&I.push(S[g]),d){let F=hy(o,i,k);I.push(S[F[0]],S[F[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(F=>F<=0)){var U,V;let F=(((U=a.flip)==null?void 0:U.index)||0)+1,M=w[F];if(M&&(!(d==="alignment"?x!==Zn(M):!1)||L.every(O=>Zn(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:F,overflows:L},reset:{placement:M}};let E=(V=L.filter(T=>T.overflows[0]<=0).sort((T,O)=>T.overflows[1]-O.overflows[1])[0])==null?void 0:V.placement;if(!E)switch(p){case"bestFit":{var A;let T=(A=L.filter(O=>{if(C){let G=Zn(O.placement);return G===x||G==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(G=>G>0).reduce((G,oe)=>G+oe,0)]).sort((O,G)=>O[1]-G[1])[0])==null?void 0:A[0];T&&(E=T);break}case"initialPlacement":E=s;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function sM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lM(e){return dy.some(t=>e[t]>=0)}var pM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=vr(e,t);switch(r){case"referenceHidden":{let a=await oi(t,{...o,elementContext:"reference"}),i=sM(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:lM(i)}}}case"escaped":{let a=await oi(t,{...o,altBoundary:!0}),i=sM(a,n.floating);return{data:{escapedOffsets:i,escaped:lM(i)}}}default:return{}}}}};function hM(e){let t=Dn(...e.map(a=>a.left)),n=Dn(...e.map(a=>a.top)),r=bt(...e.map(a=>a.right)),o=bt(...e.map(a=>a.bottom));return{x:t,y:n,width:r-t,height:o-n}}function sH(e){let t=e.slice().sort((o,a)=>o.y-a.y),n=[],r=null;for(let o=0;or.height/2?n.push([a]):n[n.length-1].push(a),r=a}return n.map(o=>ro(hM(o)))}var mM=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:a,strategy:i}=t,{padding:s=2,x:l,y:u}=vr(e,t),c=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=sH(c),f=ro(hM(c)),p=Gp(s);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&u!=null)return d.find(b=>l>b.left-p.left&&lb.top-p.top&&u=2){if(Zn(n)==="y"){let L=d[0],U=d[d.length-1],V=hn(n)==="top",A=L.top,F=U.bottom,M=V?L.left:U.left,E=V?L.right:U.right,T=E-M,O=F-A;return{top:A,bottom:F,left:M,right:E,width:T,height:O,x:M,y:A}}let b=hn(n)==="left",g=bt(...d.map(L=>L.right)),x=Dn(...d.map(L=>L.left)),y=d.filter(L=>b?L.left===x:L.right===g),k=y[0].top,v=y[y.length-1].bottom,C=x,w=g,S=w-C,I=v-k;return{top:k,bottom:v,left:C,right:w,width:S,height:I,x:C,y:k}}return f}let m=await a.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:i});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},lH=new Set(["left","top"]);async function uH(e,t){let{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=hn(n),s=Rn(n),l=Zn(n)==="y",u=lH.has(i)?-1:1,c=a&&l?-1:1,d=vr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var gM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await uH(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},bM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:b=>{let{x:g,y:x}=b;return{x:g,y:x}}},...l}=vr(e,t),u={x:n,y:r},c=await oi(t,l),d=Zn(hn(o)),f=py(d),p=u[f],h=u[d];if(a){let b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+c[b],y=p-c[g];p=Vp(x,p,y)}if(i){let b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+c[b],y=h-c[g];h=Vp(x,h,y)}let m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}};var xM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=vr(e,t),c=await oi(t,u),d=hn(o),f=Rn(o),p=Zn(o)==="y",{width:h,height:m}=a.floating,b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");let x=m-c.top-c.bottom,y=h-c.left-c.right,k=Dn(m-c[b],x),v=Dn(h-c[g],y),C=!t.middlewareData.shift,w=k,S=v;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),C&&!f){let L=bt(c.left,0),U=bt(c.right,0),V=bt(c.top,0),A=bt(c.bottom,0);p?S=h-2*(L!==0||U!==0?L+U:bt(c.left,c.right)):w=m-2*(V!==0||A!==0?V+A:bt(c.top,c.bottom))}await l({...t,availableWidth:S,availableHeight:w});let I=await i.getDimensions(s.floating);return h!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function Xp(){return typeof window<"u"}function ai(e){return kM(e)?(e.nodeName||"").toLowerCase():"#document"}function en(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cr(e){var t;return(t=(kM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kM(e){return Xp()?e instanceof Node||e instanceof en(e).Node:!1}function On(e){return Xp()?e instanceof Element||e instanceof en(e).Element:!1}function Yn(e){return Xp()?e instanceof HTMLElement||e instanceof en(e).HTMLElement:!1}function yM(e){return!Xp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof en(e).ShadowRoot}var cH=new Set(["inline","contents"]);function As(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!cH.has(o)}var dH=new Set(["table","td","th"]);function vM(e){return dH.has(ai(e))}var fH=[":popover-open",":modal"];function Au(e){return fH.some(t=>{try{return e.matches(t)}catch{return!1}})}var pH=["transform","translate","scale","rotate","perspective"],hH=["transform","translate","scale","rotate","perspective","filter"],mH=["paint","layout","strict","content"];function Jp(e){let t=Zp(),n=On(e)?Pn(e):e;return pH.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||hH.some(r=>(n.willChange||"").includes(r))||mH.some(r=>(n.contain||"").includes(r))}function CM(e){let t=oo(e);for(;Yn(t)&&!ii(t);){if(Jp(t))return t;if(Au(t))return null;t=oo(t)}return null}function Zp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var gH=new Set(["html","body","#document"]);function ii(e){return gH.has(ai(e))}function Pn(e){return en(e).getComputedStyle(e)}function Tu(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oo(e){if(ai(e)==="html")return e;let t=e.assignedSlot||e.parentNode||yM(e)&&e.host||Cr(e);return yM(t)?t.host:t}function wM(e){let t=oo(e);return ii(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yn(t)&&As(t)?t:wM(t)}function jp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=wM(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=en(o);if(a){let s=Yp(i);return t.concat(i,i.visualViewport||[],As(o)?o:[],s&&n?jp(s):[])}return t.concat(o,jp(o,[],n))}function Yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IM(e){let t=Pn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Yn(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=_u(n)!==a||_u(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function _M(e){return On(e)?e:e.contextElement}function Ts(e){let t=_M(e);if(!Yn(t))return Jn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:a}=IM(t),i=(a?_u(n.width):n.width)/r,s=(a?_u(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var bH=Jn(0);function AM(e){let t=en(e);return!Zp()||!t.visualViewport?bH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==en(e)?!1:t}function Mu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),a=_M(e),i=Jn(1);t&&(r?On(r)&&(i=Ts(r)):i=Ts(e));let s=xH(a,n,r)?AM(a):Jn(0),l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){let f=en(a),p=r&&On(r)?en(r):r,h=f,m=Yp(h);for(;m&&r&&p!==h;){let b=Ts(m),g=m.getBoundingClientRect(),x=Pn(m),y=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,k=g.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=y,u+=k,h=en(m),m=Yp(h)}}return ro({width:c,height:d,x:l,y:u})}function Qp(e,t){let n=Tu(e).scrollLeft;return t?t.left+n:Mu(Cr(e)).left+n}function TM(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Qp(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function yH(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a=o==="fixed",i=Cr(r),s=t?Au(t.floating):!1;if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=Jn(1),c=Jn(0),d=Yn(r);if((d||!d&&!a)&&((ai(r)!=="body"||As(i))&&(l=Tu(r)),Yn(r))){let p=Mu(r);u=Ts(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=i&&!d&&!a?TM(i,l):Jn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function kH(e){return Array.from(e.getClientRects())}function vH(e){let t=Cr(e),n=Tu(e),r=e.ownerDocument.body,o=bt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=bt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+Qp(e),s=-n.scrollTop;return Pn(r).direction==="rtl"&&(i+=bt(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}var SM=25;function CH(e,t){let n=en(e),r=Cr(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let c=Zp();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let u=Qp(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=SM&&(a-=h)}else u<=SM&&(a+=u);return{width:a,height:i,x:s,y:l}}var wH=new Set(["absolute","fixed"]);function SH(e,t){let n=Mu(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Yn(e)?Ts(e):Jn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function EM(e,t,n){let r;if(t==="viewport")r=CH(e,n);else if(t==="document")r=vH(Cr(e));else if(On(t))r=SH(t,n);else{let o=AM(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ro(r)}function MM(e,t){let n=oo(e);return n===t||!On(n)||ii(n)?!1:Pn(n).position==="fixed"||MM(n,t)}function EH(e,t){let n=t.get(e);if(n)return n;let r=jp(e,[],!1).filter(s=>On(s)&&ai(s)!=="body"),o=null,a=Pn(e).position==="fixed",i=a?oo(e):e;for(;On(i)&&!ii(i);){let s=Pn(i),l=Jp(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&wH.has(o.position)||As(i)&&!l&&MM(e,i))?r=r.filter(c=>c!==i):o=s,i=oo(i)}return t.set(e,r),r}function LH(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?Au(t)?[]:EH(t,this._c):[].concat(n),r],s=i[0],l=i.reduce((u,c)=>{let d=EM(t,c,o);return u.top=bt(d.top,u.top),u.right=Dn(d.right,u.right),u.bottom=Dn(d.bottom,u.bottom),u.left=bt(d.left,u.left),u},EM(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function IH(e){let{width:t,height:n}=IM(e);return{width:t,height:n}}function _H(e,t,n){let r=Yn(t),o=Cr(t),a=n==="fixed",i=Mu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Jn(0);function u(){l.x=Qp(o)}if(r||!r&&!a)if((ai(t)!=="body"||As(o))&&(s=Tu(t)),r){let p=Mu(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();a&&!r&&o&&u();let c=o&&!r&&!a?TM(o,s):Jn(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function my(e){return Pn(e).position==="static"}function LM(e,t){if(!Yn(e)||Pn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Cr(e)===n&&(n=n.ownerDocument.body),n}function NM(e,t){let n=en(e);if(Au(e))return n;if(!Yn(e)){let o=oo(e);for(;o&&!ii(o);){if(On(o)&&!my(o))return o;o=oo(o)}return n}let r=LM(e,t);for(;r&&vM(r)&&my(r);)r=LM(r,t);return r&&ii(r)&&my(r)&&!Jp(r)?n:r||CM(e)||n}var AH=async function(e){let t=this.getOffsetParent||NM,n=this.getDimensions,r=await n(e.floating);return{reference:_H(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function TH(e){return Pn(e).direction==="rtl"}var MH={convertOffsetParentRelativeRectToViewportRelativeRect:yH,getDocumentElement:Cr,getClippingRect:LH,getOffsetParent:NM,getElementRects:AH,getClientRects:kH,getDimensions:IH,getScale:Ts,isElement:On,isRTL:TH};var eh=gM,th=dM,nh=bM,rh=fM,oh=xM,ah=pM,ih=cM,sh=mM;var lh=(e,t,n)=>{let r=new Map,o={platform:MH,...n},a={...o.platform,_c:r};return uM(e,t,{...o,platform:a})};function NH(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),i=Math.max(e.right,t.right)-o,s=r-n,l=o,u=n;return new DOMRect(l,u,i,s)}var DH=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:a,appendTo:i,getReferencedVirtualElement:s,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:m}=d,{empty:b}=m,g=!h.textBetween(f,p).length&&tf(d.selection),x=this.element.contains(document.activeElement);return!(!(c.hasFocus()||x)||b||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=i,this.scrollTarget=(u=l?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=s,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(rh(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(nh(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(eh(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(ih(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(oh(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(th(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(ah(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(sh(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=cf(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof q){let a=this.view.nodeDOM(t.from),i=a.dataset.nodeViewWrapper?a:a.querySelector("[data-node-view-wrapper]");i&&(a=i),a&&(o={getBoundingClientRect:()=>a.getBoundingClientRect(),getClientRects:()=>[a.getBoundingClientRect()]})}if(t instanceof ge){let{$anchorCell:a,$headCell:i}=t,s=a?a.pos:i.pos,l=i?i.pos:a.pos,u=this.view.nodeDOM(s),c=this.view.nodeDOM(l);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():NH(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&lh(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,a,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,a=Math.min(...o.map(l=>l.$from.pos)),i=Math.max(...o.map(l=>l.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:a,to:i}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},gy=e=>new W({key:typeof e.pluginKey=="string"?new Y(e.pluginKey):e.pluginKey,view:t=>new DH({view:t,...e})}),Fee=ae.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[gy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var si=P(ke(),1),DM=P(Wi(),1),RM=P(Z(),1);var RH=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:a}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:i,state:s})=>{let{selection:l}=s,{$anchor:u,empty:c}=l,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!i.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(i,s,l,u)=>{let{composing:c}=i;if(c||!s&&!l)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:i})=>{var s;if(this.preventHide){this.preventHide=!1;return}i?.relatedTarget&&((s=this.element.parentNode)!=null&&s.contains(i.relatedTarget))||i?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Eb(e,{textSerializers:sf(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(rh(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(nh(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(eh(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(ih(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(oh(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(th(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(ah(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(sh(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,a=Math.min(...o.map(l=>l.$from.pos)),i=Math.max(...o.map(l=>l.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:a,to:i})}updatePosition(){let{selection:e}=this.editor.state,t=cf(this.view,e.from,e.to);lh({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:a})=>{this.element.style.width="max-content",this.element.style.position=a,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},by=e=>new W({key:typeof e.pluginKey=="string"?new Y(e.pluginKey):e.pluginKey,view:t=>new RH({view:t,...e})}),Wee=ae.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[by({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var Ms=P(ke(),1),PM=P(Wi(),1),BM=P(Z(),1),OM=si.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:a=null,getReferencedVirtualElement:i,options:s,children:l,...u},c)=>{let d=(0,si.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=bf(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:a,getReferencedVirtualElement:i,options:s},m=(0,si.useRef)(h);return m.current=h,(0,si.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let g=gy({...m.current,editor:p,element:b});p.registerPlugin(g);let x=m.current.pluginKey;return()=>{p.unregisterPlugin(x),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,DM.createPortal)((0,RM.jsx)("div",{...u,children:l}),d.current)}),Yee=Ms.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:a,...i},s)=>{let l=(0,Ms.useRef)(document.createElement("div"));typeof s=="function"?s(l.current):s&&(s.current=l.current);let{editor:u}=bf();return(0,Ms.useEffect)(()=>{let c=l.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=by({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,PM.createPortal)((0,BM.jsx)("div",{...i,children:a}),l.current)});var FM=document.createElement("style");FM.textContent=`/* Floating toolbar container */ .toolbar_FloatingToolbar { display: flex; align-items: center; @@ -613,7 +613,7 @@ ${n.innerHTML} .linkButton_FloatingToolbar:active { background-color: var(--vscode-toolbar-activeBackground, #4a4a4a); } -`;document.head.appendChild(CM);var Fe={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var Q=P(Z()),ov=({editor:e})=>{let[t,n]=(0,ss.useState)(!1),[r,o]=(0,ss.useState)(""),i=(0,ss.useRef)(null),{isBold:s,isItalic:a,isStrike:l,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=kb({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,ss.useEffect)(()=>{if(t&&i.current){let b=e.getAttributes("link").href||"";o(b),i.current.focus(),i.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},m=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,Q.jsx)(EM,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:g})=>!(g.selection.empty||b.isActive("codeBlock")),children:(0,Q.jsx)("div",{className:Fe.toolbar,children:t?(0,Q.jsxs)("form",{onSubmit:p,className:Fe.linkForm,children:[(0,Q.jsx)("input",{ref:i,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Fe.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,Q.jsx)("button",{type:"submit",className:Fe.linkButton,title:"Apply",children:(0,Q.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Q.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,Q.jsx)("button",{type:"button",onClick:m,className:Fe.linkButton,title:"Remove link",children:(0,Q.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Q.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,Q.jsx)("button",{type:"button",onClick:h,className:Fe.linkButton,title:"Cancel",children:(0,Q.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Q.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Fe.button} ${s?Fe.active:""}`,title:"Bold (Cmd+B)",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,Q.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,Q.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Fe.button} ${a?Fe.active:""}`,title:"Italic (Cmd+I)",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,Q.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,Q.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Fe.button} ${l?Fe.active:""}`,title:"Strikethrough",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Q.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,Q.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,Q.jsx)("div",{className:Fe.divider}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Fe.button} ${u?Fe.active:""}`,title:"Inline Code",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,Q.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Fe.button} ${c?Fe.active:""}`,title:"Link (Cmd+K)",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,Q.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,Q.jsx)("div",{className:Fe.divider}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Fe.button} ${d?Fe.active:""}`,title:"Code Block",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,Q.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,Q.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Fe.button} ${f?Fe.active:""}`,title:"Quote",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,Q.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var qt=P(Se());function gH(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=e,l=r&&!o,u=TS(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=o?"":u,p=l?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=a.nodeBefore)==null?void 0:t.isText)&&a.nodeBefore.text;if(!h)return null;let m=a.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let g=b.input.slice(Math.max(0,b.index-1),b.index),y=new RegExp(`^[${i?.join("")}\0]?$`).test(g);if(i!==null&&!y)return null;let v=m+b.index,x=v+b[0].length;return l&&c.test(h.slice(x-1,x+1))&&(b[0]+=" ",x+=1),v=a.pos?{range:{from:v,to:x},query:b[0].slice(n.length),text:b[0]}:null}var bH=new X("suggestion");function yH({pluginKey:e=bH,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:m=gH}){let b,g=p?.(),y=()=>{let w=t.state.selection.$anchor.pos,E=t.view.coordsAtPos(w),{top:_,right:T,bottom:C,left:U}=E;try{return new DOMRect(U,_,T-U,C-_)}catch{return null}},v=(w,E)=>E?()=>{let _=e.getState(t.state),T=_?.decorationId,C=w.dom.querySelector(`[data-decoration-id="${T}"]`);return C?.getBoundingClientRect()||null}:y;function x(w,E){var _;try{let C=e.getState(w.state),U=C?.decorationId?w.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null,V={editor:t,range:C?.range||{from:0,to:0},query:C?.query||null,text:C?.text||null,items:[],command:A=>d({editor:t,range:C?.range||{from:0,to:0},props:A}),decorationNode:U,clientRect:v(w,U)};(_=g?.onExit)==null||_.call(g,V)}catch{}let T=w.state.tr.setMeta(E,{exit:!0});w.dispatch(T)}let k=new W({key:e,view(){return{update:async(w,E)=>{var _,T,C,U,V,A,F;let R=(_=this.key)==null?void 0:_.getState(E),S=(T=this.key)==null?void 0:T.getState(w.state),M=R.active&&S.active&&R.range.from!==S.range.from,L=!R.active&&S.active,K=R.active&&!S.active,re=!L&&!K&&R.query!==S.query,fe=L||M&&re,ye=re||M,yt=K||M&&re;if(!fe&&!ye&&!yt)return;let ze=yt&&!fe?R:S,vt=w.dom.querySelector(`[data-decoration-id="${ze.decorationId}"]`);b={editor:t,range:ze.range,query:ze.query,text:ze.text,items:[],command:uo=>d({editor:t,range:ze.range,props:uo}),decorationNode:vt,clientRect:v(w,vt)},fe&&((C=g?.onBeforeStart)==null||C.call(g,b)),ye&&((U=g?.onBeforeUpdate)==null||U.call(g,b)),(ye||fe)&&(b.items=await f({editor:t,query:ze.query})),yt&&((V=g?.onExit)==null||V.call(g,b)),ye&&((A=g?.onUpdate)==null||A.call(g,b)),fe&&((F=g?.onStart)==null||F.call(g,b))},destroy:()=>{var w;b&&((w=g?.onExit)==null||w.call(g,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(w,E,_,T){let{isEditable:C}=t,{composing:U}=t.view,{selection:V}=w,{empty:A,from:F}=V,R={...E},S=w.getMeta(e);if(S&&S.exit)return R.active=!1,R.decorationId=null,R.range={from:0,to:0},R.query=null,R.text=null,R;if(R.composing=U,C&&(A||t.view.composing)){(FE.range.to)&&!U&&!E.composing&&(R.active=!1);let M=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:V.$from}),L=`id_${Math.floor(Math.random()*4294967295)}`;M&&h({editor:t,state:T,range:M.range,isActive:E.active})?(R.active=!0,R.decorationId=E.decorationId?E.decorationId:L,R.range=M.range,R.query=M.query,R.text=M.text):R.active=!1}else R.active=!1;return R.active||(R.decorationId=null,R.range={from:0,to:0},R.query=null,R.text=null),R}},props:{handleKeyDown(w,E){var _,T,C,U;let{active:V,range:A}=k.getState(w.state);if(!V)return!1;if(E.key==="Escape"||E.key==="Esc"){let R=k.getState(w.state),S=(_=b?.decorationNode)!=null?_:null,M=S??(R?.decorationId?w.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`):null);if(((T=g?.onKeyDown)==null?void 0:T.call(g,{view:w,event:E,range:R.range}))||!1)return!0;let K={editor:t,range:R.range,query:R.query,text:R.text,items:[],command:re=>d({editor:t,range:R.range,props:re}),decorationNode:M,clientRect:M?()=>M.getBoundingClientRect()||null:null};return(C=g?.onExit)==null||C.call(g,K),x(w,e),!0}return((U=g?.onKeyDown)==null?void 0:U.call(g,{view:w,event:E,range:A}))||!1},decorations(w){let{active:E,range:_,decorationId:T,query:C}=k.getState(w);if(!E)return null;let U=!C?.length,V=[l];return U&&V.push(c),ke.create(w.doc,[Ie.inline(_.from,_.to,{nodeName:a,class:V.join(" "),"data-decoration-id":T,"data-decoration-content":u})])}}});return k}var TM=yH;var NM=document.createElement("style");NM.textContent=`/* Command list container */ +`;document.head.appendChild(FM);var Fe={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var Q=P(Z()),xy=({editor:e})=>{let[t,n]=(0,li.useState)(!1),[r,o]=(0,li.useState)(""),a=(0,li.useRef)(null),{isBold:i,isItalic:s,isStrike:l,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=Ob({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,li.useEffect)(()=>{if(t&&a.current){let b=e.getAttributes("link").href||"";o(b),a.current.focus(),a.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},m=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,Q.jsx)(OM,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:g})=>!(g.selection.empty||b.isActive("codeBlock")),children:(0,Q.jsx)("div",{className:Fe.toolbar,children:t?(0,Q.jsxs)("form",{onSubmit:p,className:Fe.linkForm,children:[(0,Q.jsx)("input",{ref:a,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Fe.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,Q.jsx)("button",{type:"submit",className:Fe.linkButton,title:"Apply",children:(0,Q.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Q.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,Q.jsx)("button",{type:"button",onClick:m,className:Fe.linkButton,title:"Remove link",children:(0,Q.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Q.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,Q.jsx)("button",{type:"button",onClick:h,className:Fe.linkButton,title:"Cancel",children:(0,Q.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Q.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Fe.button} ${i?Fe.active:""}`,title:"Bold (Cmd+B)",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,Q.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,Q.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Fe.button} ${s?Fe.active:""}`,title:"Italic (Cmd+I)",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,Q.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,Q.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Fe.button} ${l?Fe.active:""}`,title:"Strikethrough",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Q.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,Q.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,Q.jsx)("div",{className:Fe.divider}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Fe.button} ${u?Fe.active:""}`,title:"Inline Code",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,Q.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Fe.button} ${c?Fe.active:""}`,title:"Link (Cmd+K)",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,Q.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,Q.jsx)("div",{className:Fe.divider}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Fe.button} ${d?Fe.active:""}`,title:"Code Block",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,Q.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,Q.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,Q.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Fe.button} ${f?Fe.active:""}`,title:"Quote",children:(0,Q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Q.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,Q.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Vt=P(ke());function OH(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:a,startOfLine:i,$position:s}=e,l=r&&!o,u=qE(n),c=new RegExp(`\\s${u}$`),d=i?"^":"",f=o?"":u,p=l?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=s.nodeBefore)==null?void 0:t.isText)&&s.nodeBefore.text;if(!h)return null;let m=s.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let g=b.input.slice(Math.max(0,b.index-1),b.index),x=new RegExp(`^[${a?.join("")}\0]?$`).test(g);if(a!==null&&!x)return null;let y=m+b.index,k=y+b[0].length;return l&&c.test(h.slice(k-1,k+1))&&(b[0]+=" ",k+=1),y=s.pos?{range:{from:y,to:k},query:b[0].slice(n.length),text:b[0]}:null}var PH=new Y("suggestion");function BH({pluginKey:e=PH,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:a=[" "],startOfLine:i=!1,decorationTag:s="span",decorationClass:l="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:m=OH}){let b,g=p?.(),x=()=>{let C=t.state.selection.$anchor.pos,w=t.view.coordsAtPos(C),{top:S,right:I,bottom:L,left:U}=w;try{return new DOMRect(U,S,I-U,L-S)}catch{return null}},y=(C,w)=>w?()=>{let S=e.getState(t.state),I=S?.decorationId,L=C.dom.querySelector(`[data-decoration-id="${I}"]`);return L?.getBoundingClientRect()||null}:x;function k(C,w){var S;try{let L=e.getState(C.state),U=L?.decorationId?C.dom.querySelector(`[data-decoration-id="${L.decorationId}"]`):null,V={editor:t,range:L?.range||{from:0,to:0},query:L?.query||null,text:L?.text||null,items:[],command:A=>d({editor:t,range:L?.range||{from:0,to:0},props:A}),decorationNode:U,clientRect:y(C,U)};(S=g?.onExit)==null||S.call(g,V)}catch{}let I=C.state.tr.setMeta(w,{exit:!0});C.dispatch(I)}let v=new W({key:e,view(){return{update:async(C,w)=>{var S,I,L,U,V,A,F;let M=(S=this.key)==null?void 0:S.getState(w),E=(I=this.key)==null?void 0:I.getState(C.state),T=M.active&&E.active&&M.range.from!==E.range.from,O=!M.active&&E.active,G=M.active&&!E.active,oe=!O&&!G&&M.query!==E.query,fe=O||T&&oe,xe=oe||T,xt=G||T&&oe;if(!fe&&!xe&&!xt)return;let ze=xt&&!fe?M:E,yt=C.dom.querySelector(`[data-decoration-id="${ze.decorationId}"]`);b={editor:t,range:ze.range,query:ze.query,text:ze.text,items:[],command:co=>d({editor:t,range:ze.range,props:co}),decorationNode:yt,clientRect:y(C,yt)},fe&&((L=g?.onBeforeStart)==null||L.call(g,b)),xe&&((U=g?.onBeforeUpdate)==null||U.call(g,b)),(xe||fe)&&(b.items=await f({editor:t,query:ze.query})),xt&&((V=g?.onExit)==null||V.call(g,b)),xe&&((A=g?.onUpdate)==null||A.call(g,b)),fe&&((F=g?.onStart)==null||F.call(g,b))},destroy:()=>{var C;b&&((C=g?.onExit)==null||C.call(g,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(C,w,S,I){let{isEditable:L}=t,{composing:U}=t.view,{selection:V}=C,{empty:A,from:F}=V,M={...w},E=C.getMeta(e);if(E&&E.exit)return M.active=!1,M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null,M;if(M.composing=U,L&&(A||t.view.composing)){(Fw.range.to)&&!U&&!w.composing&&(M.active=!1);let T=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:a,startOfLine:i,$position:V.$from}),O=`id_${Math.floor(Math.random()*4294967295)}`;T&&h({editor:t,state:I,range:T.range,isActive:w.active})?(M.active=!0,M.decorationId=w.decorationId?w.decorationId:O,M.range=T.range,M.query=T.query,M.text=T.text):M.active=!1}else M.active=!1;return M.active||(M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null),M}},props:{handleKeyDown(C,w){var S,I,L,U;let{active:V,range:A}=v.getState(C.state);if(!V)return!1;if(w.key==="Escape"||w.key==="Esc"){let M=v.getState(C.state),E=(S=b?.decorationNode)!=null?S:null,T=E??(M?.decorationId?C.dom.querySelector(`[data-decoration-id="${M.decorationId}"]`):null);if(((I=g?.onKeyDown)==null?void 0:I.call(g,{view:C,event:w,range:M.range}))||!1)return!0;let G={editor:t,range:M.range,query:M.query,text:M.text,items:[],command:oe=>d({editor:t,range:M.range,props:oe}),decorationNode:T,clientRect:T?()=>T.getBoundingClientRect()||null:null};return(L=g?.onExit)==null||L.call(g,G),k(C,e),!0}return((U=g?.onKeyDown)==null?void 0:U.call(g,{view:C,event:w,range:A}))||!1},decorations(C){let{active:w,range:S,decorationId:I,query:L}=v.getState(C);if(!w)return null;let U=!L?.length,V=[l];return U&&V.push(c),Ce.create(C.doc,[Re.inline(S.from,S.to,{nodeName:s,class:V.join(" "),"data-decoration-id":I,"data-decoration-content":u})])}}});return v}var zM=BH;var UM=document.createElement("style");UM.textContent=`/* Command list container */ .commandList_SlashCommands { display: flex; flex-direction: column; @@ -737,7 +737,7 @@ ${n.innerHTML} -`;document.head.appendChild(NM);var wr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var j=P(Z()),vH=[{title:"Heading 1",description:"Large section heading",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("path",{d:"M4 12h8"}),(0,j.jsx)("path",{d:"M4 18V6"}),(0,j.jsx)("path",{d:"M12 18V6"}),(0,j.jsx)("path",{d:"M17 10v8"}),(0,j.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("path",{d:"M4 12h8"}),(0,j.jsx)("path",{d:"M4 18V6"}),(0,j.jsx)("path",{d:"M12 18V6"}),(0,j.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("path",{d:"M4 12h8"}),(0,j.jsx)("path",{d:"M4 18V6"}),(0,j.jsx)("path",{d:"M12 18V6"}),(0,j.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,j.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,j.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,j.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,j.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,j.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,j.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,j.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,j.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,j.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,j.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,j.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,j.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,j.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,j.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,j.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,j.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,j.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,j.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,j.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,j.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,j.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,j.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,j.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,j.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],AM=(0,qt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,i]=(0,qt.useState)(0),s=(0,qt.useRef)(null),[a,l]=(0,qt.useState)({top:0,left:0});(0,qt.useEffect)(()=>{i(0)},[e]),(0,qt.useEffect)(()=>{if(n){let c=n();c&&l({top:c.bottom+4,left:c.left})}},[n]),(0,qt.useEffect)(()=>{let c=s.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,qt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,qt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(i(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,j.jsx)("div",{className:wr.commandList,style:{position:"fixed",top:`${a.top}px`,left:`${a.left}px`},children:(0,j.jsx)("div",{className:wr.noResults,children:"No commands found"})}):(0,j.jsx)("div",{className:wr.commandList,ref:s,style:{position:"fixed",top:`${a.top}px`,left:`${a.left}px`},children:e.map((c,d)=>(0,j.jsxs)("button",{type:"button",className:`${wr.commandItem} ${d===o?wr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>i(d),children:[(0,j.jsx)("div",{className:wr.commandIcon,children:c.icon}),(0,j.jsxs)("div",{className:wr.commandContent,children:[(0,j.jsx)("div",{className:wr.commandTitle,children:c.title}),(0,j.jsx)("div",{className:wr.commandDescription,children:c.description})]})]},c.title))})});AM.displayName="CommandList";var xH=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new wb(AM,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},kH={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>vH.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:xH,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},iv=oe.create({name:"slashCommands",addOptions(){return{suggestion:kH}},addProseMirrorPlugins(){return[TM({editor:this.editor,...this.options.suggestion})]}});var ah=P(Se());var MM=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var oo=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};oo.prototype.normal={};oo.prototype.property={};oo.prototype.space=void 0;function sv(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new oo(n,r,t)}function Nu(e){return e.toLowerCase()}var ut=class{constructor(t,n){this.attribute=n,this.property=t}};ut.prototype.attribute="";ut.prototype.booleanish=!1;ut.prototype.boolean=!1;ut.prototype.commaOrSpaceSeparated=!1;ut.prototype.commaSeparated=!1;ut.prototype.defined=!1;ut.prototype.mustUseProperty=!1;ut.prototype.number=!1;ut.prototype.overloadedBoolean=!1;ut.prototype.property="";ut.prototype.spaceSeparated=!1;ut.prototype.space=void 0;var Au={};Oa(Au,{boolean:()=>ie,booleanish:()=>We,commaOrSpaceSeparated:()=>en,commaSeparated:()=>ei,number:()=>D,overloadedBoolean:()=>Xp,spaceSeparated:()=>we});var wH=0,ie=as(),We=as(),Xp=as(),D=as(),we=as(),ei=as(),en=as();function as(){return 2**++wH}var av=Object.keys(Au),ls=class extends ut{constructor(t,n,r,o){let i=-1;if(super(t,n),RM(this,"space",o),typeof r=="number")for(;++i4&&n.slice(0,4)==="data"&&_H.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(IM,CH);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!IM.test(i)){let s=i.replace(EH,SH);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=ls}return new o(r,t)}function SH(e){return"-"+e.toLowerCase()}function CH(e){return e.charAt(1).toUpperCase()}var LM=sv([lv,DM,uv,cv,dv],"html"),th=sv([lv,OM,uv,cv,dv],"svg");var PM={}.hasOwnProperty;function BM(e,t){let n=t||{};function r(o,...i){let s=r.invalid,a=r.handlers;if(o&&PM.call(o,e)){let l=String(o[e]);s=PM.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var TH=/["&'<>`]/g,NH=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,AH=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,MH=/[|\\{}()[\]^$+*?.]/g,FM=new WeakMap;function zM(e,t){if(e=e.replace(t.subset?RH(t.subset):TH,r),t.subset||t.escapeOnly)return e;return e.replace(NH,n).replace(AH,r);function n(o,i,s){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(o,i,s){return t.format(o.charCodeAt(0),s.charCodeAt(i+1),t)}}function RH(e){let t=FM.get(e);return t||(t=DH(e),FM.set(e,t)),t}function DH(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var qM=["cent","copy","divide","gt","lt","not","para","times"];var VM={}.hasOwnProperty,pv={},rh;for(rh in nh)VM.call(nh,rh)&&(pv[nh[rh]]=rh);var LH=/[^\dA-Za-z]/;function WM(e,t,n,r){let o=String.fromCharCode(e);if(VM.call(pv,o)){let i=pv[o],s="&"+i;return n&&$M.includes(i)&&!qM.includes(i)&&(!r||t&&t!==61&&LH.test(String.fromCharCode(t)))?s:s+";"}return""}function jM(e,t,n){let r=UM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=WM(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i=HM(e,t,n.omitOptionalSemicolons);i.length|^->||--!>|"],FH=["<",">"];function KM(e,t,n,r){return r.settings.bogusComments?"":"";function o(i){return io(i,Object.assign({},r.settings.characterReferences,{subset:FH}))}}function GM(e,t,n,r){return""}function hv(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function JM(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function YM(e){return e.join(" ").trim()}var zH=/[ \t\n\f\r]/g;function us(e){return typeof e=="object"?e.type==="text"?ZM(e.value):!1:ZM(e)}function ZM(e){return e.replace(zH,"")===""}var Ye=XM(1),mv=XM(-1),UH=[];function XM(e){return t;function t(n,r,o){let i=n?n.children:UH,s=(r||0)+e,a=i[s];if(!o)for(;a&&us(a);)s+=e,a=i[s];return a}}var HH={}.hasOwnProperty;function oh(e){return t;function t(n,r,o){return HH.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var Mu=oh({body:qH,caption:gv,colgroup:gv,dd:KH,dt:jH,head:gv,html:$H,li:WH,optgroup:GH,option:JH,p:VH,rp:QM,rt:QM,tbody:ZH,td:eR,tfoot:XH,th:eR,thead:YH,tr:QH});function gv(e,t,n){let r=Ye(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&us(r.value.charAt(0)))}function $H(e,t,n){let r=Ye(n,t);return!r||r.type!=="comment"}function qH(e,t,n){let r=Ye(n,t);return!r||r.type!=="comment"}function VH(e,t,n){let r=Ye(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function WH(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&r.tagName==="li"}function jH(e,t,n){let r=Ye(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function KH(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function QM(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function GH(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function JH(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function YH(e,t,n){let r=Ye(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ZH(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function XH(e,t,n){return!Ye(n,t)}function QH(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function eR(e,t,n){let r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var tR=oh({body:n$,colgroup:r$,head:t$,html:e$,tbody:o$});function e$(e){let t=Ye(e,-1);return!t||t.type!=="comment"}function t$(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function n$(e){let t=Ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&us(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function r$(e,t,n){let r=mv(n,t),o=Ye(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Mu(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function o$(e,t,n){let r=mv(n,t),o=Ye(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Mu(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var ih={name:[[` +`;document.head.appendChild(UM);var wr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var K=P(Z()),FH=[{title:"Heading 1",description:"Large section heading",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("path",{d:"M4 12h8"}),(0,K.jsx)("path",{d:"M4 18V6"}),(0,K.jsx)("path",{d:"M12 18V6"}),(0,K.jsx)("path",{d:"M17 10v8"}),(0,K.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("path",{d:"M4 12h8"}),(0,K.jsx)("path",{d:"M4 18V6"}),(0,K.jsx)("path",{d:"M12 18V6"}),(0,K.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("path",{d:"M4 12h8"}),(0,K.jsx)("path",{d:"M4 18V6"}),(0,K.jsx)("path",{d:"M12 18V6"}),(0,K.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,K.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,K.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,K.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,K.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,K.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,K.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,K.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,K.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,K.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,K.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,K.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,K.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,K.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,K.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,K.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,K.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,K.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,K.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,K.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,K.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,K.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,K.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,K.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,K.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,K.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],HM=(0,Vt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,a]=(0,Vt.useState)(0),i=(0,Vt.useRef)(null),[s,l]=(0,Vt.useState)({top:0,left:0});(0,Vt.useEffect)(()=>{a(0)},[e]),(0,Vt.useEffect)(()=>{if(n){let c=n();c&&l({top:c.bottom+4,left:c.left})}},[n]),(0,Vt.useEffect)(()=>{let c=i.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Vt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Vt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(a(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(a(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,K.jsx)("div",{className:wr.commandList,style:{position:"fixed",top:`${s.top}px`,left:`${s.left}px`},children:(0,K.jsx)("div",{className:wr.noResults,children:"No commands found"})}):(0,K.jsx)("div",{className:wr.commandList,ref:i,style:{position:"fixed",top:`${s.top}px`,left:`${s.left}px`},children:e.map((c,d)=>(0,K.jsxs)("button",{type:"button",className:`${wr.commandItem} ${d===o?wr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>a(d),children:[(0,K.jsx)("div",{className:wr.commandIcon,children:c.icon}),(0,K.jsxs)("div",{className:wr.commandContent,children:[(0,K.jsx)("div",{className:wr.commandTitle,children:c.title}),(0,K.jsx)("div",{className:wr.commandDescription,children:c.description})]})]},c.title))})});HM.displayName="CommandList";var zH=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new Pb(HM,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},UH={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>FH.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:zH,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},yy=ae.create({name:"slashCommands",addOptions(){return{suggestion:UH}},addProseMirrorPlugins(){return[zM({editor:this.editor,...this.options.suggestion})]}});var xh=P(ke());var qM=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var ao=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ao.prototype.normal={};ao.prototype.property={};ao.prototype.space=void 0;function ky(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ao(n,r,t)}function Nu(e){return e.toLowerCase()}var ut=class{constructor(t,n){this.attribute=n,this.property=t}};ut.prototype.attribute="";ut.prototype.booleanish=!1;ut.prototype.boolean=!1;ut.prototype.commaOrSpaceSeparated=!1;ut.prototype.commaSeparated=!1;ut.prototype.defined=!1;ut.prototype.mustUseProperty=!1;ut.prototype.number=!1;ut.prototype.overloadedBoolean=!1;ut.prototype.property="";ut.prototype.spaceSeparated=!1;ut.prototype.space=void 0;var Du={};Bs(Du,{boolean:()=>ie,booleanish:()=>We,commaOrSpaceSeparated:()=>tn,commaSeparated:()=>ta,number:()=>N,overloadedBoolean:()=>uh,spaceSeparated:()=>we});var HH=0,ie=ui(),We=ui(),uh=ui(),N=ui(),we=ui(),ta=ui(),tn=ui();function ui(){return 2**++HH}var vy=Object.keys(Du),ci=class extends ut{constructor(t,n,r,o){let a=-1;if(super(t,n),$M(this,"space",o),typeof r=="number")for(;++a4&&n.slice(0,4)==="data"&&$H.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(KM,WH);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!KM.test(a)){let i=a.replace(qH,VH);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ci}return new o(r,t)}function VH(e){return"-"+e.toLowerCase()}function WH(e){return e.charAt(1).toUpperCase()}var GM=ky([Cy,VM,wy,Sy,Ey],"html"),fh=ky([Cy,WM,wy,Sy,Ey],"svg");var jM={}.hasOwnProperty;function XM(e,t){let n=t||{};function r(o,...a){let i=r.invalid,s=r.handlers;if(o&&jM.call(o,e)){let l=String(o[e]);i=jM.call(s,l)?s[l]:r.unknown}if(i)return i.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var KH=/["&'<>`]/g,GH=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,jH=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,XH=/[|\\{}()[\]^$+*?.]/g,JM=new WeakMap;function ZM(e,t){if(e=e.replace(t.subset?JH(t.subset):KH,r),t.subset||t.escapeOnly)return e;return e.replace(GH,n).replace(jH,r);function n(o,a,i){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,i.charCodeAt(a+2),t)}function r(o,a,i){return t.format(o.charCodeAt(0),i.charCodeAt(a+1),t)}}function JH(e){let t=JM.get(e);return t||(t=ZH(e),JM.set(e,t)),t}function ZH(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var tN=["cent","copy","divide","gt","lt","not","para","times"];var nN={}.hasOwnProperty,Iy={},hh;for(hh in ph)nN.call(ph,hh)&&(Iy[ph[hh]]=hh);var eq=/[^\dA-Za-z]/;function rN(e,t,n,r){let o=String.fromCharCode(e);if(nN.call(Iy,o)){let a=Iy[o],i="&"+a;return n&&eN.includes(a)&&!tN.includes(a)&&(!r||t&&t!==61&&eq.test(String.fromCharCode(t)))?i:i+";"}return""}function oN(e,t,n){let r=YM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=rN(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let a=QM(e,t,n.omitOptionalSemicolons);a.length|^->||--!>|"],rq=["<",">"];function aN(e,t,n,r){return r.settings.bogusComments?"":"";function o(a){return io(a,Object.assign({},r.settings.characterReferences,{subset:rq}))}}function iN(e,t,n,r){return""}function _y(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function sN(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function lN(e){return e.join(" ").trim()}var oq=/[ \t\n\f\r]/g;function di(e){return typeof e=="object"?e.type==="text"?uN(e.value):!1:uN(e)}function uN(e){return e.replace(oq,"")===""}var Je=cN(1),Ay=cN(-1),aq=[];function cN(e){return t;function t(n,r,o){let a=n?n.children:aq,i=(r||0)+e,s=a[i];if(!o)for(;s&&di(s);)i+=e,s=a[i];return s}}var iq={}.hasOwnProperty;function mh(e){return t;function t(n,r,o){return iq.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var Ru=mh({body:lq,caption:Ty,colgroup:Ty,dd:fq,dt:dq,head:Ty,html:sq,li:cq,optgroup:pq,option:hq,p:uq,rp:dN,rt:dN,tbody:gq,td:fN,tfoot:bq,th:fN,thead:mq,tr:xq});function Ty(e,t,n){let r=Je(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&di(r.value.charAt(0)))}function sq(e,t,n){let r=Je(n,t);return!r||r.type!=="comment"}function lq(e,t,n){let r=Je(n,t);return!r||r.type!=="comment"}function uq(e,t,n){let r=Je(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function cq(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&r.tagName==="li"}function dq(e,t,n){let r=Je(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function fq(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function dN(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function pq(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function hq(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function mq(e,t,n){let r=Je(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function gq(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function bq(e,t,n){return!Je(n,t)}function xq(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function fN(e,t,n){let r=Je(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var pN=mh({body:vq,colgroup:Cq,head:kq,html:yq,tbody:wq});function yq(e){let t=Je(e,-1);return!t||t.type!=="comment"}function kq(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function vq(e){let t=Je(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&di(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Cq(e,t,n){let r=Ay(n,t),o=Je(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Ru(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function wq(e,t,n){let r=Ay(n,t),o=Je(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Ru(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var gh={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -745,7 +745,7 @@ ${n.innerHTML} \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function nR(e,t,n,r){let o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags,s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),a=[],l;o.space==="html"&&e.tagName==="svg"&&(r.schema=th);let u=i$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(s=!1),(u||!i||!tR(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(c),!s&&(!i||!Mu(e,t,n))&&a.push(""),a.join("")}function i$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let i=s$(e,o,t[o]);i&&n.push(i)}}for(;++rhv(n,e.alternative)&&(s=e.alternative),a=s+io(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?ih.single:ih.double)[o][i],attribute:!0}))+s),l+(a&&"="+a))}var a$=["<","&"];function sh(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:io(e.value,Object.assign({},r.settings.characterReferences,{subset:a$}))}function rR(e,t,n,r){return r.settings.allowDangerousHtml?e.value:sh(e,t,n,r)}function oR(e,t,n,r){return r.all(e)}var iR=BM("type",{invalid:l$,unknown:u$,handlers:{comment:KM,doctype:GM,element:nR,raw:rR,root:oR,text:sh}});function l$(e){throw new Error("Expected node, not `"+e+"`")}function u$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var c$={},d$={},f$=[];function Ru(e,t){let n=t||c$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:p$,all:h$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||MM,characterReferences:n.characterReferences||d$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?th:LM,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function p$(e,t,n){return iR(e,t,n,this)}function h$(e){let t=[],n=e&&e.children||f$,r=-1;for(;++r\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function hN(e,t,n,r){let o=r.schema,a=o.space==="svg"?!1:r.settings.omitOptionalTags,i=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],l;o.space==="html"&&e.tagName==="svg"&&(r.schema=fh);let u=Sq(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(i=!1),(u||!a||!pN(e,t,n))&&(s.push("<",e.tagName,u?" "+u:""),i&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!i&&(!a||!Ru(e,t,n))&&s.push(""),s.join("")}function Sq(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let a=Eq(e,o,t[o]);a&&n.push(a)}}for(;++r_y(n,e.alternative)&&(i=e.alternative),s=i+io(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?gh.single:gh.double)[o][a],attribute:!0}))+i),l+(s&&"="+s))}var Lq=["<","&"];function bh(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:io(e.value,Object.assign({},r.settings.characterReferences,{subset:Lq}))}function mN(e,t,n,r){return r.settings.allowDangerousHtml?e.value:bh(e,t,n,r)}function gN(e,t,n,r){return r.all(e)}var bN=XM("type",{invalid:Iq,unknown:_q,handlers:{comment:aN,doctype:iN,element:hN,raw:mN,root:gN,text:bh}});function Iq(e){throw new Error("Expected node, not `"+e+"`")}function _q(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var Aq={},Tq={},Mq=[];function Ou(e,t){let n=t||Aq,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Nq,all:Dq,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||qM,characterReferences:n.characterReferences||Tq,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?fh:GM,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Nq(e,t,n){return bN(e,t,n,this)}function Dq(e){let t=[],n=e&&e.children||Mq,r=-1;for(;++r{let n=e.attrs.language||"text",r=e.textContent,o=(0,ah.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let s=g$[n.toLowerCase()]||n.toLowerCase();if(!aR.registered(s))return r.replace(//g,">");let a=aR.highlight(s,r);return Ru(a)}catch{return r.replace(//g,">")}},[r,n]),i=(0,ah.useCallback)(s=>{t({language:s.target.value})},[t]);return(0,Bn.jsxs)(lC,{className:ti.codeBlockWrapper,children:[(0,Bn.jsx)("div",{className:ti.codeBlockHeader,contentEditable:!1,children:(0,Bn.jsx)("select",{value:n,onChange:i,className:ti.languageSelect,children:m$.map(s=>(0,Bn.jsx)("option",{value:s.value,children:s.label},s.value))})}),(0,Bn.jsxs)("div",{className:ti.codeBlockContainer,children:[(0,Bn.jsx)("pre",{className:ti.codeBlockBackdrop,"aria-hidden":"true",children:(0,Bn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,Bn.jsx)("pre",{className:ti.codeBlockPre,children:(0,Bn.jsx)("code",{className:ti.codeBlockCode,children:(0,Bn.jsx)(iC,{})})})]})]})};var uR=document.createElement("style");uR.textContent=`/* Container */ +`;document.head.appendChild(xN);var na={codeBlockWrapper:"codeBlockWrapper_CodeBlockComponent",codeBlockHeader:"codeBlockHeader_CodeBlockComponent",languageSelect:"languageSelect_CodeBlockComponent",w3:"w3_CodeBlockComponent",org:"org_CodeBlockComponent",codeBlockContainer:"codeBlockContainer_CodeBlockComponent",codeBlockBackdrop:"codeBlockBackdrop_CodeBlockComponent",codeBlockPre:"codeBlockPre_CodeBlockComponent",codeBlockCode:"codeBlockCode_CodeBlockComponent"};var Fn=P(Z()),yN=Ya(Za),Rq=[{value:"text",label:"Plain Text"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"jsx",label:"JSX"},{value:"tsx",label:"TSX"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"c",label:"C"},{value:"cpp",label:"C++"},{value:"csharp",label:"C#"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"ruby",label:"Ruby"},{value:"php",label:"PHP"},{value:"swift",label:"Swift"},{value:"kotlin",label:"Kotlin"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"scss",label:"SCSS"},{value:"json",label:"JSON"},{value:"yaml",label:"YAML"},{value:"xml",label:"XML"},{value:"markdown",label:"Markdown"},{value:"sql",label:"SQL"},{value:"graphql",label:"GraphQL"},{value:"bash",label:"Bash"},{value:"shell",label:"Shell"},{value:"powershell",label:"PowerShell"},{value:"dockerfile",label:"Dockerfile"}],Oq={js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",py:"python",rb:"ruby",sh:"bash",shell:"bash",yml:"yaml",md:"markdown","c++":"cpp","c#":"csharp"},kN=({node:e,updateAttributes:t})=>{let n=e.attrs.language||"text",r=e.textContent,o=(0,xh.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let i=Oq[n.toLowerCase()]||n.toLowerCase();if(!yN.registered(i))return r.replace(//g,">");let s=yN.highlight(i,r);return Ou(s)}catch{return r.replace(//g,">")}},[r,n]),a=(0,xh.useCallback)(i=>{t({language:i.target.value})},[t]);return(0,Fn.jsxs)(kL,{className:na.codeBlockWrapper,children:[(0,Fn.jsx)("div",{className:na.codeBlockHeader,contentEditable:!1,children:(0,Fn.jsx)("select",{value:n,onChange:a,className:na.languageSelect,children:Rq.map(i=>(0,Fn.jsx)("option",{value:i.value,children:i.label},i.value))})}),(0,Fn.jsxs)("div",{className:na.codeBlockContainer,children:[(0,Fn.jsx)("pre",{className:na.codeBlockBackdrop,"aria-hidden":"true",children:(0,Fn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,Fn.jsx)("pre",{className:na.codeBlockPre,children:(0,Fn.jsx)("code",{className:na.codeBlockCode,children:(0,Fn.jsx)(bL,{})})})]})]})};var vN=document.createElement("style");vN.textContent=`/* Container */ .container_MarkdownEditor { position: relative; border: 1px solid var(--vscode-input-border, #3c3c3c); @@ -1140,22 +1140,22 @@ ${n.innerHTML} -`;document.head.appendChild(uR);var Er={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var so=P(Z()),b$=Ji(Gi),lh=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:i=!1})=>{let s=(0,Aa.useRef)(!1),a=(0,Aa.useRef)(e),l=QS({extensions:[fT.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),gN.extend({addNodeView(){return pC(lR)}}).configure({lowlight:b$,defaultLanguage:"text"}),FC.configure({openOnClick:!1,HTMLAttributes:{class:Er.link}}),pT.configure({placeholder:n,emptyEditorClass:Er.isEmpty}),hT,mT.configure({nested:!0}),S1.configure({resizable:!1}),_1,w1,E1,$3.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),iv],content:e,editable:!i,autofocus:o?"end":!1,editorProps:{attributes:{class:Er.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(s.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";a.current=d,t(d)}});return(0,Aa.useEffect)(()=>{l&&e!==a.current&&(s.current=!0,l.commands.setContent(e),a.current=e,setTimeout(()=>{s.current=!1},0))},[l,e]),(0,Aa.useEffect)(()=>{l&&l.setEditable(!i)},[l,i]),l?(0,so.jsxs)("div",{className:`${Er.container} ${i?Er.disabled:""}`,children:[(0,so.jsx)(ov,{editor:l}),(0,so.jsx)(JS,{editor:l,className:Er.editorContent}),(0,so.jsxs)("div",{className:Er.hint,children:["Type ",(0,so.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,so.jsx)("div",{className:Er.container,style:{minHeight:r},children:(0,so.jsx)("div",{className:Er.loading,children:"Loading editor..."})})};var je=P(Z()),cR=Ji(Gi),y$={typescript:"typescript",tsx:"typescript",javascript:"javascript",jsx:"javascript",python:"python",java:"java",go:"go",rust:"rust",c:"c","c++":"cpp",cpp:"cpp",csharp:"csharp",ruby:"ruby",php:"php",swift:"swift",kotlin:"kotlin",scala:"scala",shell:"bash",bash:"bash",json:"json",yaml:"yaml",markdown:"markdown",sql:"sql",graphql:"graphql",css:"css",sass:"scss",scss:"scss",html:"xml",xml:"xml",text:"text"};function v$(e,t){if(!e.text)return null;let n=e.text;if(e.marks&&e.marks.length>0)for(let r of e.marks)switch(r.type){case"strong":n=(0,je.jsx)("strong",{children:n},t);break;case"em":n=(0,je.jsx)("em",{children:n},t);break;case"code":n=(0,je.jsx)("code",{style:{backgroundColor:"var(--vscode-textCodeBlock-background)",padding:"2px 4px",borderRadius:"3px",fontFamily:"var(--vscode-editor-font-family)",fontSize:"0.9em"},children:n},t);break;case"strike":n=(0,je.jsx)("del",{children:n},t);break;case"underline":n=(0,je.jsx)("u",{children:n},t);break;case"link":{let o=r.attrs;n=(0,je.jsx)("a",{href:o?.href,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--vscode-textLink-foreground)"},children:n},t);break}}return n}function x$(e,t){return!e.content||e.content.length===0?(0,je.jsx)("p",{children:"\xA0"},t):(0,je.jsx)("p",{style:{marginBottom:"8px",lineHeight:"1.6"},children:e.content.map((n,r)=>ni(n,r))},t)}function k$(e,t){let n=e.attrs?.language||"text",r=y$[n.toLowerCase()]||"text",o=e.content?.[0]?.text||"";try{if(r==="text"||!cR.registered(r))return dR(o,t);let i=cR.highlight(r,o),s=Ru(i);return(0,je.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)"},children:(0,je.jsx)("code",{style:{fontFamily:"inherit",fontSize:"inherit"},dangerouslySetInnerHTML:{__html:s}})},t)}catch{return dR(o,t)}}function dR(e,t){return(0,je.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)",color:"var(--vscode-editor-foreground)"},children:(0,je.jsx)("code",{children:e})},t)}function w$(e,t){let n=e.attrs?.level||1,r=e.content?.map((i,s)=>ni(i,s)),o=`h${n}`;return(0,je.jsx)(o,{style:{marginBottom:"8px",marginTop:"16px"},children:r},t)}function E$(e,t){return(0,je.jsx)("ul",{style:{marginBottom:"12px",paddingLeft:"20px"},children:e.content?.map((n,r)=>ni(n,r))},t)}function _$(e,t){return(0,je.jsx)("ol",{style:{marginBottom:"12px",paddingLeft:"20px"},children:e.content?.map((n,r)=>ni(n,r))},t)}function S$(e,t){return(0,je.jsx)("li",{style:{marginBottom:"4px"},children:e.content?.map((n,r)=>ni(n,r))},t)}function C$(e){return(0,je.jsx)("hr",{style:{border:"none",borderTop:"1px solid var(--vscode-panel-border)",margin:"16px 0"}},e)}function T$(e,t){let n=e.attrs?.panelType||"info",r={info:{bg:"rgba(45, 114, 210, 0.1)",border:"rgba(45, 114, 210, 0.5)"},note:{bg:"rgba(106, 115, 125, 0.1)",border:"rgba(106, 115, 125, 0.5)"},warning:{bg:"rgba(255, 193, 7, 0.1)",border:"rgba(255, 193, 7, 0.5)"},error:{bg:"rgba(220, 38, 38, 0.1)",border:"rgba(220, 38, 38, 0.5)"},success:{bg:"rgba(34, 197, 94, 0.1)",border:"rgba(34, 197, 94, 0.5)"}},o=r[n]||r.info;return(0,je.jsx)("div",{style:{backgroundColor:o.bg,borderLeft:`4px solid ${o.border}`,padding:"12px",marginBottom:"12px",borderRadius:"4px"},children:e.content?.map((i,s)=>ni(i,s))},t)}function N$(e){return(0,je.jsx)("br",{},e)}function ni(e,t){switch(e.type){case"text":return v$(e,t);case"paragraph":return x$(e,t);case"codeBlock":return k$(e,t);case"heading":return w$(e,t);case"bulletList":return E$(e,t);case"orderedList":return _$(e,t);case"listItem":return S$(e,t);case"rule":return C$(t);case"panel":return T$(e,t);case"hardBreak":return N$(t);default:return e.content?e.content.map((n,r)=>ni(n,r)):null}}function uh(e){try{let t=typeof e=="string"?JSON.parse(e):e;return!t||t.type!=="doc"||!t.content?null:(0,je.jsx)("div",{style:{lineHeight:"1.6"},children:t.content.map((n,r)=>ni(n,r))})}catch{return(0,je.jsx)("div",{children:typeof e=="string"?e:JSON.stringify(e)})}}function fR(e){try{let t=typeof e=="string"?JSON.parse(e):e;return!t||t.type!=="doc"||!t.content?typeof e=="string"?e:JSON.stringify(e):t.content.map(n=>ri(n)).join(` +`;document.head.appendChild(vN);var Sr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var so=P(Z()),Pq=Ya(Za),yh=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:a=!1})=>{let i=(0,Ns.useRef)(!1),s=(0,Ns.useRef)(e),l=dL({extensions:[SI.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),__.extend({addNodeView(){return EL(kN)}}).configure({lowlight:Pq,defaultLanguage:"text"}),JL.configure({openOnClick:!1,HTMLAttributes:{class:Sr.link}}),EI.configure({placeholder:n,emptyEditorClass:Sr.isEmpty}),LI,II.configure({nested:!0}),z1.configure({resizable:!1}),F1,P1,B1,eM.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),yy],content:e,editable:!a,autofocus:o?"end":!1,editorProps:{attributes:{class:Sr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(i.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";s.current=d,t(d)}});return(0,Ns.useEffect)(()=>{l&&e!==s.current&&(i.current=!0,l.commands.setContent(e),s.current=e,setTimeout(()=>{i.current=!1},0))},[l,e]),(0,Ns.useEffect)(()=>{l&&l.setEditable(!a)},[l,a]),l?(0,so.jsxs)("div",{className:`${Sr.container} ${a?Sr.disabled:""}`,children:[(0,so.jsx)(xy,{editor:l}),(0,so.jsx)(sL,{editor:l,className:Sr.editorContent}),(0,so.jsxs)("div",{className:Sr.hint,children:["Type ",(0,so.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,so.jsx)("div",{className:Sr.container,style:{minHeight:r},children:(0,so.jsx)("div",{className:Sr.loading,children:"Loading editor..."})})};var Ke=P(Z()),CN=Ya(Za),Bq={typescript:"typescript",tsx:"typescript",javascript:"javascript",jsx:"javascript",python:"python",java:"java",go:"go",rust:"rust",c:"c","c++":"cpp",cpp:"cpp",csharp:"csharp",ruby:"ruby",php:"php",swift:"swift",kotlin:"kotlin",scala:"scala",shell:"bash",bash:"bash",json:"json",yaml:"yaml",markdown:"markdown",sql:"sql",graphql:"graphql",css:"css",sass:"scss",scss:"scss",html:"xml",xml:"xml",text:"text"};function Fq(e,t){if(!e.text)return null;let n=e.text;if(e.marks&&e.marks.length>0)for(let r of e.marks)switch(r.type){case"strong":n=(0,Ke.jsx)("strong",{children:n},t);break;case"em":n=(0,Ke.jsx)("em",{children:n},t);break;case"code":n=(0,Ke.jsx)("code",{style:{backgroundColor:"var(--vscode-textCodeBlock-background)",padding:"2px 4px",borderRadius:"3px",fontFamily:"var(--vscode-editor-font-family)",fontSize:"0.9em"},children:n},t);break;case"strike":n=(0,Ke.jsx)("del",{children:n},t);break;case"underline":n=(0,Ke.jsx)("u",{children:n},t);break;case"link":{let o=r.attrs;n=(0,Ke.jsx)("a",{href:o?.href,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--vscode-textLink-foreground)"},children:n},t);break}}return n}function zq(e,t){return!e.content||e.content.length===0?(0,Ke.jsx)("p",{children:"\xA0"},t):(0,Ke.jsx)("p",{style:{marginBottom:"8px",lineHeight:"1.6"},children:e.content.map((n,r)=>ra(n,r))},t)}function Uq(e,t){let n=e.attrs?.language||"text",r=Bq[n.toLowerCase()]||"text",o=e.content?.[0]?.text||"";try{if(r==="text"||!CN.registered(r))return wN(o,t);let a=CN.highlight(r,o),i=Ou(a);return(0,Ke.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)"},children:(0,Ke.jsx)("code",{style:{fontFamily:"inherit",fontSize:"inherit"},dangerouslySetInnerHTML:{__html:i}})},t)}catch{return wN(o,t)}}function wN(e,t){return(0,Ke.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)",color:"var(--vscode-editor-foreground)"},children:(0,Ke.jsx)("code",{children:e})},t)}function Hq(e,t){let n=e.attrs?.level||1,r=e.content?.map((a,i)=>ra(a,i)),o=`h${n}`;return(0,Ke.jsx)(o,{style:{marginBottom:"8px",marginTop:"16px"},children:r},t)}function qq(e,t){return(0,Ke.jsx)("ul",{style:{marginBottom:"12px",paddingLeft:"20px"},children:e.content?.map((n,r)=>ra(n,r))},t)}function $q(e,t){return(0,Ke.jsx)("ol",{style:{marginBottom:"12px",paddingLeft:"20px"},children:e.content?.map((n,r)=>ra(n,r))},t)}function Vq(e,t){return(0,Ke.jsx)("li",{style:{marginBottom:"4px"},children:e.content?.map((n,r)=>ra(n,r))},t)}function Wq(e){return(0,Ke.jsx)("hr",{style:{border:"none",borderTop:"1px solid var(--vscode-panel-border)",margin:"16px 0"}},e)}function Kq(e,t){let n=e.attrs?.panelType||"info",r={info:{bg:"rgba(45, 114, 210, 0.1)",border:"rgba(45, 114, 210, 0.5)"},note:{bg:"rgba(106, 115, 125, 0.1)",border:"rgba(106, 115, 125, 0.5)"},warning:{bg:"rgba(255, 193, 7, 0.1)",border:"rgba(255, 193, 7, 0.5)"},error:{bg:"rgba(220, 38, 38, 0.1)",border:"rgba(220, 38, 38, 0.5)"},success:{bg:"rgba(34, 197, 94, 0.1)",border:"rgba(34, 197, 94, 0.5)"}},o=r[n]||r.info;return(0,Ke.jsx)("div",{style:{backgroundColor:o.bg,borderLeft:`4px solid ${o.border}`,padding:"12px",marginBottom:"12px",borderRadius:"4px"},children:e.content?.map((a,i)=>ra(a,i))},t)}function Gq(e){return(0,Ke.jsx)("br",{},e)}function ra(e,t){switch(e.type){case"text":return Fq(e,t);case"paragraph":return zq(e,t);case"codeBlock":return Uq(e,t);case"heading":return Hq(e,t);case"bulletList":return qq(e,t);case"orderedList":return $q(e,t);case"listItem":return Vq(e,t);case"rule":return Wq(t);case"panel":return Kq(e,t);case"hardBreak":return Gq(t);default:return e.content?e.content.map((n,r)=>ra(n,r)):null}}function kh(e){try{let t=typeof e=="string"?JSON.parse(e):e;return!t||t.type!=="doc"||!t.content?null:(0,Ke.jsx)("div",{style:{lineHeight:"1.6"},children:t.content.map((n,r)=>ra(n,r))})}catch{return(0,Ke.jsx)("div",{children:typeof e=="string"?e:JSON.stringify(e)})}}function SN(e){try{let t=typeof e=="string"?JSON.parse(e):e;return!t||t.type!=="doc"||!t.content?typeof e=="string"?e:JSON.stringify(e):t.content.map(n=>oa(n)).join(` -`)}catch{return typeof e=="string"?e:JSON.stringify(e)}}function ri(e){switch(e.type){case"paragraph":return A$(e);case"heading":return M$(e);case"codeBlock":return R$(e);case"bulletList":return D$(e);case"orderedList":return O$(e);case"listItem":return bv(e);case"blockquote":return I$(e);case"rule":return"---";case"hardBreak":return` -`;case"text":return P$(e);case"panel":return L$(e);default:return e.content?e.content.map(ri).join(""):""}}function A$(e){return e.content?e.content.map(ri).join(""):""}function M$(e){let t=e.attrs?.level||1,n="#".repeat(t),r=e.content?e.content.map(ri).join(""):"";return`${n} ${r}`}function R$(e){let t=e.attrs?.language||"",n=e.content?.[0]?.text||"";return`\`\`\`${t} +`)}catch{return typeof e=="string"?e:JSON.stringify(e)}}function oa(e){switch(e.type){case"paragraph":return jq(e);case"heading":return Xq(e);case"codeBlock":return Jq(e);case"bulletList":return Zq(e);case"orderedList":return Yq(e);case"listItem":return My(e);case"blockquote":return Qq(e);case"rule":return"---";case"hardBreak":return` +`;case"text":return t$(e);case"panel":return e$(e);default:return e.content?e.content.map(oa).join(""):""}}function jq(e){return e.content?e.content.map(oa).join(""):""}function Xq(e){let t=e.attrs?.level||1,n="#".repeat(t),r=e.content?e.content.map(oa).join(""):"";return`${n} ${r}`}function Jq(e){let t=e.attrs?.language||"",n=e.content?.[0]?.text||"";return`\`\`\`${t} ${n} -\`\`\``}function D$(e){return e.content?e.content.map((t,n)=>`- ${bv(t)}`).join(` -`):""}function O$(e){return e.content?e.content.map((t,n)=>{let r=bv(t);return`${n+1}. ${r}`}).join(` -`):""}function bv(e){return e.content?e.content.map(t=>t.type==="paragraph"?t.content?t.content.map(ri).join(""):"":ri(t)).join(` -`):""}function I$(e){return e.content?e.content.map(ri).join(` +\`\`\``}function Zq(e){return e.content?e.content.map((t,n)=>`- ${My(t)}`).join(` +`):""}function Yq(e){return e.content?e.content.map((t,n)=>{let r=My(t);return`${n+1}. ${r}`}).join(` +`):""}function My(e){return e.content?e.content.map(t=>t.type==="paragraph"?t.content?t.content.map(oa).join(""):"":oa(t)).join(` +`):""}function Qq(e){return e.content?e.content.map(oa).join(` `).split(` `).map(n=>`> ${n}`).join(` -`):""}function L$(e){if(!e.content)return"";let t=e.content.map(ri).join(` -`),n=e.attrs?.panelType||"info";return`> ${{info:"\u2139\uFE0F",note:"\u{1F4DD}",warning:"\u26A0\uFE0F",error:"\u274C",success:"\u2705"}[n]||"\u2139\uFE0F"} ${t}`}function P$(e){let t=e.text||"";if(!e.marks||e.marks.length===0)return t;for(let n of e.marks)switch(n.type){case"strong":t=`**${t}**`;break;case"em":t=`*${t}*`;break;case"code":t=`\`${t}\``;break;case"strike":t=`~~${t}~~`;break;case"link":{let r=n.attrs?.href||"";t=`[${t}](${r})`;break}}return t}function pR(e){let t=e.split(` -`),n=[],r=0;for(;r ")){let s=[];for(;r ");)s.push(t[r].slice(2)),r++;n.push({type:"blockquote",content:[{type:"paragraph",content:Du(s.join(` -`))}]});continue}if(o.trim()===""){r++;continue}n.push({type:"paragraph",content:Du(o)}),r++}return{type:"doc",version:1,content:n}}function Du(e){let t=[],n=e,r=[{regex:/`([^`]+)`/,type:"code"},{regex:/\*\*([^*]+)\*\*/,type:"strong"},{regex:/__([^_]+)__/,type:"strong"},{regex:/\*([^*]+)\*/,type:"em"},{regex:/_([^_]+)_/,type:"em"},{regex:/~~([^~]+)~~/,type:"strike"},{regex:/\[([^\]]+)\]\(([^)]+)\)/,type:"link"}];for(;n.length>0;){let o=null;for(let i of r){let s=n.match(i.regex);if(s&&s.index!==void 0&&(!o||s.index0&&t.push({type:"text",text:n.slice(0,o.index)}),t.push(o.node),n=n.slice(o.index+o.length);else{n.length>0&&t.push({type:"text",text:n});break}}return t.length>0?t:[{type:"text",text:""}]}function yv(e){try{let t=JSON.parse(e);return t&&t.type==="doc"&&Array.isArray(t.content)}catch{return!1}}var hR=document.createElement("style");hR.textContent=`.container_TicketDescription { +`):""}function e$(e){if(!e.content)return"";let t=e.content.map(oa).join(` +`),n=e.attrs?.panelType||"info";return`> **${{info:"[INFO]",note:"[NOTE]",warning:"[WARNING]",error:"[ERROR]",success:"[SUCCESS]"}[n]||"[INFO]"}** ${t}`}function t$(e){let t=e.text||"";if(!e.marks||e.marks.length===0)return t;for(let n of e.marks)switch(n.type){case"strong":t=`**${t}**`;break;case"em":t=`*${t}*`;break;case"code":t=`\`${t}\``;break;case"strike":t=`~~${t}~~`;break;case"link":{let r=n.attrs?.href||"";t=`[${t}](${r})`;break}}return t}function EN(e){let t=e.split(` +`),n=[],r=0;for(;r ")){let i=[];for(;r ");)i.push(t[r].slice(2)),r++;n.push({type:"blockquote",content:[{type:"paragraph",content:Pu(i.join(` +`))}]});continue}if(o.trim()===""){r++;continue}n.push({type:"paragraph",content:Pu(o)}),r++}return{type:"doc",version:1,content:n}}function Pu(e){let t=[],n=e,r=[{regex:/`([^`]+)`/,type:"code"},{regex:/\*\*([^*]+)\*\*/,type:"strong"},{regex:/__([^_]+)__/,type:"strong"},{regex:/\*([^*]+)\*/,type:"em"},{regex:/_([^_]+)_/,type:"em"},{regex:/~~([^~]+)~~/,type:"strike"},{regex:/\[([^\]]+)\]\(([^)]+)\)/,type:"link"}];for(;n.length>0;){let o=null;for(let a of r){let i=n.match(a.regex);if(i&&i.index!==void 0&&(!o||i.index0&&t.push({type:"text",text:n.slice(0,o.index)}),t.push(o.node),n=n.slice(o.index+o.length);else{n.length>0&&t.push({type:"text",text:n});break}}return t.length>0?t:[{type:"text",text:""}]}function Ny(e){try{let t=JSON.parse(e);return t&&t.type==="doc"&&Array.isArray(t.content)}catch{return!1}}var LN=document.createElement("style");LN.textContent=`.container_TicketDescription { padding: 16px 20px; } @@ -1265,7 +1265,7 @@ ${n} background-color: var(--vscode-button-secondaryHoverBackground); } -`;document.head.appendChild(hR);var Xn={container:"container_TicketDescription",header:"header_TicketDescription",heading:"heading_TicketDescription",editButton:"editButton_TicketDescription",descriptionContent:"descriptionContent_TicketDescription",emptyState:"emptyState_TicketDescription",editContainer:"editContainer_TicketDescription",textarea:"textarea_TicketDescription",actions:"actions_TicketDescription",saveButton:"saveButton_TicketDescription",cancelButton:"cancelButton_TicketDescription"};var tn=P(Z()),mR=({description:e,onUpdateDescription:t})=>{let[n,r]=(0,oi.useState)(!1),o=(0,oi.useMemo)(()=>yv(e)?fR(e):e,[e]),[i,s]=(0,oi.useState)(o);(0,oi.useEffect)(()=>{n||s(o)},[o,n]);let a=()=>{let c=pR(i);t(JSON.stringify(c)),r(!1)},l=()=>{s(o),r(!1)},u=(0,oi.useMemo)(()=>yv(e)?uh(e):e?(0,tn.jsx)("p",{children:e}):null,[e]);return(0,tn.jsxs)("div",{className:Xn.container,children:[(0,tn.jsxs)("div",{className:Xn.header,children:[(0,tn.jsx)("h3",{className:Xn.heading,children:"Description"}),!n&&(0,tn.jsx)("button",{onClick:()=>r(!0),className:Xn.editButton,children:"Edit"})]}),n?(0,tn.jsxs)("div",{className:Xn.editContainer,children:[(0,tn.jsx)(lh,{value:i,onChange:s,placeholder:"Add a description...",minHeight:200,autoFocus:!0}),(0,tn.jsxs)("div",{className:Xn.actions,children:[(0,tn.jsx)("button",{onClick:a,className:Xn.saveButton,children:"Save"}),(0,tn.jsx)("button",{onClick:l,className:Xn.cancelButton,children:"Cancel"})]})]}):(0,tn.jsx)("div",{className:Xn.descriptionContent,children:u||(0,tn.jsx)("span",{className:Xn.emptyState,children:"No description"})})]})};var gR=document.createElement("style");gR.textContent=`.container_StatusSelector { +`;document.head.appendChild(LN);var Qn={container:"container_TicketDescription",header:"header_TicketDescription",heading:"heading_TicketDescription",editButton:"editButton_TicketDescription",descriptionContent:"descriptionContent_TicketDescription",emptyState:"emptyState_TicketDescription",editContainer:"editContainer_TicketDescription",textarea:"textarea_TicketDescription",actions:"actions_TicketDescription",saveButton:"saveButton_TicketDescription",cancelButton:"cancelButton_TicketDescription"};var nn=P(Z()),IN=({description:e,onUpdateDescription:t})=>{let[n,r]=(0,aa.useState)(!1),o=(0,aa.useMemo)(()=>Ny(e)?SN(e):e,[e]),[a,i]=(0,aa.useState)(o);(0,aa.useEffect)(()=>{n||i(o)},[o,n]);let s=()=>{let c=EN(a);t(JSON.stringify(c)),r(!1)},l=()=>{i(o),r(!1)},u=(0,aa.useMemo)(()=>Ny(e)?kh(e):e?(0,nn.jsx)("p",{children:e}):null,[e]);return(0,nn.jsxs)("div",{className:Qn.container,children:[(0,nn.jsxs)("div",{className:Qn.header,children:[(0,nn.jsx)("h3",{className:Qn.heading,children:"Description"}),!n&&(0,nn.jsx)("button",{onClick:()=>r(!0),className:Qn.editButton,children:"Edit"})]}),n?(0,nn.jsxs)("div",{className:Qn.editContainer,children:[(0,nn.jsx)(yh,{value:a,onChange:i,placeholder:"Add a description...",minHeight:200,autoFocus:!0}),(0,nn.jsxs)("div",{className:Qn.actions,children:[(0,nn.jsx)("button",{onClick:s,className:Qn.saveButton,children:"Save"}),(0,nn.jsx)("button",{onClick:l,className:Qn.cancelButton,children:"Cancel"})]})]}):(0,nn.jsx)("div",{className:Qn.descriptionContent,children:u||(0,nn.jsx)("span",{className:Qn.emptyState,children:"No description"})})]})};var _N=document.createElement("style");_N.textContent=`.container_StatusSelector { padding: 16px 20px; border-bottom: 1px solid var(--vscode-panel-border); } @@ -1300,7 +1300,7 @@ ${n} background-color: var(--vscode-list-hoverBackground); } -`;document.head.appendChild(gR);var ch={container:"container_StatusSelector",label:"label_StatusSelector",select:"select_StatusSelector"};var cs=P(Z()),bR=({transitions:e,currentStatusId:t,currentStatusName:n,onUpdate:r})=>(0,cs.jsxs)("div",{className:ch.container,children:[(0,cs.jsx)("label",{className:ch.label,children:"Status"}),(0,cs.jsxs)("select",{value:t,onChange:o=>{let i=e.find(s=>s.to.id===o.target.value);i&&r(i.id)},className:ch.select,children:[(0,cs.jsx)("option",{value:t,children:n}),e.filter(o=>o.to.id!==t).map(o=>(0,cs.jsx)("option",{value:o.to.id,children:o.to.name},o.id))]})]});var _r=P(Se());var yR=document.createElement("style");yR.textContent=`.container_AssigneeSelector { +`;document.head.appendChild(_N);var vh={container:"container_StatusSelector",label:"label_StatusSelector",select:"select_StatusSelector"};var fi=P(Z()),AN=({transitions:e,currentStatusId:t,currentStatusName:n,onUpdate:r})=>(0,fi.jsxs)("div",{className:vh.container,children:[(0,fi.jsx)("label",{className:vh.label,children:"Status"}),(0,fi.jsxs)("select",{value:t,onChange:o=>{let a=e.find(i=>i.to.id===o.target.value);a&&r(a.id)},className:vh.select,children:[(0,fi.jsx)("option",{value:t,children:n}),e.filter(o=>o.to.id!==t).map(o=>(0,fi.jsx)("option",{value:o.to.id,children:o.to.name},o.id))]})]});var Er=P(ke());var TN=document.createElement("style");TN.textContent=`.container_AssigneeSelector { position: relative; padding: 16px 20px; border-bottom: 1px solid var(--vscode-panel-border); @@ -1454,7 +1454,7 @@ ${n} color: var(--vscode-descriptionForeground); font-size: 12px; } -`;document.head.appendChild(yR);var Ae={container:"container_AssigneeSelector",label:"label_AssigneeSelector",trigger:"trigger_AssigneeSelector",avatar:"avatar_AssigneeSelector",avatarPlaceholder:"avatarPlaceholder_AssigneeSelector",assigneeName:"assigneeName_AssigneeSelector",chevron:"chevron_AssigneeSelector",dropdown:"dropdown_AssigneeSelector",searchContainer:"searchContainer_AssigneeSelector",searchInput:"searchInput_AssigneeSelector",userList:"userList_AssigneeSelector",userItem:"userItem_AssigneeSelector",selected:"selected_AssigneeSelector",userInfo:"userInfo_AssigneeSelector",userName:"userName_AssigneeSelector",userEmail:"userEmail_AssigneeSelector",emptyState:"emptyState_AssigneeSelector"};var me=P(Z()),vR=({currentAssignee:e,users:t,onUpdateAssignee:n,onLoadUsers:r,onSearchUsers:o})=>{let[i,s]=(0,_r.useState)(!1),[a,l]=(0,_r.useState)(""),[u,c]=(0,_r.useState)(!1),d=(0,_r.useRef)(null);(0,_r.useEffect)(()=>{u||(r(),c(!0))},[]),(0,_r.useEffect)(()=>{if(a.length<3)return;let m=setTimeout(()=>{o(a)},300);return()=>clearTimeout(m)},[a]),(0,_r.useEffect)(()=>{let m=b=>{d.current&&!d.current.contains(b.target)&&(s(!1),l(""))};return i&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[i]);let f=m=>{n(m),s(!1),l("")},p=m=>m.avatarUrls?.["32x32"]||m.avatarUrls?.["48x48"]||m.avatarUrls?.["24x24"]||m.avatarUrls?.["16x16"],h=a.length>=2?t.filter(m=>{let b=a.toLowerCase();return m.displayName.toLowerCase().includes(b)||m.emailAddress&&m.emailAddress.toLowerCase().includes(b)}):t;return(0,me.jsxs)("div",{className:Ae.container,ref:d,children:[(0,me.jsx)("label",{className:Ae.label,children:"Assignee"}),(0,me.jsxs)("button",{className:Ae.trigger,onClick:()=>s(!i),title:"Change assignee",children:[e?(0,me.jsxs)(me.Fragment,{children:[p(e)?(0,me.jsx)("img",{src:p(e),alt:e.displayName,className:Ae.avatar}):(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:e.displayName.charAt(0).toUpperCase()}),(0,me.jsx)("span",{className:Ae.assigneeName,children:e.displayName})]}):(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:"?"}),(0,me.jsx)("span",{className:Ae.assigneeName,children:"Unassigned"})]}),(0,me.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Ae.chevron,children:(0,me.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),i&&(0,me.jsxs)("div",{className:Ae.dropdown,children:[(0,me.jsx)("div",{className:Ae.searchContainer,children:(0,me.jsx)("input",{type:"text",placeholder:"Search users...",value:a,onChange:m=>l(m.target.value),className:Ae.searchInput,autoFocus:!0})}),(0,me.jsxs)("div",{className:Ae.userList,children:[(0,me.jsxs)("button",{className:Ae.userItem,onClick:()=>f(null),children:[(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:"?"}),(0,me.jsx)("div",{className:Ae.userInfo,children:(0,me.jsx)("div",{className:Ae.userName,children:"Unassigned"})})]}),h.length>0?h.map(m=>(0,me.jsxs)("button",{className:`${Ae.userItem} ${e?.accountId===m.accountId?Ae.selected:""}`,onClick:()=>f(m.accountId),children:[p(m)?(0,me.jsx)("img",{src:p(m),alt:m.displayName,className:Ae.avatar}):(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:m.displayName.charAt(0).toUpperCase()}),(0,me.jsxs)("div",{className:Ae.userInfo,children:[(0,me.jsx)("div",{className:Ae.userName,children:m.displayName}),m.emailAddress&&(0,me.jsx)("div",{className:Ae.userEmail,children:m.emailAddress})]})]},m.accountId)):(0,me.jsx)("div",{className:Ae.emptyState,children:a.length>=2?"No users found":t.length===0?"Loading users...":"Type to search users"})]})]})]})};var xR=document.createElement("style");xR.textContent=`.container_Comments { +`;document.head.appendChild(TN);var Ae={container:"container_AssigneeSelector",label:"label_AssigneeSelector",trigger:"trigger_AssigneeSelector",avatar:"avatar_AssigneeSelector",avatarPlaceholder:"avatarPlaceholder_AssigneeSelector",assigneeName:"assigneeName_AssigneeSelector",chevron:"chevron_AssigneeSelector",dropdown:"dropdown_AssigneeSelector",searchContainer:"searchContainer_AssigneeSelector",searchInput:"searchInput_AssigneeSelector",userList:"userList_AssigneeSelector",userItem:"userItem_AssigneeSelector",selected:"selected_AssigneeSelector",userInfo:"userInfo_AssigneeSelector",userName:"userName_AssigneeSelector",userEmail:"userEmail_AssigneeSelector",emptyState:"emptyState_AssigneeSelector"};var me=P(Z()),MN=({currentAssignee:e,users:t,onUpdateAssignee:n,onLoadUsers:r,onSearchUsers:o})=>{let[a,i]=(0,Er.useState)(!1),[s,l]=(0,Er.useState)(""),[u,c]=(0,Er.useState)(!1),d=(0,Er.useRef)(null);(0,Er.useEffect)(()=>{u||(r(),c(!0))},[]),(0,Er.useEffect)(()=>{if(s.length<3)return;let m=setTimeout(()=>{o(s)},300);return()=>clearTimeout(m)},[s]),(0,Er.useEffect)(()=>{let m=b=>{d.current&&!d.current.contains(b.target)&&(i(!1),l(""))};return a&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[a]);let f=m=>{n(m),i(!1),l("")},p=m=>m.avatarUrls?.["32x32"]||m.avatarUrls?.["48x48"]||m.avatarUrls?.["24x24"]||m.avatarUrls?.["16x16"],h=s.length>=2?t.filter(m=>{let b=s.toLowerCase();return m.displayName.toLowerCase().includes(b)||m.emailAddress&&m.emailAddress.toLowerCase().includes(b)}):t;return(0,me.jsxs)("div",{className:Ae.container,ref:d,children:[(0,me.jsx)("label",{className:Ae.label,children:"Assignee"}),(0,me.jsxs)("button",{className:Ae.trigger,onClick:()=>i(!a),title:"Change assignee",children:[e?(0,me.jsxs)(me.Fragment,{children:[p(e)?(0,me.jsx)("img",{src:p(e),alt:e.displayName,className:Ae.avatar}):(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:e.displayName.charAt(0).toUpperCase()}),(0,me.jsx)("span",{className:Ae.assigneeName,children:e.displayName})]}):(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:"?"}),(0,me.jsx)("span",{className:Ae.assigneeName,children:"Unassigned"})]}),(0,me.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Ae.chevron,children:(0,me.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),a&&(0,me.jsxs)("div",{className:Ae.dropdown,children:[(0,me.jsx)("div",{className:Ae.searchContainer,children:(0,me.jsx)("input",{type:"text",placeholder:"Search users...",value:s,onChange:m=>l(m.target.value),className:Ae.searchInput,autoFocus:!0})}),(0,me.jsxs)("div",{className:Ae.userList,children:[(0,me.jsxs)("button",{className:Ae.userItem,onClick:()=>f(null),children:[(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:"?"}),(0,me.jsx)("div",{className:Ae.userInfo,children:(0,me.jsx)("div",{className:Ae.userName,children:"Unassigned"})})]}),h.length>0?h.map(m=>(0,me.jsxs)("button",{className:`${Ae.userItem} ${e?.accountId===m.accountId?Ae.selected:""}`,onClick:()=>f(m.accountId),children:[p(m)?(0,me.jsx)("img",{src:p(m),alt:m.displayName,className:Ae.avatar}):(0,me.jsx)("div",{className:Ae.avatarPlaceholder,children:m.displayName.charAt(0).toUpperCase()}),(0,me.jsxs)("div",{className:Ae.userInfo,children:[(0,me.jsx)("div",{className:Ae.userName,children:m.displayName}),m.emailAddress&&(0,me.jsx)("div",{className:Ae.userEmail,children:m.emailAddress})]})]},m.accountId)):(0,me.jsx)("div",{className:Ae.emptyState,children:s.length>=2?"No users found":t.length===0?"Loading users...":"Type to search users"})]})]})]})};var NN=document.createElement("style");NN.textContent=`.container_Comments { padding: 16px 20px; } @@ -1524,7 +1524,7 @@ ${n} word-break: break-word; } -`;document.head.appendChild(xR);var nn={container:"container_Comments",heading:"heading_Comments",emptyState:"emptyState_Comments",commentsList:"commentsList_Comments",comment:"comment_Comments",commentHeader:"commentHeader_Comments",authorInfo:"authorInfo_Comments",avatar:"avatar_Comments",authorName:"authorName_Comments",date:"date_Comments",commentBody:"commentBody_Comments"};var Vt=P(Z()),kR=({comments:e})=>{let t=r=>{let o=new Date(r),i=new Date,s=i.getTime()-o.getTime(),a=Math.floor(s/(1e3*60*60*24));return a===0?"Today":a===1?"Yesterday":a<7?`${a} days ago`:o.toLocaleDateString(void 0,{month:"short",day:"numeric",year:o.getFullYear()!==i.getFullYear()?"numeric":void 0})},n=r=>{try{let o=JSON.parse(r);return o&&o.type==="doc"?uh(o):r}catch{return r}};return!e||e.length===0?(0,Vt.jsxs)("div",{className:nn.container,children:[(0,Vt.jsx)("h3",{className:nn.heading,children:"Comments"}),(0,Vt.jsx)("p",{className:nn.emptyState,children:"No comments yet"})]}):(0,Vt.jsxs)("div",{className:nn.container,children:[(0,Vt.jsxs)("h3",{className:nn.heading,children:["Comments (",e.length,")"]}),(0,Vt.jsx)("div",{className:nn.commentsList,children:e.map(r=>(0,Vt.jsxs)("div",{className:nn.comment,children:[(0,Vt.jsxs)("div",{className:nn.commentHeader,children:[(0,Vt.jsxs)("div",{className:nn.authorInfo,children:[r.author.avatarUrls?.["48x48"]&&(0,Vt.jsx)("img",{src:r.author.avatarUrls["48x48"],alt:r.author.displayName,className:nn.avatar}),(0,Vt.jsx)("span",{className:nn.authorName,children:r.author.displayName})]}),(0,Vt.jsx)("span",{className:nn.date,children:t(r.created)})]}),(0,Vt.jsx)("div",{className:nn.commentBody,children:n(r.body)})]},r.id))})]})};var ER=P(Se());var wR=document.createElement("style");wR.textContent=`.container_CommentForm { +`;document.head.appendChild(NN);var rn={container:"container_Comments",heading:"heading_Comments",emptyState:"emptyState_Comments",commentsList:"commentsList_Comments",comment:"comment_Comments",commentHeader:"commentHeader_Comments",authorInfo:"authorInfo_Comments",avatar:"avatar_Comments",authorName:"authorName_Comments",date:"date_Comments",commentBody:"commentBody_Comments"};var Wt=P(Z()),DN=({comments:e})=>{let t=r=>{let o=new Date(r),a=new Date,i=a.getTime()-o.getTime(),s=Math.floor(i/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s<7?`${s} days ago`:o.toLocaleDateString(void 0,{month:"short",day:"numeric",year:o.getFullYear()!==a.getFullYear()?"numeric":void 0})},n=r=>{try{let o=JSON.parse(r);return o&&o.type==="doc"?kh(o):r}catch{return r}};return!e||e.length===0?(0,Wt.jsxs)("div",{className:rn.container,children:[(0,Wt.jsx)("h3",{className:rn.heading,children:"Comments"}),(0,Wt.jsx)("p",{className:rn.emptyState,children:"No comments yet"})]}):(0,Wt.jsxs)("div",{className:rn.container,children:[(0,Wt.jsxs)("h3",{className:rn.heading,children:["Comments (",e.length,")"]}),(0,Wt.jsx)("div",{className:rn.commentsList,children:e.map(r=>(0,Wt.jsxs)("div",{className:rn.comment,children:[(0,Wt.jsxs)("div",{className:rn.commentHeader,children:[(0,Wt.jsxs)("div",{className:rn.authorInfo,children:[r.author.avatarUrls?.["48x48"]&&(0,Wt.jsx)("img",{src:r.author.avatarUrls["48x48"],alt:r.author.displayName,className:rn.avatar}),(0,Wt.jsx)("span",{className:rn.authorName,children:r.author.displayName})]}),(0,Wt.jsx)("span",{className:rn.date,children:t(r.created)})]}),(0,Wt.jsx)("div",{className:rn.commentBody,children:n(r.body)})]},r.id))})]})};var ON=P(ke());var RN=document.createElement("style");RN.textContent=`.container_CommentForm { padding: 16px 20px; } @@ -1577,7 +1577,7 @@ ${n} cursor: not-allowed; } -`;document.head.appendChild(wR);var Ou={container:"container_CommentForm",heading:"heading_CommentForm",textarea:"textarea_CommentForm",submitButton:"submitButton_CommentForm"};var Ma=P(Z()),_R=({onSubmit:e})=>{let[t,n]=(0,ER.useState)(""),r=()=>{t.trim()&&(e(t.trim()),n(""))};return(0,Ma.jsxs)("div",{className:Ou.container,children:[(0,Ma.jsx)("h3",{className:Ou.heading,children:"Add Comment"}),(0,Ma.jsx)("textarea",{value:t,onChange:o=>n(o.target.value),placeholder:"Write a comment...",className:Ou.textarea,rows:4}),(0,Ma.jsx)("button",{onClick:r,disabled:!t.trim(),className:Ou.submitButton,children:"Add Comment"})]})};var SR=document.createElement("style");SR.textContent=`.container_ActionButtons { +`;document.head.appendChild(RN);var Bu={container:"container_CommentForm",heading:"heading_CommentForm",textarea:"textarea_CommentForm",submitButton:"submitButton_CommentForm"};var Ds=P(Z()),PN=({onSubmit:e})=>{let[t,n]=(0,ON.useState)(""),r=()=>{t.trim()&&(e(t.trim()),n(""))};return(0,Ds.jsxs)("div",{className:Bu.container,children:[(0,Ds.jsx)("h3",{className:Bu.heading,children:"Add Comment"}),(0,Ds.jsx)("textarea",{value:t,onChange:o=>n(o.target.value),placeholder:"Write a comment...",className:Bu.textarea,rows:4}),(0,Ds.jsx)("button",{onClick:r,disabled:!t.trim(),className:Bu.submitButton,children:"Add Comment"})]})};var BN=document.createElement("style");BN.textContent=`.container_ActionButtons { padding: 16px 20px; border-bottom: 1px solid var(--vscode-panel-border); display: flex; @@ -1616,7 +1616,7 @@ ${n} background-color: var(--vscode-button-secondaryHoverBackground); } -`;document.head.appendChild(SR);var Ra={container:"container_ActionButtons",primaryButton:"primaryButton_ActionButtons",button:"button_ActionButtons"};var ds=P(Z()),CR=({onOpenInJira:e,onRefresh:t,onCopyKey:n,onCopyUrl:r})=>(0,ds.jsxs)("div",{className:Ra.container,children:[(0,ds.jsx)("button",{onClick:e,className:Ra.primaryButton,children:"Open in Jira"}),(0,ds.jsx)("button",{onClick:t,className:Ra.button,children:"Refresh"}),(0,ds.jsx)("button",{onClick:n,className:Ra.button,children:"Copy Key"}),(0,ds.jsx)("button",{onClick:r,className:Ra.button,children:"Copy URL"})]});var TR=document.createElement("style");TR.textContent=`.container_SubtasksSection { +`;document.head.appendChild(BN);var Rs={container:"container_ActionButtons",primaryButton:"primaryButton_ActionButtons",button:"button_ActionButtons"};var pi=P(Z()),FN=({onOpenInJira:e,onRefresh:t,onCopyKey:n,onCopyUrl:r})=>(0,pi.jsxs)("div",{className:Rs.container,children:[(0,pi.jsx)("button",{onClick:e,className:Rs.primaryButton,children:"Open in Jira"}),(0,pi.jsx)("button",{onClick:t,className:Rs.button,children:"Refresh"}),(0,pi.jsx)("button",{onClick:n,className:Rs.button,children:"Copy Key"}),(0,pi.jsx)("button",{onClick:r,className:Rs.button,children:"Copy URL"})]});var zN=document.createElement("style");zN.textContent=`.container_SubtasksSection { padding: 16px 20px; } @@ -1674,7 +1674,7 @@ ${n} color: var(--vscode-foreground); } -`;document.head.appendChild(TR);var ao={container:"container_SubtasksSection",heading:"heading_SubtasksSection",subtasksList:"subtasksList_SubtasksSection",subtask:"subtask_SubtasksSection",subtaskHeader:"subtaskHeader_SubtasksSection",subtaskKey:"subtaskKey_SubtasksSection",subtaskStatus:"subtaskStatus_SubtasksSection",subtaskSummary:"subtaskSummary_SubtasksSection"};var Sr=P(Z()),NR=({subtasks:e})=>!e||e.length===0?null:(0,Sr.jsxs)("div",{className:ao.container,children:[(0,Sr.jsxs)("h3",{className:ao.heading,children:["Subtasks (",e.length,")"]}),(0,Sr.jsx)("div",{className:ao.subtasksList,children:e.map(t=>(0,Sr.jsxs)("div",{className:ao.subtask,children:[(0,Sr.jsxs)("div",{className:ao.subtaskHeader,children:[(0,Sr.jsx)("span",{className:ao.subtaskKey,children:t.key}),(0,Sr.jsx)("span",{className:ao.subtaskStatus,children:t.status.name})]}),(0,Sr.jsx)("div",{className:ao.subtaskSummary,children:t.summary})]},t.id))})]});var ii=P(Se());var AR=document.createElement("style");AR.textContent=`.container_BranchManager { +`;document.head.appendChild(zN);var lo={container:"container_SubtasksSection",heading:"heading_SubtasksSection",subtasksList:"subtasksList_SubtasksSection",subtask:"subtask_SubtasksSection",subtaskHeader:"subtaskHeader_SubtasksSection",subtaskKey:"subtaskKey_SubtasksSection",subtaskStatus:"subtaskStatus_SubtasksSection",subtaskSummary:"subtaskSummary_SubtasksSection"};var Lr=P(Z()),UN=({subtasks:e})=>!e||e.length===0?null:(0,Lr.jsxs)("div",{className:lo.container,children:[(0,Lr.jsxs)("h3",{className:lo.heading,children:["Subtasks (",e.length,")"]}),(0,Lr.jsx)("div",{className:lo.subtasksList,children:e.map(t=>(0,Lr.jsxs)("div",{className:lo.subtask,children:[(0,Lr.jsxs)("div",{className:lo.subtaskHeader,children:[(0,Lr.jsx)("span",{className:lo.subtaskKey,children:t.key}),(0,Lr.jsx)("span",{className:lo.subtaskStatus,children:t.status.name})]}),(0,Lr.jsx)("div",{className:lo.subtaskSummary,children:t.summary})]},t.id))})]});var la=P(ke());var wh=P(ke());var HN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Dy=e=>{let t=n$(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ch=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),qN=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Fu=P(ke());var $N={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"};var VN=(0,Fu.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>(0,Fu.createElement)("svg",{ref:l,...$N,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ch("lucide",o),...!a&&!qN(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Fu.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var Rt=(e,t)=>{let n=(0,wh.forwardRef)(({className:r,...o},a)=>(0,wh.createElement)(VN,{ref:a,iconNode:t,className:Ch(`lucide-${HN(Dy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Dy(e),n};var r$=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zu=Rt("check",r$);var o$=[["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"}]],Uu=Rt("external-link",o$);var a$=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Os=Rt("folder-open",a$);var i$=[["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"}]],ia=Rt("git-branch",i$);var s$=[["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"}]],Hu=Rt("lightbulb",s$);var l$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qu=Rt("plus",l$);var u$=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$u=Rt("trash-2",u$);var c$=[["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"}]],sa=Rt("triangle-alert",c$);var WN=document.createElement("style");WN.textContent=`.container_BranchManager { margin: 16px 0; padding: 12px; border-radius: 4px; @@ -1932,7 +1932,7 @@ ${n} .repoIcon_BranchManager { font-size: 14px; } -`;document.head.appendChild(AR);var be={container:"container_BranchManager",header:"header_BranchManager",title:"title_BranchManager",icon:"icon_BranchManager",branchInfo:"branchInfo_BranchManager",branchName:"branchName_BranchManager",branchIcon:"branchIcon_BranchManager",actions:"actions_BranchManager",checkoutButton:"checkoutButton_BranchManager",removeButton:"removeButton_BranchManager",noBranch:"noBranch_BranchManager",noBranchText:"noBranchText_BranchManager",associateForm:"associateForm_BranchManager",inputContainer:"inputContainer_BranchManager",branchInput:"branchInput_BranchManager",dropdown:"dropdown_BranchManager",dropdownItem:"dropdownItem_BranchManager",dropdownIcon:"dropdownIcon_BranchManager",dropdownBranch:"dropdownBranch_BranchManager",dropdownLabel:"dropdownLabel_BranchManager",dropdownMore:"dropdownMore_BranchManager",associateButton:"associateButton_BranchManager",notInProgress:"notInProgress_BranchManager",warning:"warning_BranchManager",warningIcon:"warningIcon_BranchManager",differentRepo:"differentRepo_BranchManager",repoIcon:"repoIcon_BranchManager"};var se=P(Z()),MR=({ticketKey:e,statusCategory:t,onCheckoutBranch:n,onAssociateBranch:r,onRemoveAssociation:o,onLoadBranchInfo:i,onLoadAllBranches:s,onOpenInRepository:a,branchInfo:l,allBranches:u})=>{let[c,d]=(0,ii.useState)(""),[f,p]=(0,ii.useState)(""),[h,m]=(0,ii.useState)(!1),[b,g]=(0,ii.useState)(!1);(0,ii.useEffect)(()=>{i(e)},[e]),(0,ii.useEffect)(()=>{h&&!u&&s()},[h,u]);let y=()=>{c.trim()&&(r(e,c.trim()),d(""),p(""),m(!1),g(!1))},v=()=>{o(e)},x=()=>{n(e)},k=A=>{d(A),p(A),g(!1)},w=A=>{p(A),d(A),g(!0)},E=()=>{g(!0)},_=()=>{if(!u)return[];let{branches:A,currentBranch:F,suggestions:R}=u,S=f.toLowerCase(),M=A;return S&&(M=A.filter(L=>L.toLowerCase().includes(S))),M.sort((L,K)=>{if(L===F)return-1;if(K===F)return 1;let re=R.includes(L),fe=R.includes(K);return re&&!fe?-1:fe&&!re?1:L.localeCompare(K)})},T=A=>{if(!u)return"\u2387";let{currentBranch:F,suggestions:R}=u;return A===F?"\u2713":R.includes(A)?"\u{1F4A1}":"\u2387"},C=A=>{if(!u)return"";let{currentBranch:F,suggestions:R}=u;return A===F?" (current)":R.includes(A)?" (suggested)":""};if(!(t==="indeterminate"||t==="new"))return null;let V=_();return(0,se.jsxs)("div",{className:be.container,children:[(0,se.jsx)("div",{className:be.header,children:(0,se.jsxs)("div",{className:be.title,children:[(0,se.jsx)("span",{className:be.icon,children:"\u{1F33F}"}),"Branch"]})}),l?.branchName?(0,se.jsxs)("div",{className:be.branchInfo,children:[(0,se.jsxs)("div",{className:be.branchName,children:[(0,se.jsx)("span",{className:be.branchIcon,children:"\u2387"}),(0,se.jsx)("span",{children:l.branchName})]}),l.isInDifferentRepo&&l.repositoryName&&(0,se.jsxs)("div",{className:be.differentRepo,children:[(0,se.jsx)("span",{className:be.repoIcon,children:"\u{1F4C2}"}),(0,se.jsxs)("span",{children:["Branch is in ",(0,se.jsx)("strong",{children:l.repositoryName})]})]}),!l.exists&&!l.isInDifferentRepo&&(0,se.jsxs)("div",{className:be.warning,children:[(0,se.jsx)("span",{className:be.warningIcon,children:"\u26A0\uFE0F"}),(0,se.jsx)("span",{children:"Branch no longer exists in repository"})]}),(0,se.jsxs)("div",{className:be.actions,children:[l.isInDifferentRepo&&l.repositoryPath&&a&&(0,se.jsxs)("button",{className:be.checkoutButton,onClick:()=>a(e,l.repositoryPath),children:[(0,se.jsx)("span",{children:"\u{1F4C2}"}),"Open in ",l.repositoryName]}),l.exists&&!l.isInDifferentRepo&&(0,se.jsxs)("button",{className:be.checkoutButton,onClick:x,children:[(0,se.jsx)("span",{children:"\u2197\uFE0F"}),"Checkout Branch"]}),(0,se.jsxs)("button",{className:be.removeButton,onClick:v,children:[(0,se.jsx)("span",{children:"\u{1F5D1}\uFE0F"}),"Remove"]})]})]}):(0,se.jsx)("div",{className:be.noBranch,children:h?(0,se.jsxs)("div",{className:be.associateForm,children:[(0,se.jsxs)("div",{className:be.inputContainer,children:[(0,se.jsx)("input",{type:"text",className:be.branchInput,placeholder:"Type to filter branches...",value:f,onChange:A=>w(A.target.value),onFocus:E,onKeyDown:A=>{A.key==="Enter"?y():A.key==="Escape"&&(m(!1),p(""),d(""),g(!1))},autoFocus:!0}),b&&V.length>0&&(0,se.jsxs)("div",{className:be.dropdown,children:[V.slice(0,10).map(A=>(0,se.jsxs)("div",{className:be.dropdownItem,onClick:()=>k(A),children:[(0,se.jsx)("span",{className:be.dropdownIcon,children:T(A)}),(0,se.jsx)("span",{className:be.dropdownBranch,children:A}),(0,se.jsx)("span",{className:be.dropdownLabel,children:C(A)})]},A)),V.length>10&&(0,se.jsxs)("div",{className:be.dropdownMore,children:["... and ",V.length-10," more"]})]})]}),(0,se.jsx)("button",{className:be.associateButton,onClick:y,disabled:!c.trim(),children:"Associate"}),(0,se.jsx)("button",{className:be.removeButton,onClick:()=>{m(!1),p(""),d(""),g(!1)},children:"Cancel"})]}):(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("div",{className:be.noBranchText,children:"No branch associated with this ticket"}),(0,se.jsxs)("button",{className:be.checkoutButton,onClick:()=>m(!0),children:[(0,se.jsx)("span",{children:"+"}),"Associate Branch"]})]})})]})};var RR=document.createElement("style");RR.textContent=`.container_App { +`;document.head.appendChild(WN);var be={container:"container_BranchManager",header:"header_BranchManager",title:"title_BranchManager",icon:"icon_BranchManager",branchInfo:"branchInfo_BranchManager",branchName:"branchName_BranchManager",branchIcon:"branchIcon_BranchManager",actions:"actions_BranchManager",checkoutButton:"checkoutButton_BranchManager",removeButton:"removeButton_BranchManager",noBranch:"noBranch_BranchManager",noBranchText:"noBranchText_BranchManager",associateForm:"associateForm_BranchManager",inputContainer:"inputContainer_BranchManager",branchInput:"branchInput_BranchManager",dropdown:"dropdown_BranchManager",dropdownItem:"dropdownItem_BranchManager",dropdownIcon:"dropdownIcon_BranchManager",dropdownBranch:"dropdownBranch_BranchManager",dropdownLabel:"dropdownLabel_BranchManager",dropdownMore:"dropdownMore_BranchManager",associateButton:"associateButton_BranchManager",notInProgress:"notInProgress_BranchManager",warning:"warning_BranchManager",warningIcon:"warningIcon_BranchManager",differentRepo:"differentRepo_BranchManager",repoIcon:"repoIcon_BranchManager"};var ne=P(Z()),KN=({ticketKey:e,statusCategory:t,onCheckoutBranch:n,onAssociateBranch:r,onRemoveAssociation:o,onLoadBranchInfo:a,onLoadAllBranches:i,onOpenInRepository:s,branchInfo:l,allBranches:u})=>{let[c,d]=(0,la.useState)(""),[f,p]=(0,la.useState)(""),[h,m]=(0,la.useState)(!1),[b,g]=(0,la.useState)(!1);(0,la.useEffect)(()=>{a(e)},[e]),(0,la.useEffect)(()=>{h&&!u&&i()},[h,u]);let x=()=>{c.trim()&&(r(e,c.trim()),d(""),p(""),m(!1),g(!1))},y=()=>{o(e)},k=()=>{n(e)},v=A=>{d(A),p(A),g(!1)},C=A=>{p(A),d(A),g(!0)},w=()=>{g(!0)},S=()=>{if(!u)return[];let{branches:A,currentBranch:F,suggestions:M}=u,E=f.toLowerCase(),T=A;return E&&(T=A.filter(O=>O.toLowerCase().includes(E))),T.sort((O,G)=>{if(O===F)return-1;if(G===F)return 1;let oe=M.includes(O),fe=M.includes(G);return oe&&!fe?-1:fe&&!oe?1:O.localeCompare(G)})},I=A=>{if(!u)return(0,ne.jsx)(ia,{size:14});let{currentBranch:F,suggestions:M}=u;return A===F?(0,ne.jsx)(zu,{size:14}):M.includes(A)?(0,ne.jsx)(Hu,{size:14}):(0,ne.jsx)(ia,{size:14})},L=A=>{if(!u)return"";let{currentBranch:F,suggestions:M}=u;return A===F?" (current)":M.includes(A)?" (suggested)":""};if(!(t==="indeterminate"||t==="new"))return null;let V=S();return(0,ne.jsxs)("div",{className:be.container,children:[(0,ne.jsx)("div",{className:be.header,children:(0,ne.jsxs)("div",{className:be.title,children:[(0,ne.jsx)(ia,{size:16,className:be.icon}),"Branch"]})}),l?.branchName?(0,ne.jsxs)("div",{className:be.branchInfo,children:[(0,ne.jsxs)("div",{className:be.branchName,children:[(0,ne.jsx)(ia,{size:14,className:be.branchIcon}),(0,ne.jsx)("span",{children:l.branchName})]}),l.isInDifferentRepo&&l.repositoryName&&(0,ne.jsxs)("div",{className:be.differentRepo,children:[(0,ne.jsx)(Os,{size:14,className:be.repoIcon}),(0,ne.jsxs)("span",{children:["Branch is in ",(0,ne.jsx)("strong",{children:l.repositoryName})]})]}),!l.exists&&!l.isInDifferentRepo&&(0,ne.jsxs)("div",{className:be.warning,children:[(0,ne.jsx)(sa,{size:14,className:be.warningIcon}),(0,ne.jsx)("span",{children:"Branch no longer exists in repository"})]}),(0,ne.jsxs)("div",{className:be.actions,children:[l.isInDifferentRepo&&l.repositoryPath&&s&&(0,ne.jsxs)("button",{className:be.checkoutButton,onClick:()=>s(e,l.repositoryPath),children:[(0,ne.jsx)(Os,{size:14}),"Open in ",l.repositoryName]}),l.exists&&!l.isInDifferentRepo&&(0,ne.jsxs)("button",{className:be.checkoutButton,onClick:k,children:[(0,ne.jsx)(Uu,{size:14}),"Checkout Branch"]}),(0,ne.jsxs)("button",{className:be.removeButton,onClick:y,children:[(0,ne.jsx)($u,{size:14}),"Remove"]})]})]}):(0,ne.jsx)("div",{className:be.noBranch,children:h?(0,ne.jsxs)("div",{className:be.associateForm,children:[(0,ne.jsxs)("div",{className:be.inputContainer,children:[(0,ne.jsx)("input",{type:"text",className:be.branchInput,placeholder:"Type to filter branches...",value:f,onChange:A=>C(A.target.value),onFocus:w,onKeyDown:A=>{A.key==="Enter"?x():A.key==="Escape"&&(m(!1),p(""),d(""),g(!1))},autoFocus:!0}),b&&V.length>0&&(0,ne.jsxs)("div",{className:be.dropdown,children:[V.slice(0,10).map(A=>(0,ne.jsxs)("div",{className:be.dropdownItem,onClick:()=>v(A),children:[(0,ne.jsx)("span",{className:be.dropdownIcon,children:I(A)}),(0,ne.jsx)("span",{className:be.dropdownBranch,children:A}),(0,ne.jsx)("span",{className:be.dropdownLabel,children:L(A)})]},A)),V.length>10&&(0,ne.jsxs)("div",{className:be.dropdownMore,children:["... and ",V.length-10," more"]})]})]}),(0,ne.jsx)("button",{className:be.associateButton,onClick:x,disabled:!c.trim(),children:"Associate"}),(0,ne.jsx)("button",{className:be.removeButton,onClick:()=>{m(!1),p(""),d(""),g(!1)},children:"Cancel"})]}):(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("div",{className:be.noBranchText,children:"No branch associated with this ticket"}),(0,ne.jsxs)("button",{className:be.checkoutButton,onClick:()=>m(!0),children:[(0,ne.jsx)(qu,{size:14}),"Associate Branch"]})]})})]})};var GN=document.createElement("style");GN.textContent=`.container_App { background-color: var(--vscode-sideBar-background); color: var(--vscode-foreground); min-height: 100vh; @@ -1950,7 +1950,7 @@ ${n} background-color: var(--vscode-panel-border); margin: 0; } -`;document.head.appendChild(RR);var si={container:"container_App",emptyState:"emptyState_App",divider:"divider_App"};var Ke=P(Z());function B$(){let{postMessage:e,onMessage:t}=Qw(),[n,r]=(0,lo.useState)(window.__JIRA_INITIAL_STATE__?.issue||null),[o,i]=(0,lo.useState)([]),[s,a]=(0,lo.useState)([]),[l,u]=(0,lo.useState)(null),[c,d]=(0,lo.useState)(null);(0,lo.useEffect)(()=>t(A=>{switch(A.command){case"updateIssue":r(A.issue);break;case"transitionsLoaded":i(A.transitions);break;case"usersLoaded":a(A.users);break;case"branchInfo":u({branchName:A.branchName,exists:A.exists,isInDifferentRepo:A.isInDifferentRepo,repositoryName:A.repositoryName,repositoryPath:A.repositoryPath});break;case"allBranchesLoaded":d({branches:A.branches,currentBranch:A.currentBranch,suggestions:A.suggestions});break}}),[t]),(0,lo.useEffect)(()=>{n&&(e({command:"loadTransitions"}),e({command:"loadUsers",projectKey:n.project.key}))},[n?.key]);let f=A=>{e({command:"updateStatus",transitionId:A})},p=A=>{e({command:"addComment",body:A})},h=A=>{e({command:"updateSummary",summary:A})},m=A=>{e({command:"updateDescription",description:A})},b=A=>{e({command:"updateAssignee",assigneeId:A})},g=A=>{e({command:"loadUsers",projectKey:A})},y=A=>{e({command:"searchUsers",searchTerm:A,projectKey:n?.project.key})},v=()=>{e({command:"openInJira"})},x=()=>{e({command:"refresh"})},k=A=>{e({command:"checkoutBranch",ticketKey:A})},w=(A,F)=>{e({command:"associateBranch",ticketKey:A,branchName:F}),setTimeout(()=>{_(A)},100)},E=A=>{e({command:"removeAssociation",ticketKey:A}),setTimeout(()=>{_(A)},100)},_=A=>{e({command:"loadBranchInfo",ticketKey:A})},T=()=>{e({command:"loadAllBranches"})},C=(A,F)=>{e({command:"openInRepository",ticketKey:A,repositoryPath:F})},U=()=>{e({command:"copyKey"})},V=()=>{e({command:"copyUrl"})};return n?(0,Ke.jsxs)("div",{className:si.container,children:[(0,Ke.jsx)(oE,{issueKey:n.key,summary:n.summary,statusName:n.status.name,statusCategory:n.status.statusCategory.key,issueType:n.issueType.name,issueTypeIcon:n.issueType.iconUrl,priority:n.priority,reporter:n.reporter,assignee:n.assignee,url:n.url,onUpdateSummary:h}),(0,Ke.jsx)(bR,{transitions:o,currentStatusId:n.status.id,currentStatusName:n.status.name,onUpdate:f}),(0,Ke.jsx)(vR,{currentAssignee:n.assignee,users:s,onUpdateAssignee:b,onLoadUsers:()=>g(n.project.key),onSearchUsers:y}),(0,Ke.jsx)(CR,{onOpenInJira:v,onRefresh:x,onCopyKey:U,onCopyUrl:V}),(0,Ke.jsx)(MR,{ticketKey:n.key,statusCategory:n.status.statusCategory.key,onCheckoutBranch:k,onAssociateBranch:w,onRemoveAssociation:E,onLoadBranchInfo:_,onLoadAllBranches:T,onOpenInRepository:C,branchInfo:l||void 0,allBranches:c||void 0}),(0,Ke.jsx)(aE,{created:n.created,updated:n.updated,projectName:n.project.name,dueDate:n.dueDate,labels:n.labels}),n.subtasks&&n.subtasks.length>0&&(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:si.divider}),(0,Ke.jsx)(NR,{subtasks:n.subtasks})]}),(0,Ke.jsx)("div",{className:si.divider}),(0,Ke.jsx)(mR,{description:n.description,onUpdateDescription:m}),(0,Ke.jsx)("div",{className:si.divider}),(0,Ke.jsx)(kR,{comments:n.comments||[]}),(0,Ke.jsx)("div",{className:si.divider}),(0,Ke.jsx)(_R,{onSubmit:p})]}):(0,Ke.jsx)("div",{className:si.container,children:(0,Ke.jsx)("p",{className:si.emptyState,children:"Loading issue..."})})}var DR=B$;var IR=P(Z()),F$=OR.default.createRoot(document.getElementById("root"));F$.render((0,IR.jsx)(DR,{}));})(); +`;document.head.appendChild(GN);var ua={container:"container_App",emptyState:"emptyState_App",divider:"divider_App"};var Ge=P(Z());function d$(){let{postMessage:e,onMessage:t}=hw(),[n,r]=(0,uo.useState)(window.__JIRA_INITIAL_STATE__?.issue||null),[o,a]=(0,uo.useState)([]),[i,s]=(0,uo.useState)([]),[l,u]=(0,uo.useState)(null),[c,d]=(0,uo.useState)(null);(0,uo.useEffect)(()=>t(A=>{switch(A.command){case"updateIssue":r(A.issue);break;case"transitionsLoaded":a(A.transitions);break;case"usersLoaded":s(A.users);break;case"branchInfo":u({branchName:A.branchName,exists:A.exists,isInDifferentRepo:A.isInDifferentRepo,repositoryName:A.repositoryName,repositoryPath:A.repositoryPath});break;case"allBranchesLoaded":d({branches:A.branches,currentBranch:A.currentBranch,suggestions:A.suggestions});break}}),[t]),(0,uo.useEffect)(()=>{n&&(e({command:"loadTransitions"}),e({command:"loadUsers",projectKey:n.project.key}))},[n?.key]);let f=A=>{e({command:"updateStatus",transitionId:A})},p=A=>{e({command:"addComment",body:A})},h=A=>{e({command:"updateSummary",summary:A})},m=A=>{e({command:"updateDescription",description:A})},b=A=>{e({command:"updateAssignee",assigneeId:A})},g=A=>{e({command:"loadUsers",projectKey:A})},x=A=>{e({command:"searchUsers",searchTerm:A,projectKey:n?.project.key})},y=()=>{e({command:"openInJira"})},k=()=>{e({command:"refresh"})},v=A=>{e({command:"checkoutBranch",ticketKey:A})},C=(A,F)=>{e({command:"associateBranch",ticketKey:A,branchName:F}),setTimeout(()=>{S(A)},100)},w=A=>{e({command:"removeAssociation",ticketKey:A}),setTimeout(()=>{S(A)},100)},S=A=>{e({command:"loadBranchInfo",ticketKey:A})},I=()=>{e({command:"loadAllBranches"})},L=(A,F)=>{e({command:"openInRepository",ticketKey:A,repositoryPath:F})},U=()=>{e({command:"copyKey"})},V=()=>{e({command:"copyUrl"})};return n?(0,Ge.jsxs)("div",{className:ua.container,children:[(0,Ge.jsx)(yw,{issueKey:n.key,summary:n.summary,statusName:n.status.name,statusCategory:n.status.statusCategory.key,issueType:n.issueType.name,issueTypeIcon:n.issueType.iconUrl,priority:n.priority,reporter:n.reporter,assignee:n.assignee,url:n.url,onUpdateSummary:h}),(0,Ge.jsx)(AN,{transitions:o,currentStatusId:n.status.id,currentStatusName:n.status.name,onUpdate:f}),(0,Ge.jsx)(MN,{currentAssignee:n.assignee,users:i,onUpdateAssignee:b,onLoadUsers:()=>g(n.project.key),onSearchUsers:x}),(0,Ge.jsx)(FN,{onOpenInJira:y,onRefresh:k,onCopyKey:U,onCopyUrl:V}),(0,Ge.jsx)(KN,{ticketKey:n.key,statusCategory:n.status.statusCategory.key,onCheckoutBranch:v,onAssociateBranch:C,onRemoveAssociation:w,onLoadBranchInfo:S,onLoadAllBranches:I,onOpenInRepository:L,branchInfo:l||void 0,allBranches:c||void 0}),(0,Ge.jsx)(Cw,{created:n.created,updated:n.updated,projectName:n.project.name,dueDate:n.dueDate,labels:n.labels}),n.subtasks&&n.subtasks.length>0&&(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)("div",{className:ua.divider}),(0,Ge.jsx)(UN,{subtasks:n.subtasks})]}),(0,Ge.jsx)("div",{className:ua.divider}),(0,Ge.jsx)(IN,{description:n.description,onUpdateDescription:m}),(0,Ge.jsx)("div",{className:ua.divider}),(0,Ge.jsx)(DN,{comments:n.comments||[]}),(0,Ge.jsx)("div",{className:ua.divider}),(0,Ge.jsx)(PN,{onSubmit:p})]}):(0,Ge.jsx)("div",{className:ua.container,children:(0,Ge.jsx)("p",{className:ua.emptyState,children:"Loading issue..."})})}var jN=d$;var JN=P(Z()),f$=XN.default.createRoot(document.getElementById("root"));f$.render((0,JN.jsx)(jN,{}));})(); /*! Bundled license information: react/cjs/react.production.min.js: @@ -2018,4 +2018,24 @@ use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.productio * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) + +lucide-react/dist/esm/shared/src/utils.js: +lucide-react/dist/esm/defaultAttributes.js: +lucide-react/dist/esm/Icon.js: +lucide-react/dist/esm/createLucideIcon.js: +lucide-react/dist/esm/icons/check.js: +lucide-react/dist/esm/icons/external-link.js: +lucide-react/dist/esm/icons/folder-open.js: +lucide-react/dist/esm/icons/git-branch.js: +lucide-react/dist/esm/icons/lightbulb.js: +lucide-react/dist/esm/icons/plus.js: +lucide-react/dist/esm/icons/trash-2.js: +lucide-react/dist/esm/icons/triangle-alert.js: +lucide-react/dist/esm/lucide-react.js: + (** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) */ diff --git a/webview-ui/build/linear-create-ticket.js b/webview-ui/build/linear-create-ticket.js index fe78b6f..49b3cda 100644 --- a/webview-ui/build/linear-create-ticket.js +++ b/webview-ui/build/linear-create-ticket.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var jM=Object.create;var Gp=Object.defineProperty;var KM=Object.getOwnPropertyDescriptor;var GM=Object.getOwnPropertyNames;var YM=Object.getPrototypeOf,JM=Object.prototype.hasOwnProperty;var Ct=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cl=(e,t)=>{for(var n in t)Gp(e,n,{get:t[n],enumerable:!0})},ZM=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of GM(t))!JM.call(e,o)&&o!==n&&Gp(e,o,{get:()=>t[o],enumerable:!(r=KM(t,o))||r.enumerable});return e};var H=(e,t,n)=>(n=e!=null?jM(YM(e)):{},ZM(t||!e||!e.__esModule?Gp(n,"default",{value:e,enumerable:!0}):n,e));var lx=Ct(ae=>{"use strict";var dl=Symbol.for("react.element"),XM=Symbol.for("react.portal"),QM=Symbol.for("react.fragment"),eO=Symbol.for("react.strict_mode"),tO=Symbol.for("react.profiler"),nO=Symbol.for("react.provider"),rO=Symbol.for("react.context"),oO=Symbol.for("react.forward_ref"),iO=Symbol.for("react.suspense"),sO=Symbol.for("react.memo"),lO=Symbol.for("react.lazy"),Jy=Symbol.iterator;function aO(e){return e===null||typeof e!="object"?null:(e=Jy&&e[Jy]||e["@@iterator"],typeof e=="function"?e:null)}var Qy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ex=Object.assign,tx={};function Vi(e,t,n){this.props=e,this.context=t,this.refs=tx,this.updater=n||Qy}Vi.prototype.isReactComponent={};Vi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nx(){}nx.prototype=Vi.prototype;function Jp(e,t,n){this.props=e,this.context=t,this.refs=tx,this.updater=n||Qy}var Zp=Jp.prototype=new nx;Zp.constructor=Jp;ex(Zp,Vi.prototype);Zp.isPureReactComponent=!0;var Zy=Array.isArray,rx=Object.prototype.hasOwnProperty,Xp={current:null},ox={key:!0,ref:!0,__self:!0,__source:!0};function ix(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)rx.call(t,r)&&!ox.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{"use strict";ax.exports=lx()});var yx=Ct(Se=>{"use strict";function rh(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rxu(l,n))axu(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[s]=n,r=s);else if(axu(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function xu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(ux=performance,Se.unstable_now=function(){return ux.now()}):(eh=Date,cx=eh.now(),Se.unstable_now=function(){return eh.now()-cx});var ux,eh,cx,qn=[],Zr=[],pO=1,on=null,mt=3,Eu=!1,Vo=!1,pl=!1,px=typeof setTimeout=="function"?setTimeout:null,hx=typeof clearTimeout=="function"?clearTimeout:null,dx=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function oh(e){for(var t=Nn(Zr);t!==null;){if(t.callback===null)ku(Zr);else if(t.startTime<=e)ku(Zr),t.sortIndex=t.expirationTime,rh(qn,t);else break;t=Nn(Zr)}}function ih(e){if(pl=!1,oh(e),!Vo)if(Nn(qn)!==null)Vo=!0,lh(sh);else{var t=Nn(Zr);t!==null&&ah(ih,t.startTime-e)}}function sh(e,t){Vo=!1,pl&&(pl=!1,hx(hl),hl=-1),Eu=!0;var n=mt;try{for(oh(t),on=Nn(qn);on!==null&&(!(on.expirationTime>t)||e&&!bx());){var r=on.callback;if(typeof r=="function"){on.callback=null,mt=on.priorityLevel;var o=r(on.expirationTime<=t);t=Se.unstable_now(),typeof o=="function"?on.callback=o:on===Nn(qn)&&ku(qn),oh(t)}else ku(qn);on=Nn(qn)}if(on!==null)var i=!0;else{var s=Nn(Zr);s!==null&&ah(ih,s.startTime-t),i=!1}return i}finally{on=null,mt=n,Eu=!1}}var wu=!1,vu=null,hl=-1,mx=5,gx=-1;function bx(){return!(Se.unstable_now()-gxe||125r?(e.sortIndex=n,rh(Zr,e),Nn(qn)===null&&e===Nn(Zr)&&(pl?(hx(hl),hl=-1):pl=!0,ah(ih,n-r))):(e.sortIndex=o,rh(qn,e),Vo||Eu||(Vo=!0,lh(sh))),e};Se.unstable_shouldYield=bx;Se.unstable_wrapCallback=function(e){var t=mt;return function(){var n=mt;mt=t;try{return e.apply(this,arguments)}finally{mt=n}}}});var vx=Ct((O$,xx)=>{"use strict";xx.exports=yx()});var _E=Ct(Xt=>{"use strict";var hO=Re(),Jt=vx();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oh=Object.prototype.hasOwnProperty,mO=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,kx={},Ex={};function gO(e){return Oh.call(Ex,e)?!0:Oh.call(kx,e)?!1:mO.test(e)?Ex[e]=!0:(kx[e]=!0,!1)}function bO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yO(e,t,n,r){if(t===null||typeof t>"u"||bO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new Mt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new Mt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Mt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new Mt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lt[e]=new Mt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Mt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Mt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Mt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Mt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Em=/[\-:]([a-z])/g;function wm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Em,wm);lt[t]=new Mt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Em,wm);lt[t]=new Mt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Em,wm);lt[t]=new Mt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!0,!0)});function _m(e,t,n,r){var o=lt.hasOwnProperty(t)?lt[t]:null;(o!==null?o.type!==0:r||!(2{var WM=Object.create;var Yp=Object.defineProperty;var jM=Object.getOwnPropertyDescriptor;var KM=Object.getOwnPropertyNames;var GM=Object.getPrototypeOf,YM=Object.prototype.hasOwnProperty;var Ct=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cl=(e,t)=>{for(var n in t)Yp(e,n,{get:t[n],enumerable:!0})},JM=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of KM(t))!YM.call(e,o)&&o!==n&&Yp(e,o,{get:()=>t[o],enumerable:!(r=jM(t,o))||r.enumerable});return e};var H=(e,t,n)=>(n=e!=null?WM(GM(e)):{},JM(t||!e||!e.__esModule?Yp(n,"default",{value:e,enumerable:!0}):n,e));var ux=Ct(ae=>{"use strict";var dl=Symbol.for("react.element"),ZM=Symbol.for("react.portal"),XM=Symbol.for("react.fragment"),QM=Symbol.for("react.strict_mode"),eO=Symbol.for("react.profiler"),tO=Symbol.for("react.provider"),nO=Symbol.for("react.context"),rO=Symbol.for("react.forward_ref"),oO=Symbol.for("react.suspense"),iO=Symbol.for("react.memo"),sO=Symbol.for("react.lazy"),Xy=Symbol.iterator;function lO(e){return e===null||typeof e!="object"?null:(e=Xy&&e[Xy]||e["@@iterator"],typeof e=="function"?e:null)}var tx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nx=Object.assign,rx={};function qi(e,t,n){this.props=e,this.context=t,this.refs=rx,this.updater=n||tx}qi.prototype.isReactComponent={};qi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};qi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ox(){}ox.prototype=qi.prototype;function Zp(e,t,n){this.props=e,this.context=t,this.refs=rx,this.updater=n||tx}var Xp=Zp.prototype=new ox;Xp.constructor=Zp;nx(Xp,qi.prototype);Xp.isPureReactComponent=!0;var Qy=Array.isArray,ix=Object.prototype.hasOwnProperty,Qp={current:null},sx={key:!0,ref:!0,__self:!0,__source:!0};function lx(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)ix.call(t,r)&&!sx.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{"use strict";cx.exports=ux()});var vx=Ct(Se=>{"use strict";function oh(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rxu(l,n))axu(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[s]=n,r=s);else if(axu(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function xu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(dx=performance,Se.unstable_now=function(){return dx.now()}):(th=Date,fx=th.now(),Se.unstable_now=function(){return th.now()-fx});var dx,th,fx,Vn=[],Zr=[],fO=1,on=null,mt=3,Eu=!1,qo=!1,pl=!1,mx=typeof setTimeout=="function"?setTimeout:null,gx=typeof clearTimeout=="function"?clearTimeout:null,px=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ih(e){for(var t=Nn(Zr);t!==null;){if(t.callback===null)ku(Zr);else if(t.startTime<=e)ku(Zr),t.sortIndex=t.expirationTime,oh(Vn,t);else break;t=Nn(Zr)}}function sh(e){if(pl=!1,ih(e),!qo)if(Nn(Vn)!==null)qo=!0,ah(lh);else{var t=Nn(Zr);t!==null&&uh(sh,t.startTime-e)}}function lh(e,t){qo=!1,pl&&(pl=!1,gx(hl),hl=-1),Eu=!0;var n=mt;try{for(ih(t),on=Nn(Vn);on!==null&&(!(on.expirationTime>t)||e&&!xx());){var r=on.callback;if(typeof r=="function"){on.callback=null,mt=on.priorityLevel;var o=r(on.expirationTime<=t);t=Se.unstable_now(),typeof o=="function"?on.callback=o:on===Nn(Vn)&&ku(Vn),ih(t)}else ku(Vn);on=Nn(Vn)}if(on!==null)var i=!0;else{var s=Nn(Zr);s!==null&&uh(sh,s.startTime-t),i=!1}return i}finally{on=null,mt=n,Eu=!1}}var wu=!1,vu=null,hl=-1,bx=5,yx=-1;function xx(){return!(Se.unstable_now()-yxe||125r?(e.sortIndex=n,oh(Zr,e),Nn(Vn)===null&&e===Nn(Zr)&&(pl?(gx(hl),hl=-1):pl=!0,uh(sh,n-r))):(e.sortIndex=o,oh(Vn,e),qo||Eu||(qo=!0,ah(lh))),e};Se.unstable_shouldYield=xx;Se.unstable_wrapCallback=function(e){var t=mt;return function(){var n=mt;mt=t;try{return e.apply(this,arguments)}finally{mt=n}}}});var Ex=Ct((D$,kx)=>{"use strict";kx.exports=vx()});var CE=Ct(Xt=>{"use strict";var pO=Re(),Jt=Ex();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rh=Object.prototype.hasOwnProperty,hO=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,wx={},_x={};function mO(e){return Rh.call(_x,e)?!0:Rh.call(wx,e)?!1:hO.test(e)?_x[e]=!0:(wx[e]=!0,!1)}function gO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bO(e,t,n,r){if(t===null||typeof t>"u"||gO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new Mt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new Mt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Mt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new Mt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lt[e]=new Mt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Mt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Mt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Mt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Mt(e,5,!1,e.toLowerCase(),null,!1,!1)});var wm=/[\-:]([a-z])/g;function _m(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wm,_m);lt[t]=new Mt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wm,_m);lt[t]=new Mt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wm,_m);lt[t]=new Mt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sm(e,t,n,r){var o=lt.hasOwnProperty(t)?lt[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` -`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{ch=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wl(e):""}function xO(e){switch(e.tag){case 5:return wl(e.type);case 16:return wl("Lazy");case 13:return wl("Suspense");case 19:return wl("SuspenseList");case 0:case 2:case 15:return e=dh(e.type,!1),e;case 11:return e=dh(e.type.render,!1),e;case 1:return e=dh(e.type,!0),e;default:return""}}function Lh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gi:return"Fragment";case Ki:return"Portal";case Rh:return"Profiler";case Sm:return"StrictMode";case Dh:return"Suspense";case Ih:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nv:return(e.displayName||"Context")+".Consumer";case Av:return(e._context.displayName||"Context")+".Provider";case Cm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Tm:return t=e.displayName||null,t!==null?t:Lh(e.type)||"Memo";case Qr:t=e._payload,e=e._init;try{return Lh(e(t))}catch{}}return null}function vO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lh(t);case 8:return t===Sm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ho(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ov(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kO(e){var t=Ov(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Su(e){e._valueTracker||(e._valueTracker=kO(e))}function Rv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ov(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Qu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ph(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _x(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ho(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Dv(e,t){t=t.checked,t!=null&&_m(e,"checked",t,!1)}function Bh(e,t){Dv(e,t);var n=ho(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fh(e,t.type,ho(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fh(e,t,n){(t!=="number"||Qu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var _l=Array.isArray;function ss(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Cu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},EO=["Webkit","ms","Moz","O"];Object.keys(Tl).forEach(function(e){EO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tl[t]=Tl[e]})});function Bv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tl.hasOwnProperty(e)&&Tl[e]?(""+t).trim():t+"px"}function Fv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Bv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var wO=Le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $h(e,t){if(t){if(wO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Hh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qh=null;function Am(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vh=null,ls=null,as=null;function Ax(e){if(e=ta(e)){if(typeof Vh!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Tc(t),Vh(e.stateNode,e.type,t))}}function zv(e){ls?as?as.push(e):as=[e]:ls=e}function Uv(){if(ls){var e=ls,t=as;if(as=ls=null,Ax(e),t)for(e=0;e>>=0,e===0?32:31-(IO(e)/LO|0)|0}var Tu=64,Au=4194304;function Sl(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Sl(l):(i&=s,i!==0&&(r=Sl(i)))}else s=n&~o,s!==0?r=Sl(s):i!==0&&(r=Sl(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ql(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-In(t),e[t]=n}function zO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nl),Bx=" ",Fx=!1;function sk(e,t){switch(e){case"keyup":return pR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yi=!1;function mR(e,t){switch(e){case"compositionend":return lk(t);case"keypress":return t.which!==32?null:(Fx=!0,Bx);case"textInput":return e=t.data,e===Bx&&Fx?null:e;default:return null}}function gR(e,t){if(Yi)return e==="compositionend"||!Pm&&sk(e,t)?(e=ok(),Vu=Dm=ro=null,Yi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$x(n)}}function dk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fk(){for(var e=window,t=Qu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qu(e.document)}return t}function Bm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function SR(e){var t=fk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dk(n.ownerDocument.documentElement,n)){if(r!==null&&Bm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Hx(n,i);var s=Hx(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ji=null,Jh=null,Ol=null,Zh=!1;function qx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zh||Ji==null||Ji!==Qu(r)||(r=Ji,"selectionStart"in r&&Bm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ol&&ql(Ol,r)||(Ol=r,r=sc(Jh,"onSelect"),0Qi||(e.current=rm[Qi],rm[Qi]=null,Qi--)}function Ce(e,t){Qi++,rm[Qi]=e.current,e.current=t}var mo={},xt=bo(mo),Ft=bo(!1),Xo=mo;function ps(e,t){var n=e.type.contextTypes;if(!n)return mo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function zt(e){return e=e.childContextTypes,e!=null}function ac(){Ae(Ft),Ae(xt)}function Xx(e,t,n){if(xt.current!==mo)throw Error(R(168));Ce(xt,t),Ce(Ft,n)}function kk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(R(108,vO(e)||"Unknown",o));return Le({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mo,Xo=xt.current,Ce(xt,e),Ce(Ft,Ft.current),!0}function Qx(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=kk(e,t,Xo),r.__reactInternalMemoizedMergedChildContext=e,Ae(Ft),Ae(xt),Ce(xt,e)):Ae(Ft),Ce(Ft,n)}var gr=null,Ac=!1,Eh=!1;function Ek(e){gr===null?gr=[e]:gr.push(e)}function LR(e){Ac=!0,Ek(e)}function yo(){if(!Eh&&gr!==null){Eh=!0;var e=0,t=ye;try{var n=gr;for(ye=1;e>=s,o-=s,br=1<<32-In(t)+o|n<_?(A=w,w=null):A=w.sibling;var T=f(g,w,x[_],v);if(T===null){w===null&&(w=A);break}e&&w&&T.alternate===null&&t(g,w),y=i(T,y,_),E===null?k=T:E.sibling=T,E=T,w=A}if(_===x.length)return n(g,w),Me&&Wo(g,_),k;if(w===null){for(;__?(A=w,w=null):A=w.sibling;var B=f(g,w,T.value,v);if(B===null){w===null&&(w=A);break}e&&w&&B.alternate===null&&t(g,w),y=i(B,y,_),E===null?k=B:E.sibling=B,E=B,w=A}if(T.done)return n(g,w),Me&&Wo(g,_),k;if(w===null){for(;!T.done;_++,T=x.next())T=d(g,T.value,v),T!==null&&(y=i(T,y,_),E===null?k=T:E.sibling=T,E=T);return Me&&Wo(g,_),k}for(w=r(g,w);!T.done;_++,T=x.next())T=p(w,g,_,T.value,v),T!==null&&(e&&T.alternate!==null&&w.delete(T.key===null?_:T.key),y=i(T,y,_),E===null?k=T:E.sibling=T,E=T);return e&&w.forEach(function(G){return t(g,G)}),Me&&Wo(g,_),k}function b(g,y,x,v){if(typeof x=="object"&&x!==null&&x.type===Gi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case _u:e:{for(var k=x.key,E=y;E!==null;){if(E.key===k){if(k=x.type,k===Gi){if(E.tag===7){n(g,E.sibling),y=o(E,x.props.children),y.return=g,g=y;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Qr&&nv(k)===E.type){n(g,E.sibling),y=o(E,x.props),y.ref=xl(g,E,x),y.return=g,g=y;break e}n(g,E);break}else t(g,E);E=E.sibling}x.type===Gi?(y=Zo(x.props.children,g.mode,v,x.key),y.return=g,g=y):(v=Xu(x.type,x.key,x.props,null,g.mode,v),v.ref=xl(g,y,x),v.return=g,g=v)}return s(g);case Ki:e:{for(E=x.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(g,y.sibling),y=o(y,x.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Mh(x,g.mode,v),y.return=g,g=y}return s(g);case Qr:return E=x._init,b(g,y,E(x._payload),v)}if(_l(x))return h(g,y,x,v);if(ml(x))return m(g,y,x,v);zu(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,x),y.return=g,g=y):(n(g,y),y=Nh(x,g.mode,v),y.return=g,g=y),s(g)):n(g,y)}return b}var ms=Ck(!0),Tk=Ck(!1),fc=bo(null),pc=null,ns=null,$m=null;function Hm(){$m=ns=pc=null}function qm(e){var t=fc.current;Ae(fc),e._currentValue=t}function sm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function cs(e,t){pc=e,$m=ns=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bt=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if($m!==e)if(e={context:e,memoizedValue:t,next:null},ns===null){if(pc===null)throw Error(R(308));ns=e,pc.dependencies={lanes:0,firstContext:e}}else ns=ns.next=e;return t}var Go=null;function Vm(e){Go===null?Go=[e]:Go.push(e)}function Ak(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Vm(t)):(n.next=o.next,o.next=n),t.interleaved=n,Er(e,r)}function Er(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var eo=!1;function Wm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(fe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Er(e,n)}return o=r.interleaved,o===null?(t.next=t,Vm(r)):(t.next=o.next,o.next=t),r.interleaved=t,Er(e,n)}function ju(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mm(e,n)}}function rv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hc(e,t,n,r){var o=e.updateQueue;eo=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;s=0,c=u=a=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,m=l;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Le({},d,f);break e;case 2:eo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=f;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;f=l,l=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);ti|=s,e.lanes=s,e.memoizedState=d}}function ov(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=_h.transition;_h.transition={};try{e(!1),t()}finally{ye=n,_h.transition=r}}function jk(){return dn().memoizedState}function zR(e,t,n){var r=fo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kk(e))Gk(t,n);else if(n=Ak(e,t,n,r),n!==null){var o=Nt();Ln(n,e,r,o),Yk(n,t,r)}}function UR(e,t,n){var r=fo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kk(e))Gk(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Pn(l,s)){var a=t.interleaved;a===null?(o.next=o,Vm(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Ak(e,t,o,r),n!==null&&(o=Nt(),Ln(n,e,r,o),Yk(n,t,r))}}function Kk(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function Gk(e,t){Rl=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yk(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mm(e,n)}}var bc={readContext:cn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},$R={readContext:cn,useCallback:function(e,t){return Wn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:sv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gu(4194308,4,$k.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gu(4,2,e,t)},useMemo:function(e,t){var n=Wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zR.bind(null,Ie,e),[r.memoizedState,e]},useRef:function(e){var t=Wn();return e={current:e},t.memoizedState=e},useState:iv,useDebugValue:Qm,useDeferredValue:function(e){return Wn().memoizedState=e},useTransition:function(){var e=iv(!1),t=e[0];return e=FR.bind(null,e[1]),Wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ie,o=Wn();if(Me){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Xe===null)throw Error(R(349));(ei&30)!==0||Dk(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,sv(Lk.bind(null,r,i,e),[e]),r.flags|=2048,Zl(9,Ik.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Wn(),t=Xe.identifierPrefix;if(Me){var n=yr,r=br;n=(r&~(1<<32-In(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yl++,0")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{dh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wl(e):""}function yO(e){switch(e.tag){case 5:return wl(e.type);case 16:return wl("Lazy");case 13:return wl("Suspense");case 19:return wl("SuspenseList");case 0:case 2:case 15:return e=fh(e.type,!1),e;case 11:return e=fh(e.type.render,!1),e;case 1:return e=fh(e.type,!0),e;default:return""}}function Ph(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gi:return"Fragment";case Ki:return"Portal";case Dh:return"Profiler";case Cm:return"StrictMode";case Ih:return"Suspense";case Lh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ov:return(e.displayName||"Context")+".Consumer";case Mv:return(e._context.displayName||"Context")+".Provider";case Tm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Am:return t=e.displayName||null,t!==null?t:Ph(e.type)||"Memo";case Qr:t=e._payload,e=e._init;try{return Ph(e(t))}catch{}}return null}function xO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ph(t);case 8:return t===Cm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ho(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vO(e){var t=Dv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Su(e){e._valueTracker||(e._valueTracker=vO(e))}function Iv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Qu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Bh(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ho(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lv(e,t){t=t.checked,t!=null&&Sm(e,"checked",t,!1)}function Fh(e,t){Lv(e,t);var n=ho(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zh(e,t.type,n):t.hasOwnProperty("defaultValue")&&zh(e,t.type,ho(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zh(e,t,n){(t!=="number"||Qu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var _l=Array.isArray;function ss(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Cu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kO=["Webkit","ms","Moz","O"];Object.keys(Tl).forEach(function(e){kO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tl[t]=Tl[e]})});function zv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tl.hasOwnProperty(e)&&Tl[e]?(""+t).trim():t+"px"}function Uv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=zv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var EO=Le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hh(e,t){if(t){if(EO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Vh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qh=null;function Nm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wh=null,ls=null,as=null;function Mx(e){if(e=ta(e)){if(typeof Wh!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Tc(t),Wh(e.stateNode,e.type,t))}}function $v(e){ls?as?as.push(e):as=[e]:ls=e}function Hv(){if(ls){var e=ls,t=as;if(as=ls=null,Mx(e),t)for(e=0;e>>=0,e===0?32:31-(DO(e)/IO|0)|0}var Tu=64,Au=4194304;function Sl(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Sl(l):(i&=s,i!==0&&(r=Sl(i)))}else s=n&~o,s!==0?r=Sl(s):i!==0&&(r=Sl(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ql(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-In(t),e[t]=n}function FO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nl),zx=" ",Ux=!1;function ak(e,t){switch(e){case"keyup":return fR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yi=!1;function hR(e,t){switch(e){case"compositionend":return uk(t);case"keypress":return t.which!==32?null:(Ux=!0,zx);case"textInput":return e=t.data,e===zx&&Ux?null:e;default:return null}}function mR(e,t){if(Yi)return e==="compositionend"||!Bm&&ak(e,t)?(e=sk(),qu=Im=ro=null,Yi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vx(n)}}function pk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hk(){for(var e=window,t=Qu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qu(e.document)}return t}function Fm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _R(e){var t=hk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pk(n.ownerDocument.documentElement,n)){if(r!==null&&Fm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=qx(n,i);var s=qx(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ji=null,Zh=null,Ol=null,Xh=!1;function Wx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xh||Ji==null||Ji!==Qu(r)||(r=Ji,"selectionStart"in r&&Fm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ol&&Vl(Ol,r)||(Ol=r,r=sc(Zh,"onSelect"),0Qi||(e.current=om[Qi],om[Qi]=null,Qi--)}function Ce(e,t){Qi++,om[Qi]=e.current,e.current=t}var mo={},xt=bo(mo),Ft=bo(!1),Xo=mo;function ps(e,t){var n=e.type.contextTypes;if(!n)return mo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function zt(e){return e=e.childContextTypes,e!=null}function ac(){Ae(Ft),Ae(xt)}function ev(e,t,n){if(xt.current!==mo)throw Error(R(168));Ce(xt,t),Ce(Ft,n)}function wk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(R(108,xO(e)||"Unknown",o));return Le({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mo,Xo=xt.current,Ce(xt,e),Ce(Ft,Ft.current),!0}function tv(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=wk(e,t,Xo),r.__reactInternalMemoizedMergedChildContext=e,Ae(Ft),Ae(xt),Ce(xt,e)):Ae(Ft),Ce(Ft,n)}var gr=null,Ac=!1,wh=!1;function _k(e){gr===null?gr=[e]:gr.push(e)}function IR(e){Ac=!0,_k(e)}function yo(){if(!wh&&gr!==null){wh=!0;var e=0,t=ye;try{var n=gr;for(ye=1;e>=s,o-=s,br=1<<32-In(t)+o|n<_?(A=w,w=null):A=w.sibling;var T=f(m,w,x[_],v);if(T===null){w===null&&(w=A);break}e&&w&&T.alternate===null&&t(m,w),y=i(T,y,_),E===null?k=T:E.sibling=T,E=T,w=A}if(_===x.length)return n(m,w),Me&&Wo(m,_),k;if(w===null){for(;__?(A=w,w=null):A=w.sibling;var B=f(m,w,T.value,v);if(B===null){w===null&&(w=A);break}e&&w&&B.alternate===null&&t(m,w),y=i(B,y,_),E===null?k=B:E.sibling=B,E=B,w=A}if(T.done)return n(m,w),Me&&Wo(m,_),k;if(w===null){for(;!T.done;_++,T=x.next())T=d(m,T.value,v),T!==null&&(y=i(T,y,_),E===null?k=T:E.sibling=T,E=T);return Me&&Wo(m,_),k}for(w=r(m,w);!T.done;_++,T=x.next())T=p(w,m,_,T.value,v),T!==null&&(e&&T.alternate!==null&&w.delete(T.key===null?_:T.key),y=i(T,y,_),E===null?k=T:E.sibling=T,E=T);return e&&w.forEach(function(G){return t(m,G)}),Me&&Wo(m,_),k}function b(m,y,x,v){if(typeof x=="object"&&x!==null&&x.type===Gi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case _u:e:{for(var k=x.key,E=y;E!==null;){if(E.key===k){if(k=x.type,k===Gi){if(E.tag===7){n(m,E.sibling),y=o(E,x.props.children),y.return=m,m=y;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Qr&&ov(k)===E.type){n(m,E.sibling),y=o(E,x.props),y.ref=xl(m,E,x),y.return=m,m=y;break e}n(m,E);break}else t(m,E);E=E.sibling}x.type===Gi?(y=Zo(x.props.children,m.mode,v,x.key),y.return=m,m=y):(v=Xu(x.type,x.key,x.props,null,m.mode,v),v.ref=xl(m,y,x),v.return=m,m=v)}return s(m);case Ki:e:{for(E=x.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(m,y.sibling),y=o(y,x.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=Oh(x,m.mode,v),y.return=m,m=y}return s(m);case Qr:return E=x._init,b(m,y,E(x._payload),v)}if(_l(x))return h(m,y,x,v);if(ml(x))return g(m,y,x,v);zu(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(m,y.sibling),y=o(y,x),y.return=m,m=y):(n(m,y),y=Mh(x,m.mode,v),y.return=m,m=y),s(m)):n(m,y)}return b}var ms=Ak(!0),Nk=Ak(!1),fc=bo(null),pc=null,ns=null,Hm=null;function Vm(){Hm=ns=pc=null}function qm(e){var t=fc.current;Ae(fc),e._currentValue=t}function lm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function cs(e,t){pc=e,Hm=ns=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bt=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Hm!==e)if(e={context:e,memoizedValue:t,next:null},ns===null){if(pc===null)throw Error(R(308));ns=e,pc.dependencies={lanes:0,firstContext:e}}else ns=ns.next=e;return t}var Go=null;function Wm(e){Go===null?Go=[e]:Go.push(e)}function Mk(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Wm(t)):(n.next=o.next,o.next=n),t.interleaved=n,Er(e,r)}function Er(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var eo=!1;function jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ok(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(fe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Er(e,n)}return o=r.interleaved,o===null?(t.next=t,Wm(r)):(t.next=o.next,o.next=t),r.interleaved=t,Er(e,n)}function ju(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Om(e,n)}}function iv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hc(e,t,n,r){var o=e.updateQueue;eo=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;s=0,c=u=a=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,g=l;switch(f=t,p=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Le({},d,f);break e;case 2:eo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=f;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;f=l,l=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);ti|=s,e.lanes=s,e.memoizedState=d}}function sv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Sh.transition;Sh.transition={};try{e(!1),t()}finally{ye=n,Sh.transition=r}}function Gk(){return dn().memoizedState}function FR(e,t,n){var r=fo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Yk(e))Jk(t,n);else if(n=Mk(e,t,n,r),n!==null){var o=Nt();Ln(n,e,r,o),Zk(n,t,r)}}function zR(e,t,n){var r=fo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yk(e))Jk(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Pn(l,s)){var a=t.interleaved;a===null?(o.next=o,Wm(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Mk(e,t,o,r),n!==null&&(o=Nt(),Ln(n,e,r,o),Zk(n,t,r))}}function Yk(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function Jk(e,t){Rl=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zk(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Om(e,n)}}var bc={readContext:cn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},UR={readContext:cn,useCallback:function(e,t){return Wn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:av,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gu(4194308,4,Vk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gu(4,2,e,t)},useMemo:function(e,t){var n=Wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FR.bind(null,Ie,e),[r.memoizedState,e]},useRef:function(e){var t=Wn();return e={current:e},t.memoizedState=e},useState:lv,useDebugValue:e0,useDeferredValue:function(e){return Wn().memoizedState=e},useTransition:function(){var e=lv(!1),t=e[0];return e=BR.bind(null,e[1]),Wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ie,o=Wn();if(Me){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Xe===null)throw Error(R(349));(ei&30)!==0||Lk(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,av(Bk.bind(null,r,i,e),[e]),r.flags|=2048,Zl(9,Pk.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Wn(),t=Xe.identifierPrefix;if(Me){var n=yr,r=br;n=(r&~(1<<32-In(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[jn]=t,e[jl]=r,iE(e,t,!1,!1),t.stateNode=e;e:{switch(s=Hh(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;oys&&(t.flags|=128,r=!0,vl(i,!1),t.lanes=4194304)}else{if(!r)if(e=mc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Me)return bt(t),null}else 2*qe()-i.renderingStartTime>ys&&n!==1073741824&&(t.flags|=128,r=!0,vl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=qe(),t.sibling=null,n=De.current,Ce(De,r?n&1|2:n&1),t):(bt(t),null);case 22:case 23:return i0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Kt&1073741824)!==0&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function YR(e,t){switch(zm(t),t.tag){case 1:return zt(t.type)&&ac(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gs(),Ae(Ft),Ae(xt),Gm(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Km(t),null;case 13:if(Ae(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(De),null;case 4:return gs(),null;case 10:return qm(t.type._context),null;case 22:case 23:return i0(),null;case 24:return null;default:return null}}var $u=!1,yt=!1,JR=typeof WeakSet=="function"?WeakSet:Set,F=null;function rs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function hm(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var bv=!1;function ZR(e,t){if(Xh=oc,e=fk(),Bm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qh={focusedElem:e,selectionRange:n},oc=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:On(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(v){Fe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return h=bv,bv=!1,h}function Dl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&hm(t,n,i)}o=o.next}while(o!==r)}}function Oc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function aE(e){var t=e.alternate;t!==null&&(e.alternate=null,aE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[jl],delete t[nm],delete t[DR],delete t[IR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uE(e){return e.tag===5||e.tag===3||e.tag===4}function yv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=lc));else if(r!==4&&(e=e.child,e!==null))for(gm(e,t,n),e=e.sibling;e!==null;)gm(e,t,n),e=e.sibling}function bm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bm(e,t,n),e=e.sibling;e!==null;)bm(e,t,n),e=e.sibling}var it=null,Rn=!1;function Xr(e,t,n){for(n=n.child;n!==null;)cE(e,t,n),n=n.sibling}function cE(e,t,n){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(wc,n)}catch{}switch(n.tag){case 5:yt||rs(n,t);case 6:var r=it,o=Rn;it=null,Xr(e,t,n),it=r,Rn=o,it!==null&&(Rn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(Rn?(e=it,n=n.stateNode,e.nodeType===8?kh(e.parentNode,n):e.nodeType===1&&kh(e,n),$l(e)):kh(it,n.stateNode));break;case 4:r=it,o=Rn,it=n.stateNode.containerInfo,Rn=!0,Xr(e,t,n),it=r,Rn=o;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&hm(n,t,s),o=o.next}while(o!==r)}Xr(e,t,n);break;case 1:if(!yt&&(rs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Fe(n,t,l)}Xr(e,t,n);break;case 21:Xr(e,t,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Xr(e,t,n),yt=r):Xr(e,t,n);break;default:Xr(e,t,n)}}function xv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new JR),t.forEach(function(r){var o=sD.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QR(r/1960))-r,10e?16:e,oo===null)var r=!1;else{if(e=oo,oo=null,vc=0,(fe&6)!==0)throw Error(R(331));var o=fe;for(fe|=4,F=e.current;F!==null;){var i=F,s=i.child;if((F.flags&16)!==0){var l=i.deletions;if(l!==null){for(var a=0;aqe()-r0?Jo(e,0):n0|=n),Ut(e,t)}function yE(e,t){t===0&&((e.mode&1)===0?t=1:(t=Au,Au<<=1,(Au&130023424)===0&&(Au=4194304)));var n=Nt();e=Er(e,t),e!==null&&(Ql(e,t,n),Ut(e,n))}function iD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yE(e,n)}function sD(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),yE(e,n)}var xE;xE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Bt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Bt=!1,KR(e,t,n);Bt=(e.flags&131072)!==0}else Bt=!1,Me&&(t.flags&1048576)!==0&&wk(t,dc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yu(e,t),e=t.pendingProps;var o=ps(t,xt.current);cs(t,n),o=Jm(null,t,r,e,o,n);var i=Zm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Wm(t),o.updater=Mc,t.stateNode=o,o._reactInternals=t,am(t,r,e,n),t=cm(null,t,r,!0,i,n)):(t.tag=0,Me&&i&&Fm(t),At(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=aD(r),e=On(r,e),o){case 0:t=um(null,t,r,e,n);break e;case 1:t=hv(null,t,r,e,n);break e;case 11:t=fv(null,t,r,e,n);break e;case 14:t=pv(null,t,r,On(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),um(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),hv(e,t,r,o,n);case 3:e:{if(nE(t),e===null)throw Error(R(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Nk(e,t),hc(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=bs(Error(R(423)),t),t=mv(e,t,r,n,o);break e}else if(r!==o){o=bs(Error(R(424)),t),t=mv(e,t,r,n,o);break e}else for(Gt=ao(t.stateNode.containerInfo.firstChild),Yt=t,Me=!0,Dn=null,n=Tk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hs(),r===o){t=wr(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return Mk(t),e===null&&im(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,em(r,o)?s=null:i!==null&&em(r,i)&&(t.flags|=32),tE(e,t),At(e,t,s,n),t.child;case 6:return e===null&&im(t),null;case 13:return rE(e,t,n);case 4:return jm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ms(t,null,r,n):At(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),fv(e,t,r,o,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ce(fc,r._currentValue),r._currentValue=s,i!==null)if(Pn(i.value,s)){if(i.children===o.children&&!Ft.current){t=wr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=xr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),sm(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(R(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),sm(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}At(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,cs(t,n),o=cn(o),r=r(o),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,o=On(r,t.pendingProps),o=On(r.type,o),pv(e,t,r,o,n);case 15:return Qk(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),Yu(e,t),t.tag=1,zt(r)?(e=!0,uc(t)):e=!1,cs(t,n),Jk(t,r,o),am(t,r,o,n),cm(null,t,r,!0,e,n);case 19:return oE(e,t,n);case 22:return eE(e,t,n)}throw Error(R(156,t.tag))};function vE(e,t){return Kv(e,t)}function lD(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,n,r){return new lD(e,t,n,r)}function l0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aD(e){if(typeof e=="function")return l0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cm)return 11;if(e===Tm)return 14}return 2}function po(e,t){var n=e.alternate;return n===null?(n=an(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")l0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gi:return Zo(n.children,o,i,t);case Sm:s=8,o|=8;break;case Rh:return e=an(12,n,t,o|2),e.elementType=Rh,e.lanes=i,e;case Dh:return e=an(13,n,t,o),e.elementType=Dh,e.lanes=i,e;case Ih:return e=an(19,n,t,o),e.elementType=Ih,e.lanes=i,e;case Mv:return Dc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Av:s=10;break e;case Nv:s=9;break e;case Cm:s=11;break e;case Tm:s=14;break e;case Qr:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=an(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zo(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Dc(e,t,n,r){return e=an(22,e,r,t),e.elementType=Mv,e.lanes=n,e.stateNode={isHidden:!1},e}function Nh(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function Mh(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uD(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ph(0),this.expirationTimes=ph(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ph(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function a0(e,t,n,r,o,i,s,l,a){return e=new uD(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=an(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wm(i),e}function cD(e,t,n){var r=3{"use strict";function SE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(SE)}catch{}}SE(),CE.exports=_E()});var AE=Ct(f0=>{"use strict";var TE=ks();f0.createRoot=TE.createRoot,f0.hydrateRoot=TE.hydrateRoot;var I$});var DE=Ct(zc=>{"use strict";var mD=Re(),gD=Symbol.for("react.element"),bD=Symbol.for("react.fragment"),yD=Object.prototype.hasOwnProperty,xD=mD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vD={key:!0,ref:!0,__self:!0,__source:!0};function RE(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)yD.call(t,r)&&!vD.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:gD,type:e,key:i,ref:s,props:o,_owner:xD.current}}zc.Fragment=bD;zc.jsx=RE;zc.jsxs=RE});var de=Ct((z$,IE)=>{"use strict";IE.exports=DE()});var qE=Ct(HE=>{"use strict";var ws=Re();function kD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ED=typeof Object.is=="function"?Object.is:kD,wD=ws.useState,_D=ws.useEffect,SD=ws.useLayoutEffect,CD=ws.useDebugValue;function TD(e,t){var n=t(),r=wD({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return SD(function(){o.value=n,o.getSnapshot=t,g0(o)&&i({inst:o})},[e,n,t]),_D(function(){return g0(o)&&i({inst:o}),e(function(){g0(o)&&i({inst:o})})},[e]),CD(n),n}function g0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ED(e,n)}catch{return!0}}function AD(e,t){return t()}var ND=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?AD:TD;HE.useSyncExternalStore=ws.useSyncExternalStore!==void 0?ws.useSyncExternalStore:ND});var Uc=Ct((rH,VE)=>{"use strict";VE.exports=qE()});var hS=Ct(pS=>{"use strict";var Bd=Re(),R8=Uc();function D8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var I8=typeof Object.is=="function"?Object.is:D8,L8=R8.useSyncExternalStore,P8=Bd.useRef,B8=Bd.useEffect,F8=Bd.useMemo,z8=Bd.useDebugValue;pS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=P8(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=F8(function(){function a(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,I8(c,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(c=p,h):(c=p,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,n,r,o]);var l=L8(e,i[0],i[1]);return B8(function(){s.hasValue=!0,s.value=l},[l]),z8(l),l}});var gS=Ct((yV,mS)=>{"use strict";mS.exports=hS()});var FT=Ct((xK,BT)=>{function ST(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&ST(n)}),e}var If=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function CT(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Bo(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var oB="
",xT=e=>!!e.scope,iB=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},ob=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=CT(t)}openNode(t){if(!xT(t))return;let n=iB(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){xT(t)&&(this.buffer+=oB)}value(){return this.buffer}span(t){this.buffer+=``}},vT=(e={})=>{let t={children:[]};return Object.assign(t,e),t},ib=class e{constructor(){this.rootNode=vT(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=vT({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},sb=class extends ib{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new ob(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Wa(e){return e?typeof e=="string"?e:e.source:null}function TT(e){return Ni("(?=",e,")")}function sB(e){return Ni("(?:",e,")*")}function lB(e){return Ni("(?:",e,")?")}function Ni(...e){return e.map(n=>Wa(n)).join("")}function aB(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ab(...e){return"("+(aB(e).capture?"":"?:")+e.map(r=>Wa(r)).join("|")+")"}function AT(e){return new RegExp(e.toString()+"|").exec("").length-1}function uB(e,t){let n=e&&e.exec(t);return n&&n.index===0}var cB=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ub(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,i=Wa(r),s="";for(;i.length>0;){let l=cB.exec(i);if(!l){s+=i;break}s+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+o):(s+=l[0],l[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}var dB=/\b\B/,NT="[a-zA-Z]\\w*",cb="[a-zA-Z_]\\w*",MT="\\b\\d+(\\.\\d+)?",OT="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",RT="\\b(0b[01]+)",fB="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",pB=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Ni(t,/.*\b/,e.binary,/\b.*/)),Bo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ja={begin:"\\\\[\\s\\S]",relevance:0},hB={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ja]},mB={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ja]},gB={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Pf=function(e,t,n={}){let r=Bo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=ab("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ni(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},bB=Pf("//","$"),yB=Pf("/\\*","\\*/"),xB=Pf("#","$"),vB={scope:"number",begin:MT,relevance:0},kB={scope:"number",begin:OT,relevance:0},EB={scope:"number",begin:RT,relevance:0},wB={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ja,{begin:/\[/,end:/\]/,relevance:0,contains:[ja]}]},_B={scope:"title",begin:NT,relevance:0},SB={scope:"title",begin:cb,relevance:0},CB={begin:"\\.\\s*"+cb,relevance:0},TB=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},Df=Object.freeze({__proto__:null,APOS_STRING_MODE:hB,BACKSLASH_ESCAPE:ja,BINARY_NUMBER_MODE:EB,BINARY_NUMBER_RE:RT,COMMENT:Pf,C_BLOCK_COMMENT_MODE:yB,C_LINE_COMMENT_MODE:bB,C_NUMBER_MODE:kB,C_NUMBER_RE:OT,END_SAME_AS_BEGIN:TB,HASH_COMMENT_MODE:xB,IDENT_RE:NT,MATCH_NOTHING_RE:dB,METHOD_GUARD:CB,NUMBER_MODE:vB,NUMBER_RE:MT,PHRASAL_WORDS_MODE:gB,QUOTE_STRING_MODE:mB,REGEXP_MODE:wB,RE_STARTERS_RE:fB,SHEBANG:pB,TITLE_MODE:_B,UNDERSCORE_IDENT_RE:cb,UNDERSCORE_TITLE_MODE:SB});function AB(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function NB(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function MB(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=AB,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function OB(e,t){Array.isArray(e.illegal)&&(e.illegal=ab(...e.illegal))}function RB(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function DB(e,t){e.relevance===void 0&&(e.relevance=1)}var IB=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ni(n.beforeMatch,TT(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},LB=["of","and","for","in","not","or","if","then","parent","list","value"],PB="keyword";function DT(e,t,n=PB){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(i){Object.assign(r,DT(e[i],t,i))}),r;function o(i,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){let a=l.split("|");r[a[0]]=[i,BB(a[0],a[1])]})}}function BB(e,t){return t?Number(t):FB(e)?0:1}function FB(e){return LB.includes(e.toLowerCase())}var kT={},Ai=e=>{},ET=(e,...t)=>{},Ks=(e,t)=>{kT[`${e}/${t}`]||(kT[`${e}/${t}`]=!0)},Lf=new Error;function IT(e,t,{key:n}){let r=0,o=e[n],i={},s={};for(let l=1;l<=t.length;l++)s[l+r]=o[l],i[l+r]=!0,r+=AT(t[l-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function zB(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ai("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Lf;if(typeof e.beginScope!="object"||e.beginScope===null)throw Ai("beginScope must be object"),Lf;IT(e,e.begin,{key:"beginScope"}),e.begin=ub(e.begin,{joinWith:""})}}function UB(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ai("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Lf;if(typeof e.endScope!="object"||e.endScope===null)throw Ai("endScope must be object"),Lf;IT(e,e.end,{key:"endScope"}),e.end=ub(e.end,{joinWith:""})}}function $B(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function HB(e){$B(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),zB(e),UB(e)}function qB(e){function t(s,l){return new RegExp(Wa(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,l]),this.matchAt+=AT(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let l=this.regexes.map(a=>a[1]);this.matcherRe=t(ub(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(l);if(!a)return null;let u=a.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return a.splice(0,u),Object.assign(a,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];let a=new n;return this.rules.slice(l).forEach(([u,c])=>a.addRule(u,c)),a.compile(),this.multiRegexes[l]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,a){this.rules.push([l,a]),a.type==="begin"&&this.count++}exec(l){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let u=a.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(s){let l=new r;return s.contains.forEach(a=>l.addRule(a.begin,{rule:a,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function i(s,l){let a=s;if(s.isCompiled)return a;[NB,RB,HB,IB].forEach(c=>c(s,l)),e.compilerExtensions.forEach(c=>c(s,l)),s.__beforeBegin=null,[MB,OB,DB].forEach(c=>c(s,l)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=DT(s.keywords,e.case_insensitive)),a.keywordPatternRe=t(u,!0),l&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(a.endRe=t(a.end)),a.terminatorEnd=Wa(a.end)||"",s.endsWithParent&&l.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(a.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return VB(c==="self"?s:c)})),s.contains.forEach(function(c){i(c,a)}),s.starts&&i(s.starts,l),a.matcher=o(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Bo(e.classNameAliases||{}),i(e)}function LT(e){return e?e.endsWithParent||LT(e.starts):!1}function VB(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Bo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:LT(e)?Bo(e,{starts:e.starts?Bo(e.starts):null}):Object.isFrozen(e)?Bo(e):e}var WB="11.11.1",lb=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},rb=CT,wT=Bo,_T=Symbol("nomatch"),jB=7,PT=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:sb};function a(S){return l.noHighlightRe.test(S)}function u(S){let M=S.className+" ";M+=S.parentNode?S.parentNode.className:"";let I=l.languageDetectRe.exec(M);if(I){let Y=_(I[1]);return Y||(ET(i.replace("{}",I[1])),ET("Falling back to no-highlight mode for this block.",S)),Y?I[1]:"no-highlight"}return M.split(/\s+/).find(Y=>a(Y)||_(Y))}function c(S,M,I){let Y="",ie="";typeof M=="object"?(Y=S,I=M.ignoreIllegals,ie=M.language):(Ks("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ks("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&&(I=!0);let pe={code:Y,language:ie};$("before:highlight",pe);let ge=pe.result?pe.result:d(pe.language,pe.code,I);return ge.code=pe.code,$("after:highlight",ge),ge}function d(S,M,I,Y){let ie=Object.create(null);function pe(P,K){return P.keywords[K]}function ge(){if(!ee.keywords){ot.addText(_e);return}let P=0;ee.keywordPatternRe.lastIndex=0;let K=ee.keywordPatternRe.exec(_e),le="";for(;K;){le+=_e.substring(P,K.index);let be=rn.case_insensitive?K[0].toLowerCase():K[0],ht=pe(ee,be);if(ht){let[hr,VM]=ht;if(ot.addText(le),le="",ie[be]=(ie[be]||0)+1,ie[be]<=jB&&(mu+=VM),hr.startsWith("_"))le+=K[0];else{let WM=rn.classNameAliases[hr]||hr;pt(K[0],WM)}}else le+=K[0];P=ee.keywordPatternRe.lastIndex,K=ee.keywordPatternRe.exec(_e)}le+=_e.substring(P),ot.addText(le)}function ft(){if(_e==="")return;let P=null;if(typeof ee.subLanguage=="string"){if(!t[ee.subLanguage]){ot.addText(_e);return}P=d(ee.subLanguage,_e,!0,hu[ee.subLanguage]),hu[ee.subLanguage]=P._top}else P=p(_e,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&(mu+=P.relevance),ot.__addSublanguage(P._emitter,P.language)}function Be(){ee.subLanguage!=null?ft():ge(),_e=""}function pt(P,K){P!==""&&(ot.startScope(K),ot.addText(P),ot.endScope())}function Yr(P,K){let le=1,be=K.length-1;for(;le<=be;){if(!P._emit[le]){le++;continue}let ht=rn.classNameAliases[P[le]]||P[le],hr=K[le];ht?pt(hr,ht):(_e=hr,ge(),_e=""),le++}}function fu(P,K){return P.scope&&typeof P.scope=="string"&&ot.openNode(rn.classNameAliases[P.scope]||P.scope),P.beginScope&&(P.beginScope._wrap?(pt(_e,rn.classNameAliases[P.beginScope._wrap]||P.beginScope._wrap),_e=""):P.beginScope._multi&&(Yr(P.beginScope,K),_e="")),ee=Object.create(P,{parent:{value:ee}}),ee}function ul(P,K,le){let be=uB(P.endRe,le);if(be){if(P["on:end"]){let ht=new If(P);P["on:end"](K,ht),ht.isMatchIgnored&&(be=!1)}if(be){for(;P.endsParent&&P.parent;)P=P.parent;return P}}if(P.endsWithParent)return ul(P.parent,K,le)}function Hp(P){return ee.matcher.regexIndex===0?(_e+=P[0],1):(Kp=!0,0)}function qp(P){let K=P[0],le=P.rule,be=new If(le),ht=[le.__beforeBegin,le["on:begin"]];for(let hr of ht)if(hr&&(hr(P,be),be.isMatchIgnored))return Hp(K);return le.skip?_e+=K:(le.excludeBegin&&(_e+=K),Be(),!le.returnBegin&&!le.excludeBegin&&(_e=K)),fu(le,P),le.returnBegin?0:K.length}function Vp(P){let K=P[0],le=M.substring(P.index),be=ul(ee,P,le);if(!be)return _T;let ht=ee;ee.endScope&&ee.endScope._wrap?(Be(),pt(K,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(Be(),Yr(ee.endScope,P)):ht.skip?_e+=K:(ht.returnEnd||ht.excludeEnd||(_e+=K),Be(),ht.excludeEnd&&(_e=K));do ee.scope&&ot.closeNode(),!ee.skip&&!ee.subLanguage&&(mu+=ee.relevance),ee=ee.parent;while(ee!==be.parent);return be.starts&&fu(be.starts,P),ht.returnEnd?0:K.length}function Wp(){let P=[];for(let K=ee;K!==rn;K=K.parent)K.scope&&P.unshift(K.scope);P.forEach(K=>ot.openNode(K))}let qi={};function pu(P,K){let le=K&&K[0];if(_e+=P,le==null)return Be(),0;if(qi.type==="begin"&&K.type==="end"&&qi.index===K.index&&le===""){if(_e+=M.slice(K.index,K.index+1),!o){let be=new Error(`0 width match regex (${S})`);throw be.languageName=S,be.badRule=qi.rule,be}return 1}if(qi=K,K.type==="begin")return qp(K);if(K.type==="illegal"&&!I){let be=new Error('Illegal lexeme "'+le+'" for mode "'+(ee.scope||"")+'"');throw be.mode=ee,be}else if(K.type==="end"){let be=Vp(K);if(be!==_T)return be}if(K.type==="illegal"&&le==="")return _e+=` -`,1;if(jp>1e5&&jp>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return _e+=le,le.length}let rn=_(S);if(!rn)throw Ai(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');let Ee=qB(rn),Jr="",ee=Y||Ee,hu={},ot=new l.__emitter(l);Wp();let _e="",mu=0,qo=0,jp=0,Kp=!1;try{if(rn.__emitTokens)rn.__emitTokens(M,ot);else{for(ee.matcher.considerAll();;){jp++,Kp?Kp=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=qo;let P=ee.matcher.exec(M);if(!P)break;let K=M.substring(qo,P.index),le=pu(K,P);qo=P.index+le}pu(M.substring(qo))}return ot.finalize(),Jr=ot.toHTML(),{language:S,value:Jr,relevance:mu,illegal:!1,_emitter:ot,_top:ee}}catch(P){if(P.message&&P.message.includes("Illegal"))return{language:S,value:rb(M),illegal:!0,relevance:0,_illegalBy:{message:P.message,index:qo,context:M.slice(qo-100,qo+100),mode:P.mode,resultSoFar:Jr},_emitter:ot};if(o)return{language:S,value:rb(M),illegal:!1,relevance:0,errorRaised:P,_emitter:ot,_top:ee};throw P}}function f(S){let M={value:rb(S),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return M._emitter.addText(S),M}function p(S,M){M=M||l.languages||Object.keys(t);let I=f(S),Y=M.filter(_).filter(T).map(Be=>d(Be,S,!1));Y.unshift(I);let ie=Y.sort((Be,pt)=>{if(Be.relevance!==pt.relevance)return pt.relevance-Be.relevance;if(Be.language&&pt.language){if(_(Be.language).supersetOf===pt.language)return 1;if(_(pt.language).supersetOf===Be.language)return-1}return 0}),[pe,ge]=ie,ft=pe;return ft.secondBest=ge,ft}function h(S,M,I){let Y=M&&n[M]||I;S.classList.add("hljs"),S.classList.add(`language-${Y}`)}function m(S){let M=null,I=u(S);if(a(I)||($("before:highlightElement",{el:S,language:I}),S.dataset.highlighted))return;if(S.children.length>0&&(l.ignoreUnescapedHTML,l.throwUnescapedHTML))throw new lb("One of your code blocks includes unescaped HTML.",S.innerHTML);M=S;let Y=M.textContent,ie=I?c(Y,{language:I,ignoreIllegals:!0}):p(Y);S.innerHTML=ie.value,S.dataset.highlighted="yes",h(S,I,ie.language),S.result={language:ie.language,re:ie.relevance,relevance:ie.relevance},ie.secondBest&&(S.secondBest={language:ie.secondBest.language,relevance:ie.secondBest.relevance}),$("after:highlightElement",{el:S,result:ie,text:Y})}function b(S){l=wT(l,S)}let g=()=>{v(),Ks("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){v(),Ks("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function v(){function S(){v()}if(document.readyState==="loading"){x||window.addEventListener("DOMContentLoaded",S,!1),x=!0;return}document.querySelectorAll(l.cssSelector).forEach(m)}function k(S,M){let I=null;try{I=M(e)}catch(Y){if(Ai("Language definition for '{}' could not be registered.".replace("{}",S)),o)Ai(Y);else throw Y;I=s}I.name||(I.name=S),t[S]=I,I.rawDefinition=M.bind(null,e),I.aliases&&A(I.aliases,{languageName:S})}function E(S){delete t[S];for(let M of Object.keys(n))n[M]===S&&delete n[M]}function w(){return Object.keys(t)}function _(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function A(S,{languageName:M}){typeof S=="string"&&(S=[S]),S.forEach(I=>{n[I.toLowerCase()]=M})}function T(S){let M=_(S);return M&&!M.disableAutodetect}function B(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=M=>{S["before:highlightBlock"](Object.assign({block:M.el},M))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=M=>{S["after:highlightBlock"](Object.assign({block:M.el},M))})}function G(S){B(S),r.push(S)}function te(S){let M=r.indexOf(S);M!==-1&&r.splice(M,1)}function $(S,M){let I=S;r.forEach(function(Y){Y[I]&&Y[I](M)})}function C(S){return Ks("10.7.0","highlightBlock will be removed entirely in v12.0"),Ks("10.7.0","Please use highlightElement now."),m(S)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:v,highlightElement:m,highlightBlock:C,configure:b,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:E,listLanguages:w,getLanguage:_,registerAliases:A,autoDetection:T,inherit:wT,addPlugin:G,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=WB,e.regex={concat:Ni,lookahead:TT,either:ab,optional:lB,anyNumberOfTimes:sB};for(let S in Df)typeof Df[S]=="object"&&ST(Df[S]);return Object.assign(e,Df),e},Gs=PT({});Gs.newInstance=()=>PT({});BT.exports=Gs;Gs.HighlightJS=Gs;Gs.default=Gs});var iN=Ct((xX,oN)=>{var Ey=!0,nN=!1,rN=!1;oN.exports=function(e,t){t&&(Ey=!t.enabled,nN=!!t.label,rN=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function Lz(e,t){return $z(e[t])&&Hz(e[t-1])&&qz(e[t-2])&&Vz(e[t])}function Pz(e,t){if(e.children.unshift(Bz(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),nN)if(rN){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(Uz(e.content,n,t))}else e.children.unshift(Fz(t)),e.children.push(zz(t))}function Bz(e,t){var n=new t("html_inline","",0),r=Ey?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function Fz(e){var t=new e("html_inline","",0);return t.content="",t}function Uz(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function $z(e){return e.type==="inline"}function Hz(e){return e.type==="paragraph_open"}function qz(e){return e.type==="list_item_open"}function Vz(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var HM=H(AE());var An=H(Re());var ii=H(Re()),p0;function NE(){return p0||(p0=acquireVsCodeApi()),p0}function ME(){let e=(0,ii.useRef)(NE()),t=(0,ii.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,ii.useCallback)(r=>{let o=i=>{r(i.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,ii.useEffect)(()=>{e.current=NE()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var jt=H(Re());var OE=document.createElement("style");OE.textContent=`.button_Button { +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ah(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}var VR=typeof WeakMap=="function"?WeakMap:Map;function Qk(e,t,n){n=xr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xc||(xc=!0,xm=r)},n}function eE(e,t,n){n=xr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(co===null?co=new Set([this]):co.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function dv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VR;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=rD.bind(null,e,t,n),t.then(e,e))}function fv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function pv(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=xr(-1,1),t.tag=2,uo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var qR=_r.ReactCurrentOwner,Bt=!1;function At(e,t,n,r){t.child=e===null?Nk(t,null,n,r):ms(t,e.child,n,r)}function hv(e,t,n,r,o){n=n.render;var i=t.ref;return cs(t,o),r=Zm(e,t,n,r,i,o),n=Xm(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,wr(e,t,o)):(Me&&n&&zm(t),t.flags|=1,At(e,t,r,o),t.child)}function mv(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!a0(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,tE(e,t,i,r,o)):(e=Xu(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Vl,n(s,r)&&e.ref===t.ref)return wr(e,t,o)}return t.flags|=1,e=po(i,r),e.ref=t.ref,e.return=t,t.child=e}function tE(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Vl(i,r)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Bt=!0);else return t.lanes=e.lanes,wr(e,t,o)}return cm(e,t,n,r,o)}function nE(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(is,Kt),Kt|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(is,Kt),Kt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ce(is,Kt),Kt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ce(is,Kt),Kt|=r;return At(e,t,o,n),t.child}function rE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cm(e,t,n,r,o){var i=zt(n)?Xo:xt.current;return i=ps(t,i),cs(t,o),n=Zm(e,t,n,r,i,o),r=Xm(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,wr(e,t,o)):(Me&&r&&zm(t),t.flags|=1,At(e,t,n,o),t.child)}function gv(e,t,n,r,o){if(zt(n)){var i=!0;uc(t)}else i=!1;if(cs(t,o),t.stateNode===null)Yu(e,t),Xk(t,n,r),um(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=cn(u):(u=zt(n)?Xo:xt.current,u=ps(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&cv(t,s,r,u),eo=!1;var f=t.memoizedState;s.state=f,hc(t,r,s,o),a=t.memoizedState,l!==r||f!==a||Ft.current||eo?(typeof c=="function"&&(am(t,n,c,r),a=t.memoizedState),(l=eo||uv(t,n,l,r,f,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ok(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:On(t.type,l),s.props=u,d=t.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=cn(a):(a=zt(n)?Xo:xt.current,a=ps(t,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||f!==a)&&cv(t,s,r,a),eo=!1,f=t.memoizedState,s.state=f,hc(t,r,s,o);var h=t.memoizedState;l!==d||f!==h||Ft.current||eo?(typeof p=="function"&&(am(t,n,p,r),h=t.memoizedState),(u=eo||uv(t,n,u,r,f,h,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return dm(e,t,n,r,i,o)}function dm(e,t,n,r,o,i){rE(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&tv(t,n,!1),wr(e,t,i);r=t.stateNode,qR.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ms(t,e.child,null,i),t.child=ms(t,null,l,i)):At(e,t,l,i),t.memoizedState=r.state,o&&tv(t,n,!0),t.child}function oE(e){var t=e.stateNode;t.pendingContext?ev(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ev(e,t.context,!1),Km(e,t.containerInfo)}function bv(e,t,n,r,o){return hs(),$m(o),t.flags|=256,At(e,t,n,r),t.child}var fm={dehydrated:null,treeContext:null,retryLane:0};function pm(e){return{baseLanes:e,cachePool:null,transitions:null}}function iE(e,t,n){var r=t.pendingProps,o=De.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ce(De,o&1),e===null)return sm(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Dc(s,r,0,null),e=Zo(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=pm(n),t.memoizedState=fm,e):t0(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return WR(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=po(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=po(l,i):(i=Zo(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?pm(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=fm,r}return i=e.child,e=i.sibling,r=po(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function t0(e,t){return t=Dc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Uu(e,t,n,r){return r!==null&&$m(r),ms(t,e.child,null,n),e=t0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WR(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Ah(Error(R(422))),Uu(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Dc({mode:"visible",children:r.children},o,0,null),i=Zo(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&ms(t,e.child,null,s),t.child.memoizedState=pm(s),t.memoizedState=fm,i);if((t.mode&1)===0)return Uu(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(R(419)),r=Ah(i,r,void 0),Uu(e,t,s,r)}if(l=(s&e.childLanes)!==0,Bt||l){if(r=Xe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Er(e,o),Ln(r,e,o,-1))}return l0(),r=Ah(Error(R(421))),Uu(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=oD.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Gt=ao(o.nextSibling),Yt=t,Me=!0,Dn=null,e!==null&&(sn[ln++]=br,sn[ln++]=yr,sn[ln++]=Qo,br=e.id,yr=e.overflow,Qo=t),t=t0(t,r.children),t.flags|=4096,t)}function yv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),lm(e.return,t,n)}function Nh(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function sE(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(At(e,t,r.children,n),r=De.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yv(e,n,t);else if(e.tag===19)yv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ce(De,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&mc(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Nh(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&mc(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Nh(t,!0,n,null,i);break;case"together":Nh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yu(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ti|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=po(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=po(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jR(e,t,n){switch(t.tag){case 3:oE(t),hs();break;case 5:Rk(t);break;case 1:zt(t.type)&&uc(t);break;case 4:Km(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ce(fc,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(De,De.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?iE(e,t,n):(Ce(De,De.current&1),e=wr(e,t,n),e!==null?e.sibling:null);Ce(De,De.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return sE(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ce(De,De.current),r)break;return null;case 22:case 23:return t.lanes=0,nE(e,t,n)}return wr(e,t,n)}var lE,hm,aE,uE;lE=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hm=function(){};aE=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Yo(Gn.current);var i=null;switch(n){case"input":o=Bh(e,o),r=Bh(e,r),i=[];break;case"select":o=Le({},o,{value:void 0}),r=Le({},r,{value:void 0}),i=[];break;case"textarea":o=Uh(e,o),r=Uh(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=lc)}Hh(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Pl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o?.[u],r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Pl.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Te("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};uE=function(e,t,n,r){n!==r&&(t.flags|=4)};function vl(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function KR(e,t,n){var r=t.pendingProps;switch(Um(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return zt(t.type)&&ac(),bt(t),null;case 3:return r=t.stateNode,gs(),Ae(Ft),Ae(xt),Ym(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dn!==null&&(Em(Dn),Dn=null))),hm(e,t),bt(t),null;case 5:Gm(t);var o=Yo(Gl.current);if(n=t.type,e!==null&&t.stateNode!=null)aE(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return bt(t),null}if(e=Yo(Gn.current),Fu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[jn]=t,r[jl]=i,e=(t.mode&1)!==0,n){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[jn]=t,e[jl]=r,lE(e,t,!1,!1),t.stateNode=e;e:{switch(s=Vh(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;oys&&(t.flags|=128,r=!0,vl(i,!1),t.lanes=4194304)}else{if(!r)if(e=mc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Me)return bt(t),null}else 2*Ve()-i.renderingStartTime>ys&&n!==1073741824&&(t.flags|=128,r=!0,vl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ve(),t.sibling=null,n=De.current,Ce(De,r?n&1|2:n&1),t):(bt(t),null);case 22:case 23:return s0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Kt&1073741824)!==0&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function GR(e,t){switch(Um(t),t.tag){case 1:return zt(t.type)&&ac(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gs(),Ae(Ft),Ae(xt),Ym(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Gm(t),null;case 13:if(Ae(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(De),null;case 4:return gs(),null;case 10:return qm(t.type._context),null;case 22:case 23:return s0(),null;case 24:return null;default:return null}}var $u=!1,yt=!1,YR=typeof WeakSet=="function"?WeakSet:Set,F=null;function rs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function mm(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var xv=!1;function JR(e,t){if(Qh=oc,e=hk(),Fm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(em={focusedElem:e,selectionRange:n},oc=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,b=h.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:On(t.type,g),b);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(v){Fe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return h=xv,xv=!1,h}function Dl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&mm(t,n,i)}o=o.next}while(o!==r)}}function Oc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function gm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function cE(e){var t=e.alternate;t!==null&&(e.alternate=null,cE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[jl],delete t[rm],delete t[RR],delete t[DR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dE(e){return e.tag===5||e.tag===3||e.tag===4}function vv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=lc));else if(r!==4&&(e=e.child,e!==null))for(bm(e,t,n),e=e.sibling;e!==null;)bm(e,t,n),e=e.sibling}function ym(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ym(e,t,n),e=e.sibling;e!==null;)ym(e,t,n),e=e.sibling}var it=null,Rn=!1;function Xr(e,t,n){for(n=n.child;n!==null;)fE(e,t,n),n=n.sibling}function fE(e,t,n){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(wc,n)}catch{}switch(n.tag){case 5:yt||rs(n,t);case 6:var r=it,o=Rn;it=null,Xr(e,t,n),it=r,Rn=o,it!==null&&(Rn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(Rn?(e=it,n=n.stateNode,e.nodeType===8?Eh(e.parentNode,n):e.nodeType===1&&Eh(e,n),$l(e)):Eh(it,n.stateNode));break;case 4:r=it,o=Rn,it=n.stateNode.containerInfo,Rn=!0,Xr(e,t,n),it=r,Rn=o;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&mm(n,t,s),o=o.next}while(o!==r)}Xr(e,t,n);break;case 1:if(!yt&&(rs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Fe(n,t,l)}Xr(e,t,n);break;case 21:Xr(e,t,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Xr(e,t,n),yt=r):Xr(e,t,n);break;default:Xr(e,t,n)}}function kv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YR),t.forEach(function(r){var o=iD.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*XR(r/1960))-r,10e?16:e,oo===null)var r=!1;else{if(e=oo,oo=null,vc=0,(fe&6)!==0)throw Error(R(331));var o=fe;for(fe|=4,F=e.current;F!==null;){var i=F,s=i.child;if((F.flags&16)!==0){var l=i.deletions;if(l!==null){for(var a=0;aVe()-o0?Jo(e,0):r0|=n),Ut(e,t)}function vE(e,t){t===0&&((e.mode&1)===0?t=1:(t=Au,Au<<=1,(Au&130023424)===0&&(Au=4194304)));var n=Nt();e=Er(e,t),e!==null&&(Ql(e,t,n),Ut(e,n))}function oD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vE(e,n)}function iD(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),vE(e,n)}var kE;kE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Bt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Bt=!1,jR(e,t,n);Bt=(e.flags&131072)!==0}else Bt=!1,Me&&(t.flags&1048576)!==0&&Sk(t,dc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yu(e,t),e=t.pendingProps;var o=ps(t,xt.current);cs(t,n),o=Zm(null,t,r,e,o,n);var i=Xm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jm(t),o.updater=Mc,t.stateNode=o,o._reactInternals=t,um(t,r,e,n),t=dm(null,t,r,!0,i,n)):(t.tag=0,Me&&i&&zm(t),At(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=lD(r),e=On(r,e),o){case 0:t=cm(null,t,r,e,n);break e;case 1:t=gv(null,t,r,e,n);break e;case 11:t=hv(null,t,r,e,n);break e;case 14:t=mv(null,t,r,On(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),cm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),gv(e,t,r,o,n);case 3:e:{if(oE(t),e===null)throw Error(R(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ok(e,t),hc(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=bs(Error(R(423)),t),t=bv(e,t,r,n,o);break e}else if(r!==o){o=bs(Error(R(424)),t),t=bv(e,t,r,n,o);break e}else for(Gt=ao(t.stateNode.containerInfo.firstChild),Yt=t,Me=!0,Dn=null,n=Nk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hs(),r===o){t=wr(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return Rk(t),e===null&&sm(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,tm(r,o)?s=null:i!==null&&tm(r,i)&&(t.flags|=32),rE(e,t),At(e,t,s,n),t.child;case 6:return e===null&&sm(t),null;case 13:return iE(e,t,n);case 4:return Km(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ms(t,null,r,n):At(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),hv(e,t,r,o,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ce(fc,r._currentValue),r._currentValue=s,i!==null)if(Pn(i.value,s)){if(i.children===o.children&&!Ft.current){t=wr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=xr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),lm(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(R(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),lm(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}At(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,cs(t,n),o=cn(o),r=r(o),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,o=On(r,t.pendingProps),o=On(r.type,o),mv(e,t,r,o,n);case 15:return tE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:On(r,o),Yu(e,t),t.tag=1,zt(r)?(e=!0,uc(t)):e=!1,cs(t,n),Xk(t,r,o),um(t,r,o,n),dm(null,t,r,!0,e,n);case 19:return sE(e,t,n);case 22:return nE(e,t,n)}throw Error(R(156,t.tag))};function EE(e,t){return Yv(e,t)}function sD(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,n,r){return new sD(e,t,n,r)}function a0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lD(e){if(typeof e=="function")return a0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Tm)return 11;if(e===Am)return 14}return 2}function po(e,t){var n=e.alternate;return n===null?(n=an(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")a0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gi:return Zo(n.children,o,i,t);case Cm:s=8,o|=8;break;case Dh:return e=an(12,n,t,o|2),e.elementType=Dh,e.lanes=i,e;case Ih:return e=an(13,n,t,o),e.elementType=Ih,e.lanes=i,e;case Lh:return e=an(19,n,t,o),e.elementType=Lh,e.lanes=i,e;case Rv:return Dc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Mv:s=10;break e;case Ov:s=9;break e;case Tm:s=11;break e;case Am:s=14;break e;case Qr:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=an(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zo(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Dc(e,t,n,r){return e=an(22,e,r,t),e.elementType=Rv,e.lanes=n,e.stateNode={isHidden:!1},e}function Mh(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function Oh(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function aD(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hh(0),this.expirationTimes=hh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hh(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function u0(e,t,n,r,o,i,s,l,a){return e=new aD(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=an(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jm(i),e}function uD(e,t,n){var r=3{"use strict";function TE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TE)}catch{}}TE(),AE.exports=CE()});var ME=Ct(p0=>{"use strict";var NE=ks();p0.createRoot=NE.createRoot,p0.hydrateRoot=NE.hydrateRoot;var P$});var LE=Ct(zc=>{"use strict";var hD=Re(),mD=Symbol.for("react.element"),gD=Symbol.for("react.fragment"),bD=Object.prototype.hasOwnProperty,yD=hD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xD={key:!0,ref:!0,__self:!0,__source:!0};function IE(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)bD.call(t,r)&&!xD.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:mD,type:e,key:i,ref:s,props:o,_owner:yD.current}}zc.Fragment=gD;zc.jsx=IE;zc.jsxs=IE});var de=Ct(($$,PE)=>{"use strict";PE.exports=LE()});var WE=Ct(qE=>{"use strict";var ws=Re();function vD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kD=typeof Object.is=="function"?Object.is:vD,ED=ws.useState,wD=ws.useEffect,_D=ws.useLayoutEffect,SD=ws.useDebugValue;function CD(e,t){var n=t(),r=ED({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return _D(function(){o.value=n,o.getSnapshot=t,b0(o)&&i({inst:o})},[e,n,t]),wD(function(){return b0(o)&&i({inst:o}),e(function(){b0(o)&&i({inst:o})})},[e]),SD(n),n}function b0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kD(e,n)}catch{return!0}}function TD(e,t){return t()}var AD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?TD:CD;qE.useSyncExternalStore=ws.useSyncExternalStore!==void 0?ws.useSyncExternalStore:AD});var Uc=Ct((iH,jE)=>{"use strict";jE.exports=WE()});var pS=Ct(fS=>{"use strict";var Fd=Re(),I8=Uc();function L8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var P8=typeof Object.is=="function"?Object.is:L8,B8=I8.useSyncExternalStore,F8=Fd.useRef,z8=Fd.useEffect,U8=Fd.useMemo,$8=Fd.useDebugValue;fS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=F8(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=U8(function(){function a(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,P8(c,p))return h;var g=r(p);return o!==void 0&&o(h,g)?(c=p,h):(c=p,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,n,r,o]);var l=B8(e,i[0],i[1]);return z8(function(){s.hasValue=!0,s.value=l},[l]),$8(l),l}});var mS=Ct((vq,hS)=>{"use strict";hS.exports=pS()});var BT=Ct((kK,PT)=>{function _T(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&_T(n)}),e}var Lf=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function ST(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Bo(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var sB="",yT=e=>!!e.scope,lB=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},sb=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=ST(t)}openNode(t){if(!yT(t))return;let n=lB(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){yT(t)&&(this.buffer+=sB)}value(){return this.buffer}span(t){this.buffer+=``}},xT=(e={})=>{let t={children:[]};return Object.assign(t,e),t},lb=class e{constructor(){this.rootNode=xT(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=xT({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},ab=class extends lb{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new sb(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Wa(e){return e?typeof e=="string"?e:e.source:null}function CT(e){return Ni("(?=",e,")")}function aB(e){return Ni("(?:",e,")*")}function uB(e){return Ni("(?:",e,")?")}function Ni(...e){return e.map(n=>Wa(n)).join("")}function cB(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function cb(...e){return"("+(cB(e).capture?"":"?:")+e.map(r=>Wa(r)).join("|")+")"}function TT(e){return new RegExp(e.toString()+"|").exec("").length-1}function dB(e,t){let n=e&&e.exec(t);return n&&n.index===0}var fB=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function db(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,i=Wa(r),s="";for(;i.length>0;){let l=fB.exec(i);if(!l){s+=i;break}s+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+o):(s+=l[0],l[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}var pB=/\b\B/,AT="[a-zA-Z]\\w*",fb="[a-zA-Z_]\\w*",NT="\\b\\d+(\\.\\d+)?",MT="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",OT="\\b(0b[01]+)",hB="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",mB=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Ni(t,/.*\b/,e.binary,/\b.*/)),Bo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ja={begin:"\\\\[\\s\\S]",relevance:0},gB={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ja]},bB={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ja]},yB={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bf=function(e,t,n={}){let r=Bo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=cb("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ni(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},xB=Bf("//","$"),vB=Bf("/\\*","\\*/"),kB=Bf("#","$"),EB={scope:"number",begin:NT,relevance:0},wB={scope:"number",begin:MT,relevance:0},_B={scope:"number",begin:OT,relevance:0},SB={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ja,{begin:/\[/,end:/\]/,relevance:0,contains:[ja]}]},CB={scope:"title",begin:AT,relevance:0},TB={scope:"title",begin:fb,relevance:0},AB={begin:"\\.\\s*"+fb,relevance:0},NB=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},If=Object.freeze({__proto__:null,APOS_STRING_MODE:gB,BACKSLASH_ESCAPE:ja,BINARY_NUMBER_MODE:_B,BINARY_NUMBER_RE:OT,COMMENT:Bf,C_BLOCK_COMMENT_MODE:vB,C_LINE_COMMENT_MODE:xB,C_NUMBER_MODE:wB,C_NUMBER_RE:MT,END_SAME_AS_BEGIN:NB,HASH_COMMENT_MODE:kB,IDENT_RE:AT,MATCH_NOTHING_RE:pB,METHOD_GUARD:AB,NUMBER_MODE:EB,NUMBER_RE:NT,PHRASAL_WORDS_MODE:yB,QUOTE_STRING_MODE:bB,REGEXP_MODE:SB,RE_STARTERS_RE:hB,SHEBANG:mB,TITLE_MODE:CB,UNDERSCORE_IDENT_RE:fb,UNDERSCORE_TITLE_MODE:TB});function MB(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function OB(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function RB(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=MB,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function DB(e,t){Array.isArray(e.illegal)&&(e.illegal=cb(...e.illegal))}function IB(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function LB(e,t){e.relevance===void 0&&(e.relevance=1)}var PB=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ni(n.beforeMatch,CT(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},BB=["of","and","for","in","not","or","if","then","parent","list","value"],FB="keyword";function RT(e,t,n=FB){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(i){Object.assign(r,RT(e[i],t,i))}),r;function o(i,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){let a=l.split("|");r[a[0]]=[i,zB(a[0],a[1])]})}}function zB(e,t){return t?Number(t):UB(e)?0:1}function UB(e){return BB.includes(e.toLowerCase())}var vT={},Ai=e=>{},kT=(e,...t)=>{},Ks=(e,t)=>{vT[`${e}/${t}`]||(vT[`${e}/${t}`]=!0)},Pf=new Error;function DT(e,t,{key:n}){let r=0,o=e[n],i={},s={};for(let l=1;l<=t.length;l++)s[l+r]=o[l],i[l+r]=!0,r+=TT(t[l-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function $B(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ai("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Pf;if(typeof e.beginScope!="object"||e.beginScope===null)throw Ai("beginScope must be object"),Pf;DT(e,e.begin,{key:"beginScope"}),e.begin=db(e.begin,{joinWith:""})}}function HB(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ai("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Pf;if(typeof e.endScope!="object"||e.endScope===null)throw Ai("endScope must be object"),Pf;DT(e,e.end,{key:"endScope"}),e.end=db(e.end,{joinWith:""})}}function VB(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function qB(e){VB(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),$B(e),HB(e)}function WB(e){function t(s,l){return new RegExp(Wa(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,l]),this.matchAt+=TT(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let l=this.regexes.map(a=>a[1]);this.matcherRe=t(db(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(l);if(!a)return null;let u=a.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return a.splice(0,u),Object.assign(a,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];let a=new n;return this.rules.slice(l).forEach(([u,c])=>a.addRule(u,c)),a.compile(),this.multiRegexes[l]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,a){this.rules.push([l,a]),a.type==="begin"&&this.count++}exec(l){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let u=a.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(s){let l=new r;return s.contains.forEach(a=>l.addRule(a.begin,{rule:a,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function i(s,l){let a=s;if(s.isCompiled)return a;[OB,IB,qB,PB].forEach(c=>c(s,l)),e.compilerExtensions.forEach(c=>c(s,l)),s.__beforeBegin=null,[RB,DB,LB].forEach(c=>c(s,l)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=RT(s.keywords,e.case_insensitive)),a.keywordPatternRe=t(u,!0),l&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(a.endRe=t(a.end)),a.terminatorEnd=Wa(a.end)||"",s.endsWithParent&&l.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(a.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return jB(c==="self"?s:c)})),s.contains.forEach(function(c){i(c,a)}),s.starts&&i(s.starts,l),a.matcher=o(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Bo(e.classNameAliases||{}),i(e)}function IT(e){return e?e.endsWithParent||IT(e.starts):!1}function jB(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Bo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:IT(e)?Bo(e,{starts:e.starts?Bo(e.starts):null}):Object.isFrozen(e)?Bo(e):e}var KB="11.11.1",ub=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},ib=ST,ET=Bo,wT=Symbol("nomatch"),GB=7,LT=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:ab};function a(S){return l.noHighlightRe.test(S)}function u(S){let M=S.className+" ";M+=S.parentNode?S.parentNode.className:"";let I=l.languageDetectRe.exec(M);if(I){let Y=_(I[1]);return Y||(kT(i.replace("{}",I[1])),kT("Falling back to no-highlight mode for this block.",S)),Y?I[1]:"no-highlight"}return M.split(/\s+/).find(Y=>a(Y)||_(Y))}function c(S,M,I){let Y="",ie="";typeof M=="object"?(Y=S,I=M.ignoreIllegals,ie=M.language):(Ks("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ks("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&&(I=!0);let pe={code:Y,language:ie};$("before:highlight",pe);let ge=pe.result?pe.result:d(pe.language,pe.code,I);return ge.code=pe.code,$("after:highlight",ge),ge}function d(S,M,I,Y){let ie=Object.create(null);function pe(P,K){return P.keywords[K]}function ge(){if(!ee.keywords){ot.addText(_e);return}let P=0;ee.keywordPatternRe.lastIndex=0;let K=ee.keywordPatternRe.exec(_e),le="";for(;K;){le+=_e.substring(P,K.index);let be=rn.case_insensitive?K[0].toLowerCase():K[0],ht=pe(ee,be);if(ht){let[hr,VM]=ht;if(ot.addText(le),le="",ie[be]=(ie[be]||0)+1,ie[be]<=GB&&(mu+=VM),hr.startsWith("_"))le+=K[0];else{let qM=rn.classNameAliases[hr]||hr;pt(K[0],qM)}}else le+=K[0];P=ee.keywordPatternRe.lastIndex,K=ee.keywordPatternRe.exec(_e)}le+=_e.substring(P),ot.addText(le)}function ft(){if(_e==="")return;let P=null;if(typeof ee.subLanguage=="string"){if(!t[ee.subLanguage]){ot.addText(_e);return}P=d(ee.subLanguage,_e,!0,hu[ee.subLanguage]),hu[ee.subLanguage]=P._top}else P=p(_e,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&(mu+=P.relevance),ot.__addSublanguage(P._emitter,P.language)}function Be(){ee.subLanguage!=null?ft():ge(),_e=""}function pt(P,K){P!==""&&(ot.startScope(K),ot.addText(P),ot.endScope())}function Yr(P,K){let le=1,be=K.length-1;for(;le<=be;){if(!P._emit[le]){le++;continue}let ht=rn.classNameAliases[P[le]]||P[le],hr=K[le];ht?pt(hr,ht):(_e=hr,ge(),_e=""),le++}}function fu(P,K){return P.scope&&typeof P.scope=="string"&&ot.openNode(rn.classNameAliases[P.scope]||P.scope),P.beginScope&&(P.beginScope._wrap?(pt(_e,rn.classNameAliases[P.beginScope._wrap]||P.beginScope._wrap),_e=""):P.beginScope._multi&&(Yr(P.beginScope,K),_e="")),ee=Object.create(P,{parent:{value:ee}}),ee}function ul(P,K,le){let be=dB(P.endRe,le);if(be){if(P["on:end"]){let ht=new Lf(P);P["on:end"](K,ht),ht.isMatchIgnored&&(be=!1)}if(be){for(;P.endsParent&&P.parent;)P=P.parent;return P}}if(P.endsWithParent)return ul(P.parent,K,le)}function Vp(P){return ee.matcher.regexIndex===0?(_e+=P[0],1):(Gp=!0,0)}function qp(P){let K=P[0],le=P.rule,be=new Lf(le),ht=[le.__beforeBegin,le["on:begin"]];for(let hr of ht)if(hr&&(hr(P,be),be.isMatchIgnored))return Vp(K);return le.skip?_e+=K:(le.excludeBegin&&(_e+=K),Be(),!le.returnBegin&&!le.excludeBegin&&(_e=K)),fu(le,P),le.returnBegin?0:K.length}function Wp(P){let K=P[0],le=M.substring(P.index),be=ul(ee,P,le);if(!be)return wT;let ht=ee;ee.endScope&&ee.endScope._wrap?(Be(),pt(K,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(Be(),Yr(ee.endScope,P)):ht.skip?_e+=K:(ht.returnEnd||ht.excludeEnd||(_e+=K),Be(),ht.excludeEnd&&(_e=K));do ee.scope&&ot.closeNode(),!ee.skip&&!ee.subLanguage&&(mu+=ee.relevance),ee=ee.parent;while(ee!==be.parent);return be.starts&&fu(be.starts,P),ht.returnEnd?0:K.length}function jp(){let P=[];for(let K=ee;K!==rn;K=K.parent)K.scope&&P.unshift(K.scope);P.forEach(K=>ot.openNode(K))}let Vi={};function pu(P,K){let le=K&&K[0];if(_e+=P,le==null)return Be(),0;if(Vi.type==="begin"&&K.type==="end"&&Vi.index===K.index&&le===""){if(_e+=M.slice(K.index,K.index+1),!o){let be=new Error(`0 width match regex (${S})`);throw be.languageName=S,be.badRule=Vi.rule,be}return 1}if(Vi=K,K.type==="begin")return qp(K);if(K.type==="illegal"&&!I){let be=new Error('Illegal lexeme "'+le+'" for mode "'+(ee.scope||"")+'"');throw be.mode=ee,be}else if(K.type==="end"){let be=Wp(K);if(be!==wT)return be}if(K.type==="illegal"&&le==="")return _e+=` +`,1;if(Kp>1e5&&Kp>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return _e+=le,le.length}let rn=_(S);if(!rn)throw Ai(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');let Ee=WB(rn),Jr="",ee=Y||Ee,hu={},ot=new l.__emitter(l);jp();let _e="",mu=0,Vo=0,Kp=0,Gp=!1;try{if(rn.__emitTokens)rn.__emitTokens(M,ot);else{for(ee.matcher.considerAll();;){Kp++,Gp?Gp=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=Vo;let P=ee.matcher.exec(M);if(!P)break;let K=M.substring(Vo,P.index),le=pu(K,P);Vo=P.index+le}pu(M.substring(Vo))}return ot.finalize(),Jr=ot.toHTML(),{language:S,value:Jr,relevance:mu,illegal:!1,_emitter:ot,_top:ee}}catch(P){if(P.message&&P.message.includes("Illegal"))return{language:S,value:ib(M),illegal:!0,relevance:0,_illegalBy:{message:P.message,index:Vo,context:M.slice(Vo-100,Vo+100),mode:P.mode,resultSoFar:Jr},_emitter:ot};if(o)return{language:S,value:ib(M),illegal:!1,relevance:0,errorRaised:P,_emitter:ot,_top:ee};throw P}}function f(S){let M={value:ib(S),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return M._emitter.addText(S),M}function p(S,M){M=M||l.languages||Object.keys(t);let I=f(S),Y=M.filter(_).filter(T).map(Be=>d(Be,S,!1));Y.unshift(I);let ie=Y.sort((Be,pt)=>{if(Be.relevance!==pt.relevance)return pt.relevance-Be.relevance;if(Be.language&&pt.language){if(_(Be.language).supersetOf===pt.language)return 1;if(_(pt.language).supersetOf===Be.language)return-1}return 0}),[pe,ge]=ie,ft=pe;return ft.secondBest=ge,ft}function h(S,M,I){let Y=M&&n[M]||I;S.classList.add("hljs"),S.classList.add(`language-${Y}`)}function g(S){let M=null,I=u(S);if(a(I)||($("before:highlightElement",{el:S,language:I}),S.dataset.highlighted))return;if(S.children.length>0&&(l.ignoreUnescapedHTML,l.throwUnescapedHTML))throw new ub("One of your code blocks includes unescaped HTML.",S.innerHTML);M=S;let Y=M.textContent,ie=I?c(Y,{language:I,ignoreIllegals:!0}):p(Y);S.innerHTML=ie.value,S.dataset.highlighted="yes",h(S,I,ie.language),S.result={language:ie.language,re:ie.relevance,relevance:ie.relevance},ie.secondBest&&(S.secondBest={language:ie.secondBest.language,relevance:ie.secondBest.relevance}),$("after:highlightElement",{el:S,result:ie,text:Y})}function b(S){l=ET(l,S)}let m=()=>{v(),Ks("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){v(),Ks("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function v(){function S(){v()}if(document.readyState==="loading"){x||window.addEventListener("DOMContentLoaded",S,!1),x=!0;return}document.querySelectorAll(l.cssSelector).forEach(g)}function k(S,M){let I=null;try{I=M(e)}catch(Y){if(Ai("Language definition for '{}' could not be registered.".replace("{}",S)),o)Ai(Y);else throw Y;I=s}I.name||(I.name=S),t[S]=I,I.rawDefinition=M.bind(null,e),I.aliases&&A(I.aliases,{languageName:S})}function E(S){delete t[S];for(let M of Object.keys(n))n[M]===S&&delete n[M]}function w(){return Object.keys(t)}function _(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function A(S,{languageName:M}){typeof S=="string"&&(S=[S]),S.forEach(I=>{n[I.toLowerCase()]=M})}function T(S){let M=_(S);return M&&!M.disableAutodetect}function B(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=M=>{S["before:highlightBlock"](Object.assign({block:M.el},M))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=M=>{S["after:highlightBlock"](Object.assign({block:M.el},M))})}function G(S){B(S),r.push(S)}function te(S){let M=r.indexOf(S);M!==-1&&r.splice(M,1)}function $(S,M){let I=S;r.forEach(function(Y){Y[I]&&Y[I](M)})}function C(S){return Ks("10.7.0","highlightBlock will be removed entirely in v12.0"),Ks("10.7.0","Please use highlightElement now."),g(S)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:v,highlightElement:g,highlightBlock:C,configure:b,initHighlighting:m,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:E,listLanguages:w,getLanguage:_,registerAliases:A,autoDetection:T,inherit:ET,addPlugin:G,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=KB,e.regex={concat:Ni,lookahead:CT,either:cb,optional:uB,anyNumberOfTimes:aB};for(let S in If)typeof If[S]=="object"&&_T(If[S]);return Object.assign(e,If),e},Gs=LT({});Gs.newInstance=()=>LT({});PT.exports=Gs;Gs.HighlightJS=Gs;Gs.default=Gs});var oN=Ct((kX,rN)=>{var _y=!0,tN=!1,nN=!1;rN.exports=function(e,t){t&&(_y=!t.enabled,tN=!!t.label,nN=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function Bz(e,t){return Vz(e[t])&&qz(e[t-1])&&Wz(e[t-2])&&jz(e[t])}function Fz(e,t){if(e.children.unshift(zz(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),tN)if(nN){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(Hz(e.content,n,t))}else e.children.unshift(Uz(t)),e.children.push($z(t))}function zz(e,t){var n=new t("html_inline","",0),r=_y?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function Uz(e){var t=new e("html_inline","",0);return t.content="",t}function Hz(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function Vz(e){return e.type==="inline"}function qz(e){return e.type==="paragraph_open"}function Wz(e){return e.type==="list_item_open"}function jz(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var $M=H(ME());var An=H(Re());var ii=H(Re()),h0;function OE(){return h0||(h0=acquireVsCodeApi()),h0}function RE(){let e=(0,ii.useRef)(OE()),t=(0,ii.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,ii.useCallback)(r=>{let o=i=>{r(i.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,ii.useEffect)(()=>{e.current=OE()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var jt=H(Re());var DE=document.createElement("style");DE.textContent=`.button_Button { padding: 8px 16px; border-radius: 4px; border: 1px solid transparent; @@ -40,7 +40,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&& background-color: #45494e; } -`;document.head.appendChild(OE);var Fc={button:"button_Button",primary:"primary_Button",secondary:"secondary_Button"};var LE=H(de()),h0=({variant:e="primary",children:t,className:n,...r})=>{let o=e==="secondary"?Fc.secondary:Fc.primary,i=`${Fc.button} ${o} ${n||""}`;return(0,LE.jsx)("button",{className:i,...r,children:t})};var PE=document.createElement("style");PE.textContent=`.container_Input { +`;document.head.appendChild(DE);var Fc={button:"button_Button",primary:"primary_Button",secondary:"secondary_Button"};var BE=H(de()),m0=({variant:e="primary",children:t,className:n,...r})=>{let o=e==="secondary"?Fc.secondary:Fc.primary,i=`${Fc.button} ${o} ${n||""}`;return(0,BE.jsx)("button",{className:i,...r,children:t})};var FE=document.createElement("style");FE.textContent=`.container_Input { margin-bottom: 16px; } @@ -75,7 +75,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&& margin-top: 4px; } -`;document.head.appendChild(PE);var ra={container:"container_Input",label:"label_Input",input:"input_Input",hint:"hint_Input"};var Es=H(de()),m0=({label:e,hint:t,className:n,...r})=>(0,Es.jsxs)("div",{className:ra.container,children:[e&&(0,Es.jsx)("label",{className:ra.label,children:e}),(0,Es.jsx)("input",{className:`${ra.input} ${n||""}`,...r}),t&&(0,Es.jsx)("div",{className:ra.hint,children:t})]});var BE=document.createElement("style");BE.textContent=`.container_Select { +`;document.head.appendChild(FE);var ra={container:"container_Input",label:"label_Input",input:"input_Input",hint:"hint_Input"};var Es=H(de()),g0=({label:e,hint:t,className:n,...r})=>(0,Es.jsxs)("div",{className:ra.container,children:[e&&(0,Es.jsx)("label",{className:ra.label,children:e}),(0,Es.jsx)("input",{className:`${ra.input} ${n||""}`,...r}),t&&(0,Es.jsx)("div",{className:ra.hint,children:t})]});var zE=document.createElement("style");zE.textContent=`.container_Select { margin-bottom: 16px; } @@ -111,7 +111,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&& margin-top: 4px; } -`;document.head.appendChild(BE);var oa={container:"container_Select",label:"label_Select",select:"select_Select",hint:"hint_Select"};var si=H(de()),xo=({label:e,hint:t,options:n,children:r,className:o,...i})=>(0,si.jsxs)("div",{className:oa.container,children:[e&&(0,si.jsx)("label",{className:oa.label,children:e}),(0,si.jsx)("select",{className:`${oa.select} ${o||""}`,...i,children:n?n.map(s=>(0,si.jsx)("option",{value:s.value,children:s.label},s.value)):r}),t&&(0,si.jsx)("div",{className:oa.hint,children:t})]});var FE=document.createElement("style");FE.textContent=`.container_TextArea { +`;document.head.appendChild(zE);var oa={container:"container_Select",label:"label_Select",select:"select_Select",hint:"hint_Select"};var si=H(de()),xo=({label:e,hint:t,options:n,children:r,className:o,...i})=>(0,si.jsxs)("div",{className:oa.container,children:[e&&(0,si.jsx)("label",{className:oa.label,children:e}),(0,si.jsx)("select",{className:`${oa.select} ${o||""}`,...i,children:n?n.map(s=>(0,si.jsx)("option",{value:s.value,children:s.label},s.value)):r}),t&&(0,si.jsx)("div",{className:oa.hint,children:t})]});var UE=document.createElement("style");UE.textContent=`.container_TextArea { margin-bottom: 16px; } @@ -148,7 +148,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&& margin-top: 4px; } -`;document.head.appendChild(FE);var zE=H(de());var UE=document.createElement("style");UE.textContent=`.badge_Badge { +`;document.head.appendChild(UE);var $E=H(de());var HE=document.createElement("style");HE.textContent=`.badge_Badge { display: inline-flex; align-items: center; gap: 4px; @@ -200,19 +200,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,Y=M),I===void 0&& background-color: rgba(0, 0, 0, 0.15); } -`;document.head.appendChild(UE);var $E=H(de());var ll=H(Re());var Ra=H(Re(),1),Mo=H(Re(),1),vS=H(ks(),1),kS=H(Uc(),1),Pr=H(de(),1);function vt(e){this.content=e}vt.prototype={constructor:vt,find:function(e){for(var t=0;t>1}};vt.from=function(e){if(e instanceof vt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new vt(t)};var b0=vt;function ew(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=ew(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function tw(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ut&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(l.isText?l=l.cut(Math.max(0,t-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,t-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?$c(n+1,i):$c(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};ce.none=[];var ui=class extends Error{},L=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=rw(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(nw(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(N.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new e(t,r,o)}};L.empty=new L(N.empty,0,0);function nw(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:l}=e.findIndex(n);if(o==t||i.isText){if(l!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(nw(i.content,t-o-1,n-o-1)))}function rw(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=rw(s.content,t-i-1,n,s);return l&&e.replaceChild(o,s.copy(l))}function MD(e,t,n){if(n.openStart>e.depth)throw new ui("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ui("Inconsistent open depths");return ow(e,t,n,0)}function ow(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function ia(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(li(e.nodeAfter,r),i++));for(let l=i;lo&&v0(e,t,o+1),s=r.depth>o&&v0(n,r,o+1),l=[];return ia(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(iw(i,s),li(ai(i,sw(e,t,n,r,o+1)),l)):(i&&li(ai(i,Vc(e,t,o+1)),l),ia(t,n,o,l),s&&li(ai(s,Vc(n,r,o+1)),l)),ia(r,null,o,l),new N(l)}function Vc(e,t,n){let r=[];if(ia(null,e,n,r),e.depth>n){let o=v0(e,t,n+1);li(ai(o,Vc(e,t,n+1)),r)}return ia(t,null,n,r),new N(r)}function OD(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(N.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Wc=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new ci(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new e(n,r,i)}static resolveCached(t,n){let r=WE.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),lw(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=N.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=N.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};$t.prototype.text=void 0;var E0=class e extends $t{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):lw(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function lw(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var di=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new w0(t,n);if(r.next==null)return e.empty;let o=aw(r);r.next&&r.err("Unexpected trailing text");let i=UD(zD(o));return $D(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` -`)}};di.empty=new di(!0);var w0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function aw(e){let t=[];do t.push(ID(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function ID(e){let t=[];do t.push(LD(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function LD(e){let t=FD(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=PD(e,t);else break;return t}function jE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function PD(e,t){let n=jE(e),r=n;return e.eat(",")&&(e.next!="}"?r=jE(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function BD(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function FD(e){if(e.eat("(")){let t=aw(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=BD(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function zD(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,l,a){let u={term:a,to:l};return t[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{e[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new di(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:dw(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $t(this,this.computeAttrs(t),N.from(n),ce.setFrom(r))}createChecked(t=null,n,r){return n=N.from(n),this.checkContent(n),new $t(this,this.computeAttrs(t),n,ce.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=N.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(N.empty,!0);return i?new $t(this,t,n.append(i),ce.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new e(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function HD(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var _0=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?HD(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},la=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=pw(t,o.attrs),this.excluded=null;let i=cw(this.attrs);this.instance=i?new ce(this,i):null}create(t=null){return!t&&this.instance?this.instance:new ce(this,dw(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new e(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}},vo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=b0.from(t.nodes),n.marks=b0.from(t.marks||{}),this.nodes=jc.compile(this.spec.nodes,this),this.marks=la.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=di.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?GE(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:GE(this,s.split(" "))}this.nodeFromJSON=o=>$t.fromJSON(this,o),this.markFromJSON=o=>ce.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof jc){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new E0(r,r.defaultAttrs,t,ce.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function GE(e,t){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function qD(e){return e.tag!=null}function VD(e){return e.style!=null}var fn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(qD(o))this.tags.push(o);else if(VD(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Kc(this,n,!1);return r.addAll(t,ce.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Kc(this,n,!0);return r.addAll(t,ce.none,n.from,n.to),L.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=JE(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=JE(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},hw={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},WD={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},mw={ol:!0,ul:!0},aa=1,S0=2,sa=4;function YE(e,t,n){return t!=null?(t?aa:0)|(t==="full"?S0:0):e&&e.whitespace=="pre"?aa|S0:n&~sa}var _s=class{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=ce.none,this.match=i||(s&sa?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&aa)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=N.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!hw.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Kc=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=YE(null,n.preserveWhitespace,0)|(r?sa:0);o?i=new _s(o.type,o.attrs,ce.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new _s(null,null,ce.none,!0,null,s):i=new _s(t.schema.topNodeType,null,ce.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&S0?"full":this.localPreserveWS||(o.options&aa)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` -`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,r),this.findAround(t,a,!1)}i&&this.sync(l)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,l=o==null?null:t.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],u=a.findWrapping(t);if(u&&(!o||o.length>u.length+l)&&(o=u,i=a,!u.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(u.type):ZE(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new _s(t,n,a,o,null,l)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=aa)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function jD(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&mw.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function KD(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function JE(e){let t={};for(let n in e)t[n]=e[n];return t}function ZE(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Hc(x0(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Hc(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=XE(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return XE(t.marks)}};function XE(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function x0(e){return e.document||window.document}var QE=new WeakMap;function GD(e){let t=QE.get(e);return t===void 0&&QE.set(e,t=YD(e)),t}function YD(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,a=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:h}=Hc(e,f,n,r);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}var yw=65535,xw=Math.pow(2,16);function JD(e,t){return e+t*xw}function gw(e){return e&yw}function ZD(e){return(e-(e&yw))/xw}var vw=1,kw=2,Gc=4,Ew=8,da=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Ew)>0}get deletedBefore(){return(this.delInfo&(vw|Gc))>0}get deletedAfter(){return(this.delInfo&(kw|Gc))>0}get deletedAcross(){return(this.delInfo&Gc)>0}},Cr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=gw(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,p=a+o+(f<0?0:c);if(r)return p;let h=t==(n<0?a:d)?null:JD(l/3,t-a),m=t==a?kw:t==d?vw:Gc;return(n<0?t!=a:t!=d)&&(m|=Ew),new da(p,m,h)}o+=c-u}return r?t+o:new da(t+o,0,null)}touches(t,n){let r=0,o=gw(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+i],c=a+u;if(t<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,i)}invert(){return new Tr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("addMark",pa);var Tr=class e extends Qe{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new L(O0(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,r)}invert(){return new pa(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("removeMark",Tr);var ha=class e extends Qe{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return at.fromReplace(t,this.pos,this.pos+1,new L(N.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,L.fromJSON(t,n.slice),n.insert,!!n.structure)}};Qe.jsonID("replaceAround",je);function N0(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function XD(e,t,n,r){let o=[],i=[],s,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+a.nodeSize,n),h=r.addToSet(d);for(let m=0;me.step(a)),i.forEach(a=>e.step(a))}function QD(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof la){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ce.step(new Tr(s.from,s.to,s.style)))}function R0(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],l=t+1;for(let a=0;a=0;a--)e.step(s[a])}function e6(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ar(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,i=0;;--r){let s=e.$from.node(r),l=e.$from.index(r)+o,a=e.$to.indexAfter(r)-i;if(rn;h--)m||r.index(h)>0?(m=!0,c=N.from(r.node(h).copy(c)),d++):a--;let f=N.empty,p=0;for(let h=i,m=!1;h>n;h--)m||o.after(h+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=N.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new je(o,i,o,i,new L(r,0,0),n.length,!0))}function i6(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,l)=>{let a=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,a)&&s6(e.doc,e.mapping.slice(i).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&_w(e,s,l,i),R0(e,e.mapping.slice(i).map(l,1),r,void 0,u===null);let c=e.mapping.slice(i),d=c.map(l,1),f=c.map(l+s.nodeSize,1);return e.step(new je(d,f,d+1,f-1,new L(N.from(r.create(a,null,s.marks)),0,0),1,!0)),u===!0&&ww(e,s,l,i),!1}})}function ww(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let a=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(a,a+1,t.type.schema.linebreakReplacement.create())}}})}function _w(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` -`))}})}function s6(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function l6(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new je(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new L(N.from(s),0,0),1,!0))}function Qt(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function a6(e,t,n=1,r){let o=e.doc.resolve(t),i=N.empty,s=N.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=N.from(o.node(l).copy(i));let c=r&&r[u];s=N.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}e.step(new kt(t,t,new L(i.append(s),n,n),!0))}function pn(e,t){let n=e.resolve(t),r=n.index();return Sw(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function u6(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Sw(i,s)&&r.node(o).canReplace(l,l+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function c6(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let l=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);_w(e,c.node(),c.before(),l)}s.inlineContent&&R0(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=e.mapping.slice(l),u=a.map(t-n);if(e.step(new kt(u,a.map(t+n,-1),L.empty,!0)),r===!0){let c=e.doc.resolve(u);ww(e,c.node(),c.before(),e.steps.length)}return e}function d6(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function ma(e,t,n=t,r=L.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return Cw(o,i,r)?new kt(t,n,r):new M0(o,i,r).fit()}function Cw(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var M0=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=N.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=N.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new L(i,s,l);return t>-1?new je(r.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new kt(r.pos,o.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=T0(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(N.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=T0(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new L(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=T0(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new L(ua(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new L(ua(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m1||a==0||m.content.size)&&(d=b,c.push(Tw(m.mark(f.allowedMarks(m.marks)),u==1?a:0,u==l.childCount?p:-1)))}let h=u==l.childCount;h||(p=-1),this.placed=ca(this.placed,n,N.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=l;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=A0(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ca(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=ca(this.placed,this.depth,N.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(N.empty,!0);n.childCount&&(this.placed=ca(this.placed,this.frontier.length,n))}};function ua(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ua(e.firstChild.content,t-1,n)))}function ca(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ca(e.lastChild.content,t-1,n)))}function T0(e,t){for(let n=0;n1&&(r=r.replaceChild(0,Tw(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(N.empty,!0)))),e.copy(r)}function A0(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!f6(n,i.content,s)?l:null}function f6(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==p&&s.splice(1,0,-f)}let a=s.indexOf(l),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=p6(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(l)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),n=i.after(p))}}function Aw(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(N.empty,!0))}return e}function m6(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=d6(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new L(N.from(r),0,0))}function g6(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=Nw(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return e.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function Nw(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}var Yc=class e extends Qe{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return at.fromReplace(t,this.pos,this.pos+1,new L(N.from(o),0,n.isLeaf?0:1))}getMap(){return Cr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};Qe.jsonID("attr",Yc);var Jc=class e extends Qe{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return at.ok(r)}getMap(){return Cr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};Qe.jsonID("docAttr",Jc);var Cs=class extends Error{};Cs=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Cs.prototype=Object.create(Error.prototype);Cs.prototype.constructor=Cs;Cs.prototype.name="TransformError";var ko=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new fa}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Cs(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=L.empty){let o=ma(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new L(N.from(r),0,0))}delete(t,n){return this.replace(t,n,L.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return h6(this,t,n,r),this}replaceRangeWith(t,n,r){return m6(this,t,n,r),this}deleteRange(t,n){return g6(this,t,n),this}lift(t,n){return t6(this,t,n),this}join(t,n=1){return c6(this,t,n),this}wrap(t,n){return o6(this,t,n),this}setBlockType(t,n=t,r,o=null){return i6(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return l6(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Yc(t,n,r)),this}setDocAttribute(t,n){return this.step(new Jc(t,n)),this}addNodeMark(t,n){return this.step(new ha(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ce)n.isInSet(r.marks)&&this.step(new Ss(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new Ss(t,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(t,n=1,r){return a6(this,t,n,r),this}addMark(t,n,r){return XD(this,t,n,r),this}removeMark(t,n,r){return QD(this,t,n,r),this}clearIncompatible(t,n,r){return R0(this,t,n,r),this}};var D0=Object.create(null),W=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Ns(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?As(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):As(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ot(t.node(0))}static atStart(t){return As(t,t,0,0,1)||new Ot(t)}static atEnd(t){return As(t,t,t.content.size,t.childCount,-1)||new Ot(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=D0[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in D0)throw new RangeError("Duplicate use of selection JSON ID "+t);return D0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return U.between(this.$anchor,this.$head).getBookmark()}};W.prototype.visible=!0;var Ns=class{constructor(t,n){this.$from=t,this.$to=n}},Mw=!1;function Ow(e){!Mw&&!e.parent.inlineContent&&(Mw=!0)}var U=class e extends W{constructor(t,n=t){Ow(t),Ow(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return W.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=L.empty){if(super.replace(t,n),n==L.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Qc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=W.findFrom(n,r,!0)||W.findFrom(n,-r,!0);if(i)n=i.$head;else return W.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(W.findFrom(t,-r,!0)||W.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let l=t.child(s);if(l.isAtom){if(!i&&z.isSelectable(l))return z.create(e,n-(o<0?l.nodeSize:0))}else{let a=As(e,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function Rw(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var Dw=1,Xc=2,Iw=4,P0=class extends ko{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Xc,this}ensureMarks(t){return ce.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Xc)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Xc,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ce.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(W.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Iw,this}get scrolledIntoView(){return(this.updated&Iw)>0}};function Lw(e,t){return!t||!e?e:e.bind(t)}var pi=class{constructor(t,n,r){this.name=t,this.init=Lw(n.init,r),this.apply=Lw(n.apply,r)}},y6=[new pi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new pi("selection",{init(e,t){return e.selection||W.atStart(t.doc)},apply(e){return e.selection}}),new pi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new pi("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],ga=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=y6.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new pi(r.key,r.spec.state,r))})}},ed=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new ga(t.schema,t.plugins),i=new e(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=$t.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=W.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,t,n[l],i);return}}i[s.name]=s.init(t,i)}}),i}};function Pw(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Pw(o,t,{})),n[r]=o}return n}var q=class{constructor(t){this.spec=t,this.props={},t.props&&Pw(t.props,this,this.props),this.key=t.key?t.key.key:Bw("plugin")}getState(t){return t[this.key]}},I0=Object.create(null);function Bw(e){return e in I0?e+"$"+ ++I0[e]:(I0[e]=0,e+"$")}var Z=class{constructor(t="key"){this.key=Bw(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var td=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function zw(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var F0=(e,t,n)=>{let r=zw(e,n);if(!r)return!1;let o=U0(r);if(!o){let s=r.blockRange(),l=s&&Ar(s);return l==null?!1:(t&&t(e.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(Gw(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Ms(i,"end")||z.isSelectable(i)))for(let s=r.depth;;s--){let l=ma(e.doc,r.before(s),r.after(s),L.empty);if(l&&l.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},Uw=(e,t,n)=>{let r=zw(e,n);if(!r)return!1;let o=U0(r);return o?Hw(e,o,t):!1},$w=(e,t,n)=>{let r=qw(e,n);if(!r)return!1;let o=q0(r);return o?Hw(e,o,t):!1};function Hw(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let s=t.nodeAfter,l=s,a=t.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=ma(e.doc,i,a,L.empty);if(!u||u.from!=i||u instanceof kt&&u.slice.size>=a-i)return!1;if(n){let c=e.tr.step(u);c.setSelection(U.create(c.doc,i)),n(c.scrollIntoView())}return!0}function Ms(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var z0=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=U0(r)}let s=i&&i.nodeBefore;return!s||!z.isSelectable(s)?!1:(t&&t(e.tr.setSelection(z.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function U0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function qw(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=qw(e,n);if(!r)return!1;let o=q0(r);if(!o)return!1;let i=o.nodeAfter;if(Gw(e,o,t,1))return!0;if(r.parent.content.size==0&&(Ms(i,"start")||z.isSelectable(i))){let s=ma(e.doc,r.before(),r.after(),L.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof z,o;if(r){if(n.node.isTextblock||!pn(e.doc,n.from))return!1;o=n.from}else if(o=fi(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(z.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},Ww=(e,t)=>{let n=e.selection,r;if(n instanceof z){if(n.node.isTextblock||!pn(e.doc,n.to))return!1;r=n.to}else if(r=fi(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},jw=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Ar(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},V0=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function W0(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=W0(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,s.createAndFill());a.setSelection(W.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},K0=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Ot||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=W0(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Qt(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ar(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function x6(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof z&&t.selection.node.isBlock)return!r.parentOffset||!Qt(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){a=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),l=W0(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof U||t.selection instanceof Ot)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Qt(c.doc,d,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Qt(c.doc,d,i.length,i)),!f)return!1;if(c.split(d,i.length,i),!a&&u&&r.node(s).type!=l){let p=c.mapping.map(r.before(s)),h=c.doc.resolve(p);l&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,l)&&c.setNodeMarkup(c.mapping.map(r.before(s)),l)}return n&&n(c.scrollIntoView()),!0}}var v6=x6();var Kw=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(z.create(e.doc,o))),!0)},k6=(e,t)=>(t&&t(e.tr.setSelection(new Ot(e.doc))),!0);function E6(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||pn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Gw(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&E6(e,t,n))return!0;let u=!a&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,h=N.empty;for(let g=s.length-1;g>=0;g--)h=N.from(s[g].create(null,h));h=N.from(o.copy(h));let m=e.tr.step(new je(t.pos-1,p,t.pos,p,new L(h,1,0),s.length,!0)),b=m.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&pn(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&a?null:W.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Ar(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&Ms(i,"start",!0)&&Ms(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=i,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=N.empty;for(let x=h.length-1;x>=0;x--)g=N.from(h[x].copy(g));let y=e.tr.step(new je(t.pos-h.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new L(g,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function Yw(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(U.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}var Y0=Yw(-1),J0=Yw(1);function Jw(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Ts(s,e,t);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Z0(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let a=s.resolve(t.start-2);i=new ci(a,a,t.depth),t.endIndex=0;c--)i=N.from(n[c].type.create(n[c].attrs,i));e.step(new je(t.start-(r?2:0),t.end,t.start,t.end,new L(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?C6(t,n,e,i):T6(t,n,i):!0:!1}}function C6(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);im;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?N.empty:N.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new je(d-(l?1:0),f+(a?1:0),d+1,f-1,new L((l?N.empty:N.from(o.copy(N.empty))).append(a?N.empty:N.from(o.copy(N.empty))),l?0:1,a?0:1),l?0:1)),t(r.scrollIntoView()),!0}function Qw(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=e)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=N.from(u?e.create():null),d=new L(N.from(e.create(null,N.from(l.type.create(null,c)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new je(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var ut=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Ls=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},og=null,Mr=function(e,t,n){let r=og||(og=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},A6=function(){og=null},vi=function(e,t,n,r){return n&&(e2(e,t,n,r,-1)||e2(e,t,n,r,1))},N6=/^(img|br|input|textarea|hr)$/i;function e2(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:mn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||_a(e)||N6.test(e.nodeName)||e.contentEditable=="false")return!1;t=ut(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?mn(e):0}else return!1}}function mn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function M6(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=mn(e)}else if(e.parentNode&&!_a(e))t=ut(e),e=e.parentNode;else return null}}function O6(e,t){for(;;){if(e.nodeType==3&&t2),hn=Ps||(Yn?/Mac/.test(Yn.platform):!1),L2=Yn?/Win/.test(Yn.platform):!1,Or=/Android \d/.test(Ao),Sa=!!t2&&"webkitFontSmoothing"in t2.documentElement.style,L6=Sa?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function P6(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Nr(e,t){return typeof e=="number"?e:e[t]}function B6(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function n2(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Ls(s);continue}let l=s,a=l==i.body,u=a?P6(i):B6(l),c=0,d=0;if(t.topu.bottom-Nr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Nr(o,"top")-u.top:t.bottom-u.bottom+Nr(o,"bottom")),t.leftu.right-Nr(r,"right")&&(c=t.right-u.right+Nr(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let p=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let m=l.scrollLeft-p,b=l.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:Ls(s)}}function F6(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:P2(e.dom)}}function P2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Ls(r));return t}function z6({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;B2(n,r==0?0:r-t)}function B2(e,t){for(let n=0;n=l){s=Math.max(h.bottom,s),l=Math.min(h.top,l);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!a&&h.left<=t.left&&h.right>=t.left&&(a=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?$6(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:F2(n,o)}function $6(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let i=0;i=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function Eg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function H6(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function V6(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let l=e.docView.nearestDesc(i,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&a.left>r.left||a.top>r.top?o=l.posBefore:(!s&&a.right-1?o:e.docView.posFromDOM(t,n,-1)}function z2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;Sa&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=V6(e,r,o,t))}l==null&&(l=q6(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function r2(e){return e.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,ba(wo(Mr(r,a,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return Q0(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Mr(a,mn(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return ba(wo(u,1),!1)}if(i==null&&o=0)}function ba(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Q0(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function $2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function K6(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return $2(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=U2(e,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Mr(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var G6=/[\u0590-\u08ac]/;function Y6(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=e.domSelection();return l?!G6.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:$2(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&u==m;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var o2=null,i2=null,s2=!1;function J6(e,t,n){return o2==t&&i2==n?s2:(o2=t,i2=n,s2=n=="up"||n=="down"?K6(e,t,n):Y6(e,t,n))}var bn=0,l2=1,mi=2,Jn=3,ki=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=bn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nut(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof od){o=t-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof nd&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?ut(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=ut(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;ch&&sn){let h=l;l=a,a=h}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let l=r+i.border,a=s-i.border;if(t>=l&&n<=a){this.dirty=t==r||n==s?mi:l2,t==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jn:i.markDirty(t-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?mi:Jn}r=s}this.dirty=mi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?mi:l2;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==bn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},ag=class extends ki{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},Bs=class e extends ki{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Sr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Jn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Jn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=bn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=fg(i,0,t,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Sr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=V2(c,r,n),u?a=new ug(t,n,r,o,c,d||null,f,u,i,s+1):n.isText?new rd(t,n,r,o,c,f,i):new e(t,n,r,o,c,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>N.empty)}return t}matchesNode(t,n,r){return this.dirty==bn&&t.eq(this.node)&&id(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new dg(this,s&&s.node,t);e4(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?ce.none:this.node.child(c).marks,r,t),a.placeWidget(u,t,o)},(u,c,d,f)=>{a.syncToMarks(u.marks,r,t);let p;a.findNodeMatch(u,c,d,f)||l&&t.state.selection.from>o&&t.state.selection.to-1&&a.updateNodeAt(u,c,d,p,t)||a.updateNextNode(u,c,d,t,f,o)||a.addNode(u,c,d,t,o),o+=u.nodeSize}),a.syncToMarks([],r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==mi)&&(s&&this.protectLocalComposition(t,s),H2(this.contentDOM,this.children,t),Ps&&t4(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof U)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,l=n4(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new ag(this,i,n,o);t.input.compositionNodes.push(s),this.children=fg(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Jn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=bn}updateOuterDeco(t){if(id(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=q2(this.dom,this.nodeDOM,cg(this.outerDeco,this.node,n),cg(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function a2(e,t,n,r,o){V2(r,t,e);let i=new To(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}var rd=class e extends To{constructor(t,n,r,o,i,s,l){super(t,n,r,o,i,null,s,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Jn||this.dirty!=bn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=bn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=bn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Jn)}get domAtom(){return!1}isText(t){return this.node.text==t}},od=class extends ki{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==bn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},ug=class extends To{constructor(t,n,r,o,i,s,l,a,u,c){super(t,n,r,o,i,s,l,u,c),this.spec=a}update(t,n,r,o){if(this.dirty==Jn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function H2(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Bs.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Bs)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function Q6(e,t){return e.type.side-t.type.side}function e4(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):l.slice();r(f,m,t.forChild(i,f),p),i=h}}function t4(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function n4(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let u=l=0&&u+t.length+l>=n)return l+u;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return-1}function fg(e,t,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=t?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function wg(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(fd(n)){for(a=s;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&z.isSelectable(d)&&o.parent&&!(d.isInline&&R6(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new z(s==f?l:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!W2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function o4(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,ut(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Ht&&Co<=11&&(n.disabled=!0,n.disabled=!1)}function j2(e,t){if(t instanceof z){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(p2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else p2(e)}function p2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _g(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||U.between(t,n,r)}function h2(e){return e.editable&&!e.hasFocus()?!1:K2(e)}function K2(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function i4(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return vi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function pg(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&W.findFrom(i,t)}function _o(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function m2(e,t,n){let r=e.state.selection;if(r instanceof U)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return _o(e,new U(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=pg(e.state,t);return o&&o instanceof z?_o(e,o):!1}else if(!(hn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(l))&&!s.contentDOM?z.isSelectable(i)?_o(e,new z(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Sa?_o(e,new U(e.state.doc.resolve(t<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof z&&r.node.isInline)return _o(e,new U(t>0?r.$to:r.$from));{let o=pg(e.state,t);return o?_o(e,o):!1}}}function sd(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function xa(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Rs(e,t){return t<0?s4(e):l4(e)}function s4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(gn&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(xa(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(G2(n))break;{let l=n.previousSibling;for(;l&&xa(l,-1);)o=n.parentNode,i=ut(l),l=l.previousSibling;if(l)n=l,r=sd(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?hg(e,n,r):o&&hg(e,o,i)}function l4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=sd(n),i,s;for(;;)if(r{e.state==o&&Rr(e)},50)}function g2(e,t){let n=e.state.doc.resolve(t);if(!(et||L2)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function b2(e,t,n){let r=e.state.selection;if(r instanceof U&&!r.empty||n.indexOf("s")>-1||hn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=pg(e.state,t);if(s&&s instanceof z)return _o(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,l=r instanceof Ot?W.near(s,t):W.findFrom(s,t);return l?_o(e,l):!1}return!1}function y2(e,t){if(!(e.state.selection instanceof U))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function x2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function c4(e){if(!wt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;x2(e,r,"true"),setTimeout(()=>x2(e,r,"false"),20)}return!1}function d4(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function f4(e,t){let n=t.keyCode,r=d4(t);if(n==8||hn&&n==72&&r=="c")return y2(e,-1)||Rs(e,-1);if(n==46&&!t.shiftKey||hn&&n==68&&r=="c")return y2(e,1)||Rs(e,1);if(n==13||n==27)return!0;if(n==37||hn&&n==66&&r=="c"){let o=n==37?g2(e,e.state.selection.from)=="ltr"?-1:1:-1;return m2(e,o,r)||Rs(e,o)}else if(n==39||hn&&n==70&&r=="c"){let o=n==39?g2(e,e.state.selection.from)=="ltr"?1:-1:1;return m2(e,o,r)||Rs(e,o)}else{if(n==38||hn&&n==80&&r=="c")return b2(e,-1,r)||Rs(e,-1);if(n==40||hn&&n==78&&r=="c")return c4(e)||b2(e,1,r)||Rs(e,1);if(r==(hn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Sg(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Sr.fromSchema(e.state.schema),l=e_(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=Q2[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` +`;document.head.appendChild(HE);var VE=H(de());var ll=H(Re());var Ra=H(Re(),1),Mo=H(Re(),1),xS=H(ks(),1),vS=H(Uc(),1),Pr=H(de(),1);function vt(e){this.content=e}vt.prototype={constructor:vt,find:function(e){for(var t=0;t>1}};vt.from=function(e){if(e instanceof vt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new vt(t)};var y0=vt;function nw(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=nw(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function rw(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ut&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(l.isText?l=l.cut(Math.max(0,t-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,t-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?$c(n+1,i):$c(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};ce.none=[];var ui=class extends Error{},L=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=iw(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ow(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(N.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new e(t,r,o)}};L.empty=new L(N.empty,0,0);function ow(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:l}=e.findIndex(n);if(o==t||i.isText){if(l!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(ow(i.content,t-o-1,n-o-1)))}function iw(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=iw(s.content,t-i-1,n,s);return l&&e.replaceChild(o,s.copy(l))}function ND(e,t,n){if(n.openStart>e.depth)throw new ui("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ui("Inconsistent open depths");return sw(e,t,n,0)}function sw(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function ia(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(li(e.nodeAfter,r),i++));for(let l=i;lo&&k0(e,t,o+1),s=r.depth>o&&k0(n,r,o+1),l=[];return ia(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(lw(i,s),li(ai(i,aw(e,t,n,r,o+1)),l)):(i&&li(ai(i,qc(e,t,o+1)),l),ia(t,n,o,l),s&&li(ai(s,qc(n,r,o+1)),l)),ia(r,null,o,l),new N(l)}function qc(e,t,n){let r=[];if(ia(null,e,n,r),e.depth>n){let o=k0(e,t,n+1);li(ai(o,qc(e,t,n+1)),r)}return ia(t,null,n,r),new N(r)}function MD(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(N.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Wc=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new ci(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new e(n,r,i)}static resolveCached(t,n){let r=KE.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),uw(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=N.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=N.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};$t.prototype.text=void 0;var w0=class e extends $t{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):uw(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function uw(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var di=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new _0(t,n);if(r.next==null)return e.empty;let o=cw(r);r.next&&r.err("Unexpected trailing text");let i=zD(FD(o));return UD(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` +`)}};di.empty=new di(!0);var _0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function cw(e){let t=[];do t.push(DD(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function DD(e){let t=[];do t.push(ID(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function ID(e){let t=BD(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=LD(e,t);else break;return t}function GE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function LD(e,t){let n=GE(e),r=n;return e.eat(",")&&(e.next!="}"?r=GE(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function PD(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function BD(e){if(e.eat("(")){let t=cw(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=PD(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function FD(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,l,a){let u={term:a,to:l};return t[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{e[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new di(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:pw(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $t(this,this.computeAttrs(t),N.from(n),ce.setFrom(r))}createChecked(t=null,n,r){return n=N.from(n),this.checkContent(n),new $t(this,this.computeAttrs(t),n,ce.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=N.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(N.empty,!0);return i?new $t(this,t,n.append(i),ce.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new e(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function $D(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var S0=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$D(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},la=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=mw(t,o.attrs),this.excluded=null;let i=fw(this.attrs);this.instance=i?new ce(this,i):null}create(t=null){return!t&&this.instance?this.instance:new ce(this,pw(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new e(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}},vo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=y0.from(t.nodes),n.marks=y0.from(t.marks||{}),this.nodes=jc.compile(this.spec.nodes,this),this.marks=la.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=di.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?JE(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:JE(this,s.split(" "))}this.nodeFromJSON=o=>$t.fromJSON(this,o),this.markFromJSON=o=>ce.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof jc){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new w0(r,r.defaultAttrs,t,ce.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function JE(e,t){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function HD(e){return e.tag!=null}function VD(e){return e.style!=null}var fn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(HD(o))this.tags.push(o);else if(VD(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Kc(this,n,!1);return r.addAll(t,ce.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Kc(this,n,!0);return r.addAll(t,ce.none,n.from,n.to),L.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=XE(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=XE(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},gw={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},qD={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},bw={ol:!0,ul:!0},aa=1,C0=2,sa=4;function ZE(e,t,n){return t!=null?(t?aa:0)|(t==="full"?C0:0):e&&e.whitespace=="pre"?aa|C0:n&~sa}var _s=class{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=ce.none,this.match=i||(s&sa?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&aa)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=N.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!gw.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Kc=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=ZE(null,n.preserveWhitespace,0)|(r?sa:0);o?i=new _s(o.type,o.attrs,ce.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new _s(null,null,ce.none,!0,null,s):i=new _s(t.schema.topNodeType,null,ce.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&C0?"full":this.localPreserveWS||(o.options&aa)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` +`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,r),this.findAround(t,a,!1)}i&&this.sync(l)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,l=o==null?null:t.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],u=a.findWrapping(t);if(u&&(!o||o.length>u.length+l)&&(o=u,i=a,!u.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(u.type):QE(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new _s(t,n,a,o,null,l)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=aa)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function WD(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&bw.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function jD(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function XE(e){let t={};for(let n in e)t[n]=e[n];return t}function QE(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Hc(v0(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Hc(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=ew(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return ew(t.marks)}};function ew(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function v0(e){return e.document||window.document}var tw=new WeakMap;function KD(e){let t=tw.get(e);return t===void 0&&tw.set(e,t=GD(e)),t}function GD(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,a=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:h}=Hc(e,f,n,r);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}var vw=65535,kw=Math.pow(2,16);function YD(e,t){return e+t*kw}function yw(e){return e&vw}function JD(e){return(e-(e&vw))/kw}var Ew=1,ww=2,Gc=4,_w=8,da=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&_w)>0}get deletedBefore(){return(this.delInfo&(Ew|Gc))>0}get deletedAfter(){return(this.delInfo&(ww|Gc))>0}get deletedAcross(){return(this.delInfo&Gc)>0}},Cr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=yw(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,p=a+o+(f<0?0:c);if(r)return p;let h=t==(n<0?a:d)?null:YD(l/3,t-a),g=t==a?ww:t==d?Ew:Gc;return(n<0?t!=a:t!=d)&&(g|=_w),new da(p,g,h)}o+=c-u}return r?t+o:new da(t+o,0,null)}touches(t,n){let r=0,o=yw(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+i],c=a+u;if(t<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,i)}invert(){return new Tr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("addMark",pa);var Tr=class e extends Qe{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new L(R0(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return at.fromReplace(t,this.from,this.to,r)}invert(){return new pa(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qe.jsonID("removeMark",Tr);var ha=class e extends Qe{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return at.fromReplace(t,this.pos,this.pos+1,new L(N.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,L.fromJSON(t,n.slice),n.insert,!!n.structure)}};Qe.jsonID("replaceAround",je);function M0(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function ZD(e,t,n,r){let o=[],i=[],s,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+a.nodeSize,n),h=r.addToSet(d);for(let g=0;ge.step(a)),i.forEach(a=>e.step(a))}function XD(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof la){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ce.step(new Tr(s.from,s.to,s.style)))}function D0(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],l=t+1;for(let a=0;a=0;a--)e.step(s[a])}function QD(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ar(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,i=0;;--r){let s=e.$from.node(r),l=e.$from.index(r)+o,a=e.$to.indexAfter(r)-i;if(rn;h--)g||r.index(h)>0?(g=!0,c=N.from(r.node(h).copy(c)),d++):a--;let f=N.empty,p=0;for(let h=i,g=!1;h>n;h--)g||o.after(h+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=N.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new je(o,i,o,i,new L(r,0,0),n.length,!0))}function o6(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,l)=>{let a=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,a)&&i6(e.doc,e.mapping.slice(i).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&Cw(e,s,l,i),D0(e,e.mapping.slice(i).map(l,1),r,void 0,u===null);let c=e.mapping.slice(i),d=c.map(l,1),f=c.map(l+s.nodeSize,1);return e.step(new je(d,f,d+1,f-1,new L(N.from(r.create(a,null,s.marks)),0,0),1,!0)),u===!0&&Sw(e,s,l,i),!1}})}function Sw(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let a=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(a,a+1,t.type.schema.linebreakReplacement.create())}}})}function Cw(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` +`))}})}function i6(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function s6(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new je(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new L(N.from(s),0,0),1,!0))}function Qt(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let g=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(p))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function l6(e,t,n=1,r){let o=e.doc.resolve(t),i=N.empty,s=N.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=N.from(o.node(l).copy(i));let c=r&&r[u];s=N.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}e.step(new kt(t,t,new L(i.append(s),n,n),!0))}function pn(e,t){let n=e.resolve(t),r=n.index();return Tw(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function a6(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Tw(i,s)&&r.node(o).canReplace(l,l+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function u6(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let l=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);Cw(e,c.node(),c.before(),l)}s.inlineContent&&D0(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=e.mapping.slice(l),u=a.map(t-n);if(e.step(new kt(u,a.map(t+n,-1),L.empty,!0)),r===!0){let c=e.doc.resolve(u);Sw(e,c.node(),c.before(),e.steps.length)}return e}function c6(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function ma(e,t,n=t,r=L.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return Aw(o,i,r)?new kt(t,n,r):new O0(o,i,r).fit()}function Aw(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var O0=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=N.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=N.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new L(i,s,l);return t>-1?new je(r.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new kt(r.pos,o.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=A0(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(N.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=A0(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new L(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=A0(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new L(ua(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new L(ua(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=b,c.push(Nw(g.mark(f.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?p:-1)))}let h=u==l.childCount;h||(p=-1),this.placed=ca(this.placed,n,N.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,b=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=N0(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ca(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=ca(this.placed,this.depth,N.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(N.empty,!0);n.childCount&&(this.placed=ca(this.placed,this.frontier.length,n))}};function ua(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ua(e.firstChild.content,t-1,n)))}function ca(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ca(e.lastChild.content,t-1,n)))}function A0(e,t){for(let n=0;n1&&(r=r.replaceChild(0,Nw(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(N.empty,!0)))),e.copy(r)}function N0(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!d6(n,i.content,s)?l:null}function d6(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==p&&s.splice(1,0,-f)}let a=s.indexOf(l),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=f6(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(l)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let g=0;g=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),n=i.after(p))}}function Mw(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(N.empty,!0))}return e}function h6(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=c6(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new L(N.from(r),0,0))}function m6(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=Ow(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return e.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function Ow(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}var Yc=class e extends Qe{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return at.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return at.fromReplace(t,this.pos,this.pos+1,new L(N.from(o),0,n.isLeaf?0:1))}getMap(){return Cr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};Qe.jsonID("attr",Yc);var Jc=class e extends Qe{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return at.ok(r)}getMap(){return Cr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};Qe.jsonID("docAttr",Jc);var Cs=class extends Error{};Cs=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Cs.prototype=Object.create(Error.prototype);Cs.prototype.constructor=Cs;Cs.prototype.name="TransformError";var ko=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new fa}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Cs(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=L.empty){let o=ma(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new L(N.from(r),0,0))}delete(t,n){return this.replace(t,n,L.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return p6(this,t,n,r),this}replaceRangeWith(t,n,r){return h6(this,t,n,r),this}deleteRange(t,n){return m6(this,t,n),this}lift(t,n){return e6(this,t,n),this}join(t,n=1){return u6(this,t,n),this}wrap(t,n){return r6(this,t,n),this}setBlockType(t,n=t,r,o=null){return o6(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return s6(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Yc(t,n,r)),this}setDocAttribute(t,n){return this.step(new Jc(t,n)),this}addNodeMark(t,n){return this.step(new ha(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ce)n.isInSet(r.marks)&&this.step(new Ss(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new Ss(t,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(t,n=1,r){return l6(this,t,n,r),this}addMark(t,n,r){return ZD(this,t,n,r),this}removeMark(t,n,r){return XD(this,t,n,r),this}clearIncompatible(t,n,r){return D0(this,t,n,r),this}};var I0=Object.create(null),W=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Ns(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?As(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):As(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ot(t.node(0))}static atStart(t){return As(t,t,0,0,1)||new Ot(t)}static atEnd(t){return As(t,t,t.content.size,t.childCount,-1)||new Ot(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=I0[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in I0)throw new RangeError("Duplicate use of selection JSON ID "+t);return I0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return U.between(this.$anchor,this.$head).getBookmark()}};W.prototype.visible=!0;var Ns=class{constructor(t,n){this.$from=t,this.$to=n}},Rw=!1;function Dw(e){!Rw&&!e.parent.inlineContent&&(Rw=!0)}var U=class e extends W{constructor(t,n=t){Dw(t),Dw(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return W.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=L.empty){if(super.replace(t,n),n==L.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Qc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=W.findFrom(n,r,!0)||W.findFrom(n,-r,!0);if(i)n=i.$head;else return W.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(W.findFrom(t,-r,!0)||W.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let l=t.child(s);if(l.isAtom){if(!i&&z.isSelectable(l))return z.create(e,n-(o<0?l.nodeSize:0))}else{let a=As(e,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function Iw(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var Lw=1,Xc=2,Pw=4,B0=class extends ko{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Xc,this}ensureMarks(t){return ce.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Xc)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Xc,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ce.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(W.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Pw,this}get scrolledIntoView(){return(this.updated&Pw)>0}};function Bw(e,t){return!t||!e?e:e.bind(t)}var pi=class{constructor(t,n,r){this.name=t,this.init=Bw(n.init,r),this.apply=Bw(n.apply,r)}},b6=[new pi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new pi("selection",{init(e,t){return e.selection||W.atStart(t.doc)},apply(e){return e.selection}}),new pi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new pi("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],ga=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=b6.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new pi(r.key,r.spec.state,r))})}},ed=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new ga(t.schema,t.plugins),i=new e(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=$t.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=W.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,t,n[l],i);return}}i[s.name]=s.init(t,i)}}),i}};function Fw(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Fw(o,t,{})),n[r]=o}return n}var V=class{constructor(t){this.spec=t,this.props={},t.props&&Fw(t.props,this,this.props),this.key=t.key?t.key.key:zw("plugin")}getState(t){return t[this.key]}},L0=Object.create(null);function zw(e){return e in L0?e+"$"+ ++L0[e]:(L0[e]=0,e+"$")}var Z=class{constructor(t="key"){this.key=zw(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var td=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function $w(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var z0=(e,t,n)=>{let r=$w(e,n);if(!r)return!1;let o=$0(r);if(!o){let s=r.blockRange(),l=s&&Ar(s);return l==null?!1:(t&&t(e.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(Jw(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Ms(i,"end")||z.isSelectable(i)))for(let s=r.depth;;s--){let l=ma(e.doc,r.before(s),r.after(s),L.empty);if(l&&l.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},Hw=(e,t,n)=>{let r=$w(e,n);if(!r)return!1;let o=$0(r);return o?qw(e,o,t):!1},Vw=(e,t,n)=>{let r=Ww(e,n);if(!r)return!1;let o=q0(r);return o?qw(e,o,t):!1};function qw(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let s=t.nodeAfter,l=s,a=t.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=ma(e.doc,i,a,L.empty);if(!u||u.from!=i||u instanceof kt&&u.slice.size>=a-i)return!1;if(n){let c=e.tr.step(u);c.setSelection(U.create(c.doc,i)),n(c.scrollIntoView())}return!0}function Ms(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var U0=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=$0(r)}let s=i&&i.nodeBefore;return!s||!z.isSelectable(s)?!1:(t&&t(e.tr.setSelection(z.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function $0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Ww(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=Ww(e,n);if(!r)return!1;let o=q0(r);if(!o)return!1;let i=o.nodeAfter;if(Jw(e,o,t,1))return!0;if(r.parent.content.size==0&&(Ms(i,"start")||z.isSelectable(i))){let s=ma(e.doc,r.before(),r.after(),L.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof z,o;if(r){if(n.node.isTextblock||!pn(e.doc,n.from))return!1;o=n.from}else if(o=fi(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(z.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},Kw=(e,t)=>{let n=e.selection,r;if(n instanceof z){if(n.node.isTextblock||!pn(e.doc,n.to))return!1;r=n.to}else if(r=fi(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},Gw=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Ar(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},W0=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function j0(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=j0(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,s.createAndFill());a.setSelection(W.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},G0=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Ot||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=j0(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Qt(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ar(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function y6(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof z&&t.selection.node.isBlock)return!r.parentOffset||!Qt(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){a=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),l=j0(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let g=e&&e(o.parent,a,r);i.unshift(g||(a&&l?{type:l}:null)),s=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof U||t.selection instanceof Ot)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Qt(c.doc,d,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Qt(c.doc,d,i.length,i)),!f)return!1;if(c.split(d,i.length,i),!a&&u&&r.node(s).type!=l){let p=c.mapping.map(r.before(s)),h=c.doc.resolve(p);l&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,l)&&c.setNodeMarkup(c.mapping.map(r.before(s)),l)}return n&&n(c.scrollIntoView()),!0}}var x6=y6();var Yw=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(z.create(e.doc,o))),!0)},v6=(e,t)=>(t&&t(e.tr.setSelection(new Ot(e.doc))),!0);function k6(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||pn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Jw(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&k6(e,t,n))return!0;let u=!a&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,h=N.empty;for(let m=s.length-1;m>=0;m--)h=N.from(s[m].create(null,h));h=N.from(o.copy(h));let g=e.tr.step(new je(t.pos-1,p,t.pos,p,new L(h,1,0),s.length,!0)),b=g.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&pn(g.doc,b.pos)&&g.join(b.pos),n(g.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&a?null:W.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Ar(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&Ms(i,"start",!0)&&Ms(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let g=i,b=1;for(;!g.isTextblock;g=g.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let m=N.empty;for(let x=h.length-1;x>=0;x--)m=N.from(h[x].copy(m));let y=e.tr.step(new je(t.pos-h.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new L(m,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function Zw(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(U.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}var J0=Zw(-1),Z0=Zw(1);function Xw(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Ts(s,e,t);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function X0(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let a=s.resolve(t.start-2);i=new ci(a,a,t.depth),t.endIndex=0;c--)i=N.from(n[c].type.create(n[c].attrs,i));e.step(new je(t.start-(r?2:0),t.end,t.start,t.end,new L(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?S6(t,n,e,i):C6(t,n,i):!0:!1}}function S6(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);ig;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?N.empty:N.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new je(d-(l?1:0),f+(a?1:0),d+1,f-1,new L((l?N.empty:N.from(o.copy(N.empty))).append(a?N.empty:N.from(o.copy(N.empty))),l?0:1,a?0:1),l?0:1)),t(r.scrollIntoView()),!0}function t2(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=e)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=N.from(u?e.create():null),d=new L(N.from(e.create(null,N.from(l.type.create(null,c)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new je(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var ut=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Ls=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},ig=null,Mr=function(e,t,n){let r=ig||(ig=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},T6=function(){ig=null},vi=function(e,t,n,r){return n&&(n2(e,t,n,r,-1)||n2(e,t,n,r,1))},A6=/^(img|br|input|textarea|hr)$/i;function n2(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:mn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||_a(e)||A6.test(e.nodeName)||e.contentEditable=="false")return!1;t=ut(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?mn(e):0}else return!1}}function mn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function N6(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=mn(e)}else if(e.parentNode&&!_a(e))t=ut(e),e=e.parentNode;else return null}}function M6(e,t){for(;;){if(e.nodeType==3&&t2),hn=Ps||(Yn?/Mac/.test(Yn.platform):!1),B2=Yn?/Win/.test(Yn.platform):!1,Or=/Android \d/.test(Ao),Sa=!!r2&&"webkitFontSmoothing"in r2.documentElement.style,I6=Sa?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function L6(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Nr(e,t){return typeof e=="number"?e:e[t]}function P6(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function o2(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Ls(s);continue}let l=s,a=l==i.body,u=a?L6(i):P6(l),c=0,d=0;if(t.topu.bottom-Nr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Nr(o,"top")-u.top:t.bottom-u.bottom+Nr(o,"bottom")),t.leftu.right-Nr(r,"right")&&(c=t.right-u.right+Nr(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let p=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let g=l.scrollLeft-p,b=l.scrollTop-h;t={left:t.left-g,top:t.top-b,right:t.right-g,bottom:t.bottom-b}}let f=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:Ls(s)}}function B6(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:F2(e.dom)}}function F2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Ls(r));return t}function F6({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;z2(n,r==0?0:r-t)}function z2(e,t){for(let n=0;n=l){s=Math.max(h.bottom,s),l=Math.min(h.top,l);let g=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!a&&h.left<=t.left&&h.right>=t.left&&(a=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?U6(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:U2(n,o)}function U6(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let i=0;i=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function wg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function $6(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function V6(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let l=e.docView.nearestDesc(i,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&a.left>r.left||a.top>r.top?o=l.posBefore:(!s&&a.right-1?o:e.docView.posFromDOM(t,n,-1)}function $2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;Sa&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=V6(e,r,o,t))}l==null&&(l=H6(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function i2(e){return e.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,ba(wo(Mr(r,a,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return eg(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==mn(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Mr(a,mn(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return ba(wo(u,1),!1)}if(i==null&&o=0)}function ba(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function eg(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function V2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function j6(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return V2(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=H2(e,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Mr(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var K6=/[\u0590-\u08ac]/;function G6(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=e.domSelection();return l?!K6.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:V2(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:g}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var s2=null,l2=null,a2=!1;function Y6(e,t,n){return s2==t&&l2==n?a2:(s2=t,l2=n,a2=n=="up"||n=="down"?j6(e,t,n):G6(e,t,n))}var bn=0,u2=1,mi=2,Jn=3,ki=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=bn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nut(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof od){o=t-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof nd&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?ut(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=ut(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;ch&&sn){let h=l;l=a,a=h}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let l=r+i.border,a=s-i.border;if(t>=l&&n<=a){this.dirty=t==r||n==s?mi:u2,t==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jn:i.markDirty(t-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?mi:Jn}r=s}this.dirty=mi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?mi:u2;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==bn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},ug=class extends ki{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},Bs=class e extends ki{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Sr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Jn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Jn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=bn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=pg(i,0,t,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Sr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=j2(c,r,n),u?a=new cg(t,n,r,o,c,d||null,f,u,i,s+1):n.isText?new rd(t,n,r,o,c,f,i):new e(t,n,r,o,c,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>N.empty)}return t}matchesNode(t,n,r){return this.dirty==bn&&t.eq(this.node)&&id(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new fg(this,s&&s.node,t);Q6(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?ce.none:this.node.child(c).marks,r,t),a.placeWidget(u,t,o)},(u,c,d,f)=>{a.syncToMarks(u.marks,r,t);let p;a.findNodeMatch(u,c,d,f)||l&&t.state.selection.from>o&&t.state.selection.to-1&&a.updateNodeAt(u,c,d,p,t)||a.updateNextNode(u,c,d,t,f,o)||a.addNode(u,c,d,t,o),o+=u.nodeSize}),a.syncToMarks([],r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==mi)&&(s&&this.protectLocalComposition(t,s),q2(this.contentDOM,this.children,t),Ps&&e4(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof U)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,l=t4(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new ug(this,i,n,o);t.input.compositionNodes.push(s),this.children=pg(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Jn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=bn}updateOuterDeco(t){if(id(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=W2(this.dom,this.nodeDOM,dg(this.outerDeco,this.node,n),dg(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function c2(e,t,n,r,o){j2(r,t,e);let i=new To(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}var rd=class e extends To{constructor(t,n,r,o,i,s,l){super(t,n,r,o,i,null,s,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Jn||this.dirty!=bn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=bn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=bn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Jn)}get domAtom(){return!1}isText(t){return this.node.text==t}},od=class extends ki{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==bn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},cg=class extends To{constructor(t,n,r,o,i,s,l,a,u,c){super(t,n,r,o,i,s,l,u,c),this.spec=a}update(t,n,r,o){if(this.dirty==Jn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function q2(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Bs.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Bs)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function X6(e,t){return e.type.side-t.type.side}function Q6(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):l.slice();r(f,g,t.forChild(i,f),p),i=h}}function e4(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function t4(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let u=l=0&&u+t.length+l>=n)return l+u;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return-1}function pg(e,t,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=t?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function _g(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(fd(n)){for(a=s;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&z.isSelectable(d)&&o.parent&&!(d.isInline&&O6(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new z(s==f?l:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!K2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function r4(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,ut(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Ht&&Co<=11&&(n.disabled=!0,n.disabled=!1)}function G2(e,t){if(t instanceof z){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(m2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else m2(e)}function m2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Sg(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||U.between(t,n,r)}function g2(e){return e.editable&&!e.hasFocus()?!1:Y2(e)}function Y2(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function o4(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return vi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function hg(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&W.findFrom(i,t)}function _o(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function b2(e,t,n){let r=e.state.selection;if(r instanceof U)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return _o(e,new U(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=hg(e.state,t);return o&&o instanceof z?_o(e,o):!1}else if(!(hn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(l))&&!s.contentDOM?z.isSelectable(i)?_o(e,new z(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Sa?_o(e,new U(e.state.doc.resolve(t<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof z&&r.node.isInline)return _o(e,new U(t>0?r.$to:r.$from));{let o=hg(e.state,t);return o?_o(e,o):!1}}}function sd(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function xa(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Rs(e,t){return t<0?i4(e):s4(e)}function i4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(gn&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(xa(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(J2(n))break;{let l=n.previousSibling;for(;l&&xa(l,-1);)o=n.parentNode,i=ut(l),l=l.previousSibling;if(l)n=l,r=sd(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?mg(e,n,r):o&&mg(e,o,i)}function s4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=sd(n),i,s;for(;;)if(r{e.state==o&&Rr(e)},50)}function y2(e,t){let n=e.state.doc.resolve(t);if(!(et||B2)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function x2(e,t,n){let r=e.state.selection;if(r instanceof U&&!r.empty||n.indexOf("s")>-1||hn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=hg(e.state,t);if(s&&s instanceof z)return _o(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,l=r instanceof Ot?W.near(s,t):W.findFrom(s,t);return l?_o(e,l):!1}return!1}function v2(e,t){if(!(e.state.selection instanceof U))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function k2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function u4(e){if(!wt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;k2(e,r,"true"),setTimeout(()=>k2(e,r,"false"),20)}return!1}function c4(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function d4(e,t){let n=t.keyCode,r=c4(t);if(n==8||hn&&n==72&&r=="c")return v2(e,-1)||Rs(e,-1);if(n==46&&!t.shiftKey||hn&&n==68&&r=="c")return v2(e,1)||Rs(e,1);if(n==13||n==27)return!0;if(n==37||hn&&n==66&&r=="c"){let o=n==37?y2(e,e.state.selection.from)=="ltr"?-1:1:-1;return b2(e,o,r)||Rs(e,o)}else if(n==39||hn&&n==70&&r=="c"){let o=n==39?y2(e,e.state.selection.from)=="ltr"?1:-1:1;return b2(e,o,r)||Rs(e,o)}else{if(n==38||hn&&n==80&&r=="c")return x2(e,-1,r)||Rs(e,-1);if(n==40||hn&&n==78&&r=="c")return u4(e)||x2(e,1,r)||Rs(e,1);if(r==(hn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Cg(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Sr.fromSchema(e.state.schema),l=n_(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=t_[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` -`);return{dom:a,text:f,slice:t}}function Y2(e,t,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!t)return null;let a=!!t&&(r||i||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return l=new L(N.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)l=d;else{let f=o.marks(),{schema:p}=e.state,h=Sr.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=g4(n),Sa&&b4(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||fn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!p4.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=y4(v2(l,+c[1],+c[2]),c[4]);else if(l=L.maxOpen(h4(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d{l=d(l,e,a)}),l}var p4=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function h4(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&Z2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=X2(s[s.length-1],i.length));let c=J2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return N.from(s)}return e}function J2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,N.from(e));return e}function Z2(e,t,n,r,o){if(o1&&(i=0),o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function v2(e,t,n){return tn})),tg.createHTML(e)):e}function g4(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=e_().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&Q2[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=m4(e),o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=N.from(a.create(r[l+1],o)),i++,s++}return new L(o,i,s)}var Rt={},Dt={},x4={touchstart:!0,touchmove:!0},gg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function v4(e){for(let t in Rt){let n=Rt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{E4(e,r)&&!Cg(e,r)&&(e.editable||!(r.type in Dt))&&n(e,r)},x4[t]?{passive:!0}:void 0)}wt&&e.dom.addEventListener("input",()=>null),bg(e)}function So(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function k4(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function bg(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Cg(e,r))})}function Cg(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function E4(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function w4(e,t){!Cg(e,t)&&Rt[t.type]&&(e.editable||!(t.type in Dt))&&Rt[t.type](e,t)}Dt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!n_(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Or&&et&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ps&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,hi(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||f4(e,n)?n.preventDefault():So(e,"key")};Dt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Dt.keypress=(e,t)=>{let n=t;if(n_(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||hn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof U)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function pd(e){return{left:e.clientX,top:e.clientY}}function _4(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Tg(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,l=>s>i.depth?l(e,n,i.nodeAfter,i.before(s),o,!0):l(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Is(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function S4(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&z.isSelectable(r)?(Is(e,new z(n),"pointer"),!0):!1}function C4(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof z&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(z.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Is(e,z.create(e.state.doc,o),"pointer"),!0):!1}function T4(e,t,n,r,o){return Tg(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?C4(e,n):S4(e,n))}function A4(e,t,n,r){return Tg(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function N4(e,t,n,r){return Tg(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||M4(e,n,r)}function M4(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Is(e,U.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)Is(e,U.create(r,l+1,l+1+s.content.size),"pointer");else if(z.isSelectable(s))Is(e,z.create(r,l),"pointer");else continue;return!0}}function Ag(e){return ld(e)}var t_=hn?"metaKey":"ctrlKey";Rt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Ag(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&_4(n,e.input.lastClick)&&!n[t_]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(pd(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new yg(e,s,n,!!r)):(i=="doubleClick"?A4:N4)(e,s.pos,s.inside,n)?n.preventDefault():So(e,"pointer"))};var yg=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[t_],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}let l=o?null:r.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof z&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),So(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Rr(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(pd(t))),this.updateAllowDefault(t),this.allowDefault||!n?So(this.view,"pointer"):T4(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||wt&&this.mightDrag&&!this.mightDrag.node.isAtom||et&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Is(this.view,W.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):So(this.view,"pointer")}move(t){this.updateAllowDefault(t),So(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Rt.touchstart=e=>{e.input.lastTouch=Date.now(),Ag(e),So(e,"pointer")};Rt.touchmove=e=>{e.input.lastTouch=Date.now(),So(e,"pointer")};Rt.contextmenu=e=>Ag(e);function n_(e,t){return e.composing?!0:wt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var O4=Or?5e3:-1;Dt.compositionstart=Dt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof U&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||et&&L2&&R4(e)))e.markCursor=e.state.storedMarks||n.marks(),ld(e,!0),e.markCursor=null;else if(ld(e,!t.selection.empty),gn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=e.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}r_(e,O4)};function R4(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Dt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,r_(e,20))};function r_(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ld(e),t))}function o_(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=I4());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function D4(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=M6(t.focusNode,t.focusOffset),r=O6(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function I4(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function ld(e,t=!1){if(!(Or&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),o_(e),t||e.docView&&e.docView.dirty){let n=wg(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function L4(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var va=Ht&&Co<15||Ps&&L6<604;Rt.copy=Dt.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=va?null:n.clipboardData,s=r.content(),{dom:l,text:a}=Sg(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):L4(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function P4(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function B4(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ka(e,r.value,null,o,t):ka(e,r.textContent,r.innerHTML,o,t)},50)}function ka(e,t,n,r,o){let i=Y2(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,o,i||L.empty)))return!0;if(!i)return!1;let s=P4(i),l=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function i_(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Dt.paste=(e,t)=>{let n=t;if(e.composing&&!Or)return;let r=va?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ka(e,i_(r),r.getData("text/html"),o,n)?n.preventDefault():B4(e,n)};var ad=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},F4=hn?"altKey":"ctrlKey";function s_(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[F4]}Rt.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(pd(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof z?o.to-1:o.to))){if(r&&r.mightDrag)s=z.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=z.create(e.state.doc,d.posBefore))}}let l=(s||e.state.selection).content(),{dom:a,text:u,slice:c}=Sg(e,l);(!n.dataTransfer.files.length||!et||I2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(va?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",va||n.dataTransfer.setData("text/plain",u),e.dragging=new ad(c,s_(e,n),s)};Rt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Dt.dragover=Dt.dragenter=(e,t)=>t.preventDefault();Dt.drop=(e,t)=>{try{z4(e,t,e.dragging)}finally{e.dragging=null}};function z4(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(pd(t));if(!r)return;let o=e.state.doc.resolve(r.pos),i=n&&n.slice;i?e.someProp("transformPasted",p=>{i=p(i,e,!1)}):i=Y2(e,i_(t.dataTransfer),va?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&s_(e,t));if(e.someProp("handleDrop",p=>p(e,t,i||L.empty,s))){t.preventDefault();return}if(!i)return;t.preventDefault();let l=i?Zc(e.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let a=e.state.tr;if(s){let{node:p}=n;p?p.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,i.content.firstChild):a.replaceRange(u,u,i),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&z.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new z(f));else{let p=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),a.setSelection(_g(e,f,a.doc.resolve(p)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}Rt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Rr(e)},20))};Rt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Rt.beforeinput=(e,t)=>{if(et&&Or&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,hi(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Dt)Rt[e]=Dt[e];function Ea(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var ud=class e{constructor(t,n){this.toDOM=t,this.spec=n||yi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Oe(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ea(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},bi=class e{constructor(t,n){this.attrs=t,this.spec=n||yi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Oe(i,s,this)}valid(t,n){return n.from=t&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;st){let l=this.children[s]+1;this.children[s+2].findInner(t-l,n-l,r,o+l,i)}}map(t,n,r){return this==Et||t.maps.length==0?this:this.mapInner(t,n,0,0,r||yi)}mapInner(t,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=a_(n,l,u)){for(o||(o=this.children.slice());il&&d.to=t){this.children[l]==t&&(r=this.children[l+2]);break}let i=t+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof bi){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(t,n,yi));return e.from(r)}forChild(t,n){if(n.isLeaf)return xe.empty;let r=[];for(let o=0;on instanceof xe)?t:t.reduce((n,r)=>n.concat(r instanceof xe?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-h-(p-f);for(let g=0;gy+c-d)continue;let x=l[g]+c-d;p>=x?l[g+1]=f<=x?-2:-1:f>=c&&b&&(l[g]+=b,l[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=l[u+2].mapInner(n,b,c+1,e[u]+i+1,s);g!=Et?(l[u]=d,l[u+1]=p,l[u+2]=g):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=$4(l,e,t,n,o,i,s),c=dd(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=a_(e,l,a+n);if(u){i=!0;let c=dd(u,l,n+a+1,r);c!=Et&&o.push(a,a+l.nodeSize,c)}});let s=l_(i?u_(e):e,-n).sort(xi);for(let l=0;l0;)t++;e.splice(t,0,n)}function ng(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Et&&t.push(r)}),e.cursorWrapper&&t.push(xe.create(e.state.doc,[e.cursorWrapper.deco])),cd.from(t)}var H4={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},q4=Ht&&Co<=11,vg=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},kg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new vg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),q4&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,H4)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(h2(this.view)){if(this.suppressingSelectionUpdates)return Rr(this.view);if(Ht&&Co<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&vi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Ls(i))n.add(i);for(let i=t.anchorNode;i;i=Ls(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&h2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||j4(t,d)!=p)&&f.remove()}}}else if((et||wt)&&a.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of a)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),V4(t)),this.handleDOMChange(i,s,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Rr(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let g=r.childNodes[b-1],y=g.pmViewDesc;if(g.nodeName=="BR"&&!y){i=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||fn.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:G4,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+s,head:g+s}}return{doc:m,sel:h,from:s,to:l}}function G4(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(wt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||wt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Y4=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function J4(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let w=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,_=wg(e,w);if(_&&!e.state.selection.eq(_)){if(et&&Or&&e.input.lastKeyCode===13&&Date.now()-100T(e,hi(13,"Enter"))))return;let A=e.state.tr.setSelection(_);w=="pointer"?A.setMeta("pointer",!0):w=="key"&&A.scrollIntoView(),i&&A.setMeta("composition",i),e.dispatch(A)}return}let s=e.state.doc.resolve(t),l=s.sharedDepth(n);t=s.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=K4(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Or)&&o.some(w=>w.nodeType==1&&!Y4.test(w.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",w=>w(e,hi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&a instanceof U&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let w=C2(e,e.state.doc,u.sel);if(w&&!w.eq(e.state.selection)){let _=e.state.tr.setSelection(w);i&&_.setMeta("composition",i),e.dispatch(_)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Ht&&Co<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),y=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if((Ps&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!y&&m.posw(e,hi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&X4(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",w=>w(e,hi(8,"Backspace")))){Or&&et&&e.domObserver.suppressSelectionUpdates();return}et&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),Or&&!y&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(w){return w(e,hi(13,"Enter"))})},20));let x=h.start,v=h.endA,k=w=>{let _=w||e.state.tr.replace(x,v,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let A=C2(e,_.doc,u.sel);A&&!(et&&e.composing&&A.empty&&(h.start!=h.endB||e.input.lastChromeDeleteRr(e),20));let w=k(e.state.tr.delete(x,v)),_=c.resolve(h.start).marksAcross(c.resolve(h.endA));_&&w.ensureMarks(_),e.dispatch(w)}else if(h.endA==h.endB&&(E=Z4(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let w=k(e.state.tr);E.type=="add"?w.addMark(x,v,E.mark):w.removeMark(x,v,E.mark),e.dispatch(w)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let w=m.parent.textBetween(m.parentOffset,b.parentOffset),_=()=>k(e.state.tr.insertText(w,x,v));e.someProp("handleTextInput",A=>A(e,x,v,w,_))||e.dispatch(_())}else e.dispatch(k());else e.dispatch(k())}function C2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_g(e,t.resolve(n.anchor),t.resolve(n.head))}function Z4(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||rg(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function Q4(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,i&&i=l?i-r:0;i-=a,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}var wa=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new gg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(R2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=M2(this),N2(this),this.nodeViews=O2(this),this.docView=a2(this.state.doc,A2(this),ng(this),this.dom,this),this.domObserver=new kg(this,(r,o,i,s)=>J4(this,r,o,i,s)),this.domObserver.start(),v4(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&bg(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(R2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(o_(this),s=!0),this.state=t;let l=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=O2(this);tI(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&bg(this),this.editable=M2(this),N2(this);let a=ng(this),u=A2(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,u,a);(d||!t.selection.eq(o.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&F6(this);if(s){this.domObserver.stop();let p=d&&(Ht||et)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&eI(o.selection,t.selection);if(d){let h=et?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=D4(this)),(i||!this.docView.update(t.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=a2(t.doc,u,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&i4(this))?Rr(this,p):(j2(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&z6(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&n2(this,n.getBoundingClientRect(),t)}else n2(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new ad(t.slice,t.move,o<0?void 0:z.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return W6(this,t)}coordsAtPos(t,n=1){return U2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return J6(this,n||this.state,t)}pasteHTML(t,n){return ka(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ka(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Sg(this,t)}destroy(){this.docView&&(k4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ng(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,A6())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return w4(this,t)}domSelectionRange(){let t=this.domSelection();return t?wt&&this.root.nodeType===11&&D6(this.dom.ownerDocument)==this.dom&&W4(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};wa.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function A2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Oe.node(0,e.state.doc.content.size,t)]}function N2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Oe.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function M2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function eI(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function O2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function tI(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function R2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Dr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},md={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},nI=typeof navigator<"u"&&/Mac/.test(navigator.platform),rI=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ke=0;Ke<10;Ke++)Dr[48+Ke]=Dr[96+Ke]=String(Ke);var Ke;for(Ke=1;Ke<=24;Ke++)Dr[Ke+111]="F"+Ke;var Ke;for(Ke=65;Ke<=90;Ke++)Dr[Ke]=String.fromCharCode(Ke+32),md[Ke]=String.fromCharCode(Ke);var Ke;for(hd in Dr)md.hasOwnProperty(hd)||(md[hd]=Dr[hd]);var hd;function c_(e){var t=nI&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||rI&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?md:Dr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var oI=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),iI=typeof navigator<"u"&&/Win/.test(navigator.platform);function sI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l{for(var n in t)aI(e,n,{get:t[n],enumerable:!0})};function Ed(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var wd=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...u)=>{let c=l(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!e,a=e||o.tr,u=()=>(!l&&t&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(a,t),b=f(...h)(m);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...u)=>a(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:Ed({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,a])=>[l,(...u)=>a(...u)(s)]))}};return s}},v_={};Pg(v_,{blur:()=>uI,clearContent:()=>cI,clearNodes:()=>dI,command:()=>fI,createParagraphNear:()=>pI,cut:()=>hI,deleteCurrentNode:()=>mI,deleteNode:()=>gI,deleteRange:()=>bI,deleteSelection:()=>yI,enter:()=>xI,exitCode:()=>vI,extendMarkRange:()=>kI,first:()=>EI,focus:()=>wI,forEach:()=>_I,insertContent:()=>SI,insertContentAt:()=>AI,joinBackward:()=>OI,joinDown:()=>MI,joinForward:()=>RI,joinItemBackward:()=>DI,joinItemForward:()=>II,joinTextblockBackward:()=>LI,joinTextblockForward:()=>PI,joinUp:()=>NI,keyboardShortcut:()=>FI,lift:()=>zI,liftEmptyBlock:()=>UI,liftListItem:()=>$I,newlineInCode:()=>HI,resetAttributes:()=>qI,scrollIntoView:()=>VI,selectAll:()=>WI,selectNodeBackward:()=>jI,selectNodeForward:()=>KI,selectParentNode:()=>GI,selectTextblockEnd:()=>YI,selectTextblockStart:()=>JI,setContent:()=>ZI,setMark:()=>dL,setMeta:()=>fL,setNode:()=>pL,setNodeSelection:()=>hL,setTextDirection:()=>mL,setTextSelection:()=>gL,sinkListItem:()=>bL,splitBlock:()=>yL,splitListItem:()=>xL,toggleList:()=>vL,toggleMark:()=>kL,toggleNode:()=>EL,toggleWrap:()=>wL,undoInputRule:()=>_L,unsetAllMarks:()=>SL,unsetMark:()=>CL,unsetTextDirection:()=>TL,updateAttributes:()=>AL,wrapIn:()=>NL,wrapInList:()=>ML});var uI=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),cI=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),dI=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(a)),f=u.resolve(c.map(a+l.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Ar(p);if(l.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},fI=e=>t=>e(t),pI=()=>({state:e,dispatch:t})=>K0(e,t),hI=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new U(r.doc.resolve(Math.max(s-1,0)))),!0},mI=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){let l=o.before(i),a=o.after(i);e.delete(l,a).scrollIntoView()}return!0}return!1};function ze(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var gI=e=>({tr:t,state:n,dispatch:r})=>{let o=ze(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let a=i.before(s),u=i.after(s);t.delete(a,u).scrollIntoView()}return!0}return!1},bI=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},yI=()=>({state:e,dispatch:t})=>td(e,t),xI=()=>({commands:e})=>e.keyboardShortcut("Enter"),vI=()=>({state:e,dispatch:t})=>j0(e,t);function Bg(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function kd(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:Bg(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function k_(e,t,n={}){return e.find(r=>r.type===t&&kd(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function f_(e,t,n={}){return!!k_(e,t,n)}function Fg(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!k_([...o.node.marks],t,n)))return;let s=o.index,l=e.start()+o.offset,a=s+1,u=l+o.node.nodeSize;for(;s>0&&f_([...e.parent.child(s-1).marks],t,n);)s-=1,l-=e.parent.child(s).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{let i=Lr(e,r.schema),{doc:s,selection:l}=n,{$from:a,from:u,to:c}=l;if(o){let d=Fg(a,i,t);if(d&&d.from<=u&&d.to>=c){let f=U.create(s,d.from,d.to);n.setSelection(f)}}return!0},EI=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};let s=()=>{(Sd()||w_())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!_d(n.state.selection))return s(),!0;let l=E_(o.doc,e)||n.state.selection,a=n.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},_I=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),SI=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),__=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&__(r)}return e};function gd(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return __(n)}function Ta(e,t,n){if(e instanceof $t||e instanceof N)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return N.fromArray(e.map(l=>t.nodeFromJSON(l)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return Ta("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="",a=new vo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?fn.fromSchema(a).parseSlice(gd(e),n.parseOptions):fn.fromSchema(a).parse(gd(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let i=fn.fromSchema(t);return n.slice?i.parseSlice(gd(e),n.parseOptions).content:i.parse(gd(e),n.parseOptions)}return Ta("",t,n)}function CI(e,t,n){let r=e.steps.length-1;if(r{s===0&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var TI=e=>!("type"in e),AI=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l,a=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Ta(t,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){a(b)}try{l=Ta(t,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return a(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((TI(l)?l:[l]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof N){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else{m=l;let b=r.doc.resolve(c),g=b.node(),y=b.parentOffset===0,x=g.isText||g.isTextblock,v=g.content.size>0;y&&x&&v&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&CI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},NI=()=>({state:e,dispatch:t})=>Vw(e,t),MI=()=>({state:e,dispatch:t})=>Ww(e,t),OI=()=>({state:e,dispatch:t})=>F0(e,t),RI=()=>({state:e,dispatch:t})=>$0(e,t),DI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=fi(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},II=()=>({state:e,dispatch:t,tr:n})=>{try{let r=fi(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},LI=()=>({state:e,dispatch:t})=>Uw(e,t),PI=()=>({state:e,dispatch:t})=>$w(e,t);function S_(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function BI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l({editor:t,view:n,tr:r,dispatch:o})=>{let i=BI(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function Zn(e,t,n={}){let{from:r,to:o,empty:i}=e.selection,s=t?ze(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);l.push({node:d,from:p,to:h})});let a=o-r,u=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>kd(d.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=a}var zI=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Zn(n,o,t)?jw(n,r):!1},UI=()=>({state:e,dispatch:t})=>G0(e,t),$I=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return Xw(r)(t,n)},HI=()=>({state:e,dispatch:t})=>V0(e,t);function Cd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function p_(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var qI=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=Cd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Lr(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{i&&i===c.type&&(a=!0,o&&n.setNodeMarkup(d,void 0,p_(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(a=!0,o&&n.addMark(d,d+c.nodeSize,s.create(p_(f.attrs,t))))})})}),a},VI=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),WI=()=>({tr:e,dispatch:t})=>{if(t){let n=new Ot(e.doc);e.setSelection(n)}return!0},jI=()=>({state:e,dispatch:t})=>z0(e,t),KI=()=>({state:e,dispatch:t})=>H0(e,t),GI=()=>({state:e,dispatch:t})=>Kw(e,t),YI=()=>({state:e,dispatch:t})=>J0(e,t),JI=()=>({state:e,dispatch:t})=>Y0(e,t);function Ig(e,t,n={},r={}){return Ta(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var ZI=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{let{doc:a}=i;if(r.preserveWhitespace!=="full"){let u=Ig(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:a.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function C_(e,t){let n=Lr(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function zg(e,t){let n=new ko(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function XI(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function T_(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Ug(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Ad(e){return t=>Ug(t.$from,e)}function j(e,t,n){return e.config[t]===void 0&&e.parent?j(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?j(e.parent,t,n):null}):e.config[t]}function $g(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=j(t,"addExtensions",n);return r?[t,...$g(r())]:t}).flat(10)}function $s(e,t){let n=Sr.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function A_(e){return typeof e=="function"}function he(e,t=void 0,...n){return A_(e)?t?e.bind(t)(...n):e(...n):e}function QI(e={}){return Object.keys(e).length===0&&e.constructor===Object}function zs(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function N_(e){let t=[],{nodeExtensions:n,markExtensions:r}=zs(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage,extensions:o},a=j(s,"addGlobalAttributes",l);if(!a)return;a().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage},a=j(s,"addAttributes",l);if(!a)return;let u=a();Object.entries(u).forEach(([c,d])=>{let f={...i,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:s.name,name:c,attribute:f})})}),t}function ne(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let l=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(c=>!a.includes(c));r[o]=[...a,...u].join(" ")}else if(o==="style"){let l=i?i.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;a.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function Us(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>ne(n,r),{})}function eL(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function h_(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((i,s)=>{let l=s.attribute.parseHTML?s.attribute.parseHTML(n):eL(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function m_(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&QI(n)?!1:n!=null))}function g_(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function tL(e,t){var n;let r=N_(e),{nodeExtensions:o,markExtensions:i}=zs(e),s=(n=o.find(u=>j(u,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,y)=>{let x=j(y,"extendNodeSchema",d);return{...g,...x?x(u):{}}},{}),p=m_({...f,content:he(j(u,"content",d)),marks:he(j(u,"marks",d)),group:he(j(u,"group",d)),inline:he(j(u,"inline",d)),atom:he(j(u,"atom",d)),selectable:he(j(u,"selectable",d)),draggable:he(j(u,"draggable",d)),code:he(j(u,"code",d)),whitespace:he(j(u,"whitespace",d)),linebreakReplacement:he(j(u,"linebreakReplacement",d)),defining:he(j(u,"defining",d)),isolating:he(j(u,"isolating",d)),attrs:Object.fromEntries(c.map(g_))}),h=he(j(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>h_(g,c)));let m=j(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:Us(g,c)}));let b=j(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),a=Object.fromEntries(i.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let y=j(g,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=m_({...f,inclusive:he(j(u,"inclusive",d)),excludes:he(j(u,"excludes",d)),group:he(j(u,"group",d)),spanning:he(j(u,"spanning",d)),code:he(j(u,"code",d)),attrs:Object.fromEntries(c.map(g_))}),h=he(j(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>h_(b,c)));let m=j(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:Us(b,c)})),[u.name,p]}));return new vo({topNode:s,nodes:l,marks:a})}function nL(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Hg(e){return e.sort((n,r)=>{let o=j(n,"priority")||100,i=j(r,"priority")||100;return o>i?-1:or.name)).length,t}function O_(e,t,n){let{from:r,to:o}=t,{blockSeparator:i=` +`);return{dom:a,text:f,slice:t}}function Z2(e,t,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!t)return null;let a=!!t&&(r||i||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return l=new L(N.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)l=d;else{let f=o.marks(),{schema:p}=e.state,h=Sr.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(g=>{let b=s.appendChild(document.createElement("p"));g&&b.appendChild(h.serializeNode(p.text(g,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=m4(n),Sa&&g4(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||fn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!f4.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=b4(E2(l,+c[1],+c[2]),c[4]);else if(l=L.maxOpen(p4(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d{l=d(l,e,a)}),l}var f4=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function p4(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&Q2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=e_(s[s.length-1],i.length));let c=X2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return N.from(s)}return e}function X2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,N.from(e));return e}function Q2(e,t,n,r,o){if(o1&&(i=0),o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function E2(e,t,n){return tn})),ng.createHTML(e)):e}function m4(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=n_().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&t_[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=h4(e),o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=N.from(a.create(r[l+1],o)),i++,s++}return new L(o,i,s)}var Rt={},Dt={},y4={touchstart:!0,touchmove:!0},bg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function x4(e){for(let t in Rt){let n=Rt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{k4(e,r)&&!Tg(e,r)&&(e.editable||!(r.type in Dt))&&n(e,r)},y4[t]?{passive:!0}:void 0)}wt&&e.dom.addEventListener("input",()=>null),yg(e)}function So(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function v4(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function yg(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Tg(e,r))})}function Tg(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function k4(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function E4(e,t){!Tg(e,t)&&Rt[t.type]&&(e.editable||!(t.type in Dt))&&Rt[t.type](e,t)}Dt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!o_(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Or&&et&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ps&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,hi(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||d4(e,n)?n.preventDefault():So(e,"key")};Dt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Dt.keypress=(e,t)=>{let n=t;if(o_(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||hn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof U)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function pd(e){return{left:e.clientX,top:e.clientY}}function w4(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Ag(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,l=>s>i.depth?l(e,n,i.nodeAfter,i.before(s),o,!0):l(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Is(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function _4(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&z.isSelectable(r)?(Is(e,new z(n),"pointer"),!0):!1}function S4(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof z&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(z.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Is(e,z.create(e.state.doc,o),"pointer"),!0):!1}function C4(e,t,n,r,o){return Ag(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?S4(e,n):_4(e,n))}function T4(e,t,n,r){return Ag(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function A4(e,t,n,r){return Ag(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||N4(e,n,r)}function N4(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Is(e,U.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)Is(e,U.create(r,l+1,l+1+s.content.size),"pointer");else if(z.isSelectable(s))Is(e,z.create(r,l),"pointer");else continue;return!0}}function Ng(e){return ld(e)}var r_=hn?"metaKey":"ctrlKey";Rt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Ng(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&w4(n,e.input.lastClick)&&!n[r_]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(pd(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new xg(e,s,n,!!r)):(i=="doubleClick"?T4:A4)(e,s.pos,s.inside,n)?n.preventDefault():So(e,"pointer"))};var xg=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[r_],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}let l=o?null:r.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof z&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),So(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Rr(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(pd(t))),this.updateAllowDefault(t),this.allowDefault||!n?So(this.view,"pointer"):C4(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||wt&&this.mightDrag&&!this.mightDrag.node.isAtom||et&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Is(this.view,W.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):So(this.view,"pointer")}move(t){this.updateAllowDefault(t),So(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Rt.touchstart=e=>{e.input.lastTouch=Date.now(),Ng(e),So(e,"pointer")};Rt.touchmove=e=>{e.input.lastTouch=Date.now(),So(e,"pointer")};Rt.contextmenu=e=>Ng(e);function o_(e,t){return e.composing?!0:wt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var M4=Or?5e3:-1;Dt.compositionstart=Dt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof U&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||et&&B2&&O4(e)))e.markCursor=e.state.storedMarks||n.marks(),ld(e,!0),e.markCursor=null;else if(ld(e,!t.selection.empty),gn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=e.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}i_(e,M4)};function O4(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Dt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,i_(e,20))};function i_(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ld(e),t))}function s_(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=D4());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function R4(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=N6(t.focusNode,t.focusOffset),r=M6(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function D4(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function ld(e,t=!1){if(!(Or&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),s_(e),t||e.docView&&e.docView.dirty){let n=_g(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function I4(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var va=Ht&&Co<15||Ps&&I6<604;Rt.copy=Dt.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=va?null:n.clipboardData,s=r.content(),{dom:l,text:a}=Cg(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):I4(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function L4(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function P4(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ka(e,r.value,null,o,t):ka(e,r.textContent,r.innerHTML,o,t)},50)}function ka(e,t,n,r,o){let i=Z2(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,o,i||L.empty)))return!0;if(!i)return!1;let s=L4(i),l=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function l_(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Dt.paste=(e,t)=>{let n=t;if(e.composing&&!Or)return;let r=va?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ka(e,l_(r),r.getData("text/html"),o,n)?n.preventDefault():P4(e,n)};var ad=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},B4=hn?"altKey":"ctrlKey";function a_(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[B4]}Rt.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(pd(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof z?o.to-1:o.to))){if(r&&r.mightDrag)s=z.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=z.create(e.state.doc,d.posBefore))}}let l=(s||e.state.selection).content(),{dom:a,text:u,slice:c}=Cg(e,l);(!n.dataTransfer.files.length||!et||P2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(va?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",va||n.dataTransfer.setData("text/plain",u),e.dragging=new ad(c,a_(e,n),s)};Rt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Dt.dragover=Dt.dragenter=(e,t)=>t.preventDefault();Dt.drop=(e,t)=>{try{F4(e,t,e.dragging)}finally{e.dragging=null}};function F4(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(pd(t));if(!r)return;let o=e.state.doc.resolve(r.pos),i=n&&n.slice;i?e.someProp("transformPasted",p=>{i=p(i,e,!1)}):i=Z2(e,l_(t.dataTransfer),va?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&a_(e,t));if(e.someProp("handleDrop",p=>p(e,t,i||L.empty,s))){t.preventDefault();return}if(!i)return;t.preventDefault();let l=i?Zc(e.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let a=e.state.tr;if(s){let{node:p}=n;p?p.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,i.content.firstChild):a.replaceRange(u,u,i),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&z.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new z(f));else{let p=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((h,g,b,m)=>p=m),a.setSelection(Sg(e,f,a.doc.resolve(p)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}Rt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Rr(e)},20))};Rt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Rt.beforeinput=(e,t)=>{if(et&&Or&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,hi(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Dt)Rt[e]=Dt[e];function Ea(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var ud=class e{constructor(t,n){this.toDOM=t,this.spec=n||yi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Oe(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ea(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},bi=class e{constructor(t,n){this.attrs=t,this.spec=n||yi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Oe(i,s,this)}valid(t,n){return n.from=t&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;st){let l=this.children[s]+1;this.children[s+2].findInner(t-l,n-l,r,o+l,i)}}map(t,n,r){return this==Et||t.maps.length==0?this:this.mapInner(t,n,0,0,r||yi)}mapInner(t,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=c_(n,l,u)){for(o||(o=this.children.slice());il&&d.to=t){this.children[l]==t&&(r=this.children[l+2]);break}let i=t+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof bi){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(t,n,yi));return e.from(r)}forChild(t,n){if(n.isLeaf)return xe.empty;let r=[];for(let o=0;on instanceof xe)?t:t.reduce((n,r)=>n.concat(r instanceof xe?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=g-h-(p-f);for(let m=0;my+c-d)continue;let x=l[m]+c-d;p>=x?l[m+1]=f<=x?-2:-1:f>=c&&b&&(l[m]+=b,l[m+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-o,{index:h,offset:g}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&g==d&&g+b.nodeSize==p){let m=l[u+2].mapInner(n,b,c+1,e[u]+i+1,s);m!=Et?(l[u]=d,l[u+1]=p,l[u+2]=m):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=U4(l,e,t,n,o,i,s),c=dd(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=c_(e,l,a+n);if(u){i=!0;let c=dd(u,l,n+a+1,r);c!=Et&&o.push(a,a+l.nodeSize,c)}});let s=u_(i?d_(e):e,-n).sort(xi);for(let l=0;l0;)t++;e.splice(t,0,n)}function rg(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Et&&t.push(r)}),e.cursorWrapper&&t.push(xe.create(e.state.doc,[e.cursorWrapper.deco])),cd.from(t)}var $4={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},H4=Ht&&Co<=11,kg=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},Eg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new kg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),H4&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,$4)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(g2(this.view)){if(this.suppressingSelectionUpdates)return Rr(this.view);if(Ht&&Co<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&vi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Ls(i))n.add(i);for(let i=t.anchorNode;i;i=Ls(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&g2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||W4(t,d)!=p)&&f.remove()}}}else if((et||wt)&&a.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of a)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),V4(t)),this.handleDOMChange(i,s,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Rr(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let m=r.childNodes[b-1],y=m.pmViewDesc;if(m.nodeName=="BR"&&!y){i=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||fn.fromSchema(e.state.schema),p=d.resolve(s),h=null,g=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:K4,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,m=u[1]&&u[1].pos;m==null&&(m=b),h={anchor:b+s,head:m+s}}return{doc:g,sel:h,from:s,to:l}}function K4(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(wt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||wt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var G4=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Y4(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let w=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,_=_g(e,w);if(_&&!e.state.selection.eq(_)){if(et&&Or&&e.input.lastKeyCode===13&&Date.now()-100T(e,hi(13,"Enter"))))return;let A=e.state.tr.setSelection(_);w=="pointer"?A.setMeta("pointer",!0):w=="key"&&A.scrollIntoView(),i&&A.setMeta("composition",i),e.dispatch(A)}return}let s=e.state.doc.resolve(t),l=s.sharedDepth(n);t=s.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=j4(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Or)&&o.some(w=>w.nodeType==1&&!G4.test(w.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",w=>w(e,hi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&a instanceof U&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let w=A2(e,e.state.doc,u.sel);if(w&&!w.eq(e.state.selection)){let _=e.state.tr.setSelection(w);i&&_.setMeta("composition",i),e.dispatch(_)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Ht&&Co<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let g=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),m=c.resolve(h.start),y=g.sameParent(b)&&g.parent.inlineContent&&m.end()>=h.endA;if((Ps&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!y&&g.posw(e,hi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&Z4(c,h.start,h.endA,g,b)&&e.someProp("handleKeyDown",w=>w(e,hi(8,"Backspace")))){Or&&et&&e.domObserver.suppressSelectionUpdates();return}et&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),Or&&!y&&g.start()!=b.start()&&b.parentOffset==0&&g.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(w){return w(e,hi(13,"Enter"))})},20));let x=h.start,v=h.endA,k=w=>{let _=w||e.state.tr.replace(x,v,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let A=A2(e,_.doc,u.sel);A&&!(et&&e.composing&&A.empty&&(h.start!=h.endB||e.input.lastChromeDeleteRr(e),20));let w=k(e.state.tr.delete(x,v)),_=c.resolve(h.start).marksAcross(c.resolve(h.endA));_&&w.ensureMarks(_),e.dispatch(w)}else if(h.endA==h.endB&&(E=J4(g.parent.content.cut(g.parentOffset,b.parentOffset),m.parent.content.cut(m.parentOffset,h.endA-m.start())))){let w=k(e.state.tr);E.type=="add"?w.addMark(x,v,E.mark):w.removeMark(x,v,E.mark),e.dispatch(w)}else if(g.parent.child(g.index()).isText&&g.index()==b.index()-(b.textOffset?0:1)){let w=g.parent.textBetween(g.parentOffset,b.parentOffset),_=()=>k(e.state.tr.insertText(w,x,v));e.someProp("handleTextInput",A=>A(e,x,v,w,_))||e.dispatch(_())}else e.dispatch(k());else e.dispatch(k())}function A2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Sg(e,t.resolve(n.anchor),t.resolve(n.head))}function J4(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||og(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function X4(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,i&&i=l?i-r:0;i-=a,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}var wa=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new bg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(I2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=R2(this),O2(this),this.nodeViews=D2(this),this.docView=c2(this.state.doc,M2(this),rg(this),this.dom,this),this.domObserver=new Eg(this,(r,o,i,s)=>Y4(this,r,o,i,s)),this.domObserver.start(),x4(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&yg(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(I2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(s_(this),s=!0),this.state=t;let l=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=D2(this);eI(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&yg(this),this.editable=R2(this),O2(this);let a=rg(this),u=M2(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,u,a);(d||!t.selection.eq(o.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&B6(this);if(s){this.domObserver.stop();let p=d&&(Ht||et)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&Q4(o.selection,t.selection);if(d){let h=et?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=R4(this)),(i||!this.docView.update(t.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=c2(t.doc,u,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&o4(this))?Rr(this,p):(G2(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&F6(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&o2(this,n.getBoundingClientRect(),t)}else o2(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new ad(t.slice,t.move,o<0?void 0:z.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return q6(this,t)}coordsAtPos(t,n=1){return H2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return Y6(this,n||this.state,t)}pasteHTML(t,n){return ka(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ka(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Cg(this,t)}destroy(){this.docView&&(v4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],rg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,T6())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return E4(this,t)}domSelectionRange(){let t=this.domSelection();return t?wt&&this.root.nodeType===11&&R6(this.dom.ownerDocument)==this.dom&&q4(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};wa.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function M2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Oe.node(0,e.state.doc.content.size,t)]}function O2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Oe.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function R2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function Q4(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function D2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function eI(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function I2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Dr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},md={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tI=typeof navigator<"u"&&/Mac/.test(navigator.platform),nI=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ke=0;Ke<10;Ke++)Dr[48+Ke]=Dr[96+Ke]=String(Ke);var Ke;for(Ke=1;Ke<=24;Ke++)Dr[Ke+111]="F"+Ke;var Ke;for(Ke=65;Ke<=90;Ke++)Dr[Ke]=String.fromCharCode(Ke+32),md[Ke]=String.fromCharCode(Ke);var Ke;for(hd in Dr)md.hasOwnProperty(hd)||(md[hd]=Dr[hd]);var hd;function f_(e){var t=tI&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||nI&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?md:Dr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var rI=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),oI=typeof navigator<"u"&&/Win/.test(navigator.platform);function iI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l{for(var n in t)lI(e,n,{get:t[n],enumerable:!0})};function Ed(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var wd=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...u)=>{let c=l(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!e,a=e||o.tr,u=()=>(!l&&t&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let g=this.buildProps(a,t),b=f(...h)(g);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...u)=>a(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:Ed({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,a])=>[l,(...u)=>a(...u)(s)]))}};return s}},E_={};Bg(E_,{blur:()=>aI,clearContent:()=>uI,clearNodes:()=>cI,command:()=>dI,createParagraphNear:()=>fI,cut:()=>pI,deleteCurrentNode:()=>hI,deleteNode:()=>mI,deleteRange:()=>gI,deleteSelection:()=>bI,enter:()=>yI,exitCode:()=>xI,extendMarkRange:()=>vI,first:()=>kI,focus:()=>EI,forEach:()=>wI,insertContent:()=>_I,insertContentAt:()=>TI,joinBackward:()=>MI,joinDown:()=>NI,joinForward:()=>OI,joinItemBackward:()=>RI,joinItemForward:()=>DI,joinTextblockBackward:()=>II,joinTextblockForward:()=>LI,joinUp:()=>AI,keyboardShortcut:()=>BI,lift:()=>FI,liftEmptyBlock:()=>zI,liftListItem:()=>UI,newlineInCode:()=>$I,resetAttributes:()=>HI,scrollIntoView:()=>VI,selectAll:()=>qI,selectNodeBackward:()=>WI,selectNodeForward:()=>jI,selectParentNode:()=>KI,selectTextblockEnd:()=>GI,selectTextblockStart:()=>YI,setContent:()=>JI,setMark:()=>cL,setMeta:()=>dL,setNode:()=>fL,setNodeSelection:()=>pL,setTextDirection:()=>hL,setTextSelection:()=>mL,sinkListItem:()=>gL,splitBlock:()=>bL,splitListItem:()=>yL,toggleList:()=>xL,toggleMark:()=>vL,toggleNode:()=>kL,toggleWrap:()=>EL,undoInputRule:()=>wL,unsetAllMarks:()=>_L,unsetMark:()=>SL,unsetTextDirection:()=>CL,updateAttributes:()=>TL,wrapIn:()=>AL,wrapInList:()=>NL});var aI=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),uI=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),cI=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(a)),f=u.resolve(c.map(a+l.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Ar(p);if(l.type.isTextblock){let{defaultType:g}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,g)}(h||h===0)&&t.lift(p,h)})}),!0},dI=e=>t=>e(t),fI=()=>({state:e,dispatch:t})=>G0(e,t),pI=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new U(r.doc.resolve(Math.max(s-1,0)))),!0},hI=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){let l=o.before(i),a=o.after(i);e.delete(l,a).scrollIntoView()}return!0}return!1};function ze(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var mI=e=>({tr:t,state:n,dispatch:r})=>{let o=ze(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let a=i.before(s),u=i.after(s);t.delete(a,u).scrollIntoView()}return!0}return!1},gI=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},bI=()=>({state:e,dispatch:t})=>td(e,t),yI=()=>({commands:e})=>e.keyboardShortcut("Enter"),xI=()=>({state:e,dispatch:t})=>K0(e,t);function Fg(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function kd(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:Fg(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function w_(e,t,n={}){return e.find(r=>r.type===t&&kd(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function h_(e,t,n={}){return!!w_(e,t,n)}function zg(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!w_([...o.node.marks],t,n)))return;let s=o.index,l=e.start()+o.offset,a=s+1,u=l+o.node.nodeSize;for(;s>0&&h_([...e.parent.child(s-1).marks],t,n);)s-=1,l-=e.parent.child(s).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{let i=Lr(e,r.schema),{doc:s,selection:l}=n,{$from:a,from:u,to:c}=l;if(o){let d=zg(a,i,t);if(d&&d.from<=u&&d.to>=c){let f=U.create(s,d.from,d.to);n.setSelection(f)}}return!0},kI=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};let s=()=>{(Sd()||S_())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!_d(n.state.selection))return s(),!0;let l=__(o.doc,e)||n.state.selection,a=n.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},wI=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),_I=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),C_=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&C_(r)}return e};function gd(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return C_(n)}function Ta(e,t,n){if(e instanceof $t||e instanceof N)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return N.fromArray(e.map(l=>t.nodeFromJSON(l)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return Ta("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="",a=new vo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?fn.fromSchema(a).parseSlice(gd(e),n.parseOptions):fn.fromSchema(a).parse(gd(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let i=fn.fromSchema(t);return n.slice?i.parseSlice(gd(e),n.parseOptions).content:i.parse(gd(e),n.parseOptions)}return Ta("",t,n)}function SI(e,t,n){let r=e.steps.length-1;if(r{s===0&&(s=c)}),e.setSelection(W.near(e.doc.resolve(s),n))}var CI=e=>!("type"in e),TI=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l,a=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Ta(t,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){a(b)}try{l=Ta(t,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return a(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((CI(l)?l:[l]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let g;if(f){if(Array.isArray(t))g=t.map(b=>b.text||"").join("");else if(t instanceof N){let b="";t.forEach(m=>{m.text&&(b+=m.text)}),g=b}else typeof t=="object"&&t&&t.text?g=t.text:g=t;r.insertText(g,c,d)}else{g=l;let b=r.doc.resolve(c),m=b.node(),y=b.parentOffset===0,x=m.isText||m.isTextblock,v=m.content.size>0;y&&x&&v&&(c=Math.max(0,c-1)),r.replaceWith(c,d,g)}n.updateSelection&&SI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:g})}return!0},AI=()=>({state:e,dispatch:t})=>jw(e,t),NI=()=>({state:e,dispatch:t})=>Kw(e,t),MI=()=>({state:e,dispatch:t})=>z0(e,t),OI=()=>({state:e,dispatch:t})=>H0(e,t),RI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=fi(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},DI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=fi(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},II=()=>({state:e,dispatch:t})=>Hw(e,t),LI=()=>({state:e,dispatch:t})=>Vw(e,t);function T_(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function PI(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l({editor:t,view:n,tr:r,dispatch:o})=>{let i=PI(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function Zn(e,t,n={}){let{from:r,to:o,empty:i}=e.selection,s=t?ze(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);l.push({node:d,from:p,to:h})});let a=o-r,u=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>kd(d.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=a}var FI=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Zn(n,o,t)?Gw(n,r):!1},zI=()=>({state:e,dispatch:t})=>Y0(e,t),UI=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return e2(r)(t,n)},$I=()=>({state:e,dispatch:t})=>W0(e,t);function Cd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function m_(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var HI=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=Cd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Lr(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{i&&i===c.type&&(a=!0,o&&n.setNodeMarkup(d,void 0,m_(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(a=!0,o&&n.addMark(d,d+c.nodeSize,s.create(m_(f.attrs,t))))})})}),a},VI=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),qI=()=>({tr:e,dispatch:t})=>{if(t){let n=new Ot(e.doc);e.setSelection(n)}return!0},WI=()=>({state:e,dispatch:t})=>U0(e,t),jI=()=>({state:e,dispatch:t})=>V0(e,t),KI=()=>({state:e,dispatch:t})=>Yw(e,t),GI=()=>({state:e,dispatch:t})=>Z0(e,t),YI=()=>({state:e,dispatch:t})=>J0(e,t);function Lg(e,t,n={},r={}){return Ta(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var JI=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{let{doc:a}=i;if(r.preserveWhitespace!=="full"){let u=Lg(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:a.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function A_(e,t){let n=Lr(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function Ug(e,t){let n=new ko(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function ZI(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function N_(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function $g(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Ad(e){return t=>$g(t.$from,e)}function j(e,t,n){return e.config[t]===void 0&&e.parent?j(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?j(e.parent,t,n):null}):e.config[t]}function Hg(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=j(t,"addExtensions",n);return r?[t,...Hg(r())]:t}).flat(10)}function $s(e,t){let n=Sr.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function M_(e){return typeof e=="function"}function he(e,t=void 0,...n){return M_(e)?t?e.bind(t)(...n):e(...n):e}function XI(e={}){return Object.keys(e).length===0&&e.constructor===Object}function zs(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function O_(e){let t=[],{nodeExtensions:n,markExtensions:r}=zs(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage,extensions:o},a=j(s,"addGlobalAttributes",l);if(!a)return;a().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage},a=j(s,"addAttributes",l);if(!a)return;let u=a();Object.entries(u).forEach(([c,d])=>{let f={...i,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:s.name,name:c,attribute:f})})}),t}function ne(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let l=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(c=>!a.includes(c));r[o]=[...a,...u].join(" ")}else if(o==="style"){let l=i?i.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;a.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function Us(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>ne(n,r),{})}function QI(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function g_(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((i,s)=>{let l=s.attribute.parseHTML?s.attribute.parseHTML(n):QI(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function b_(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&XI(n)?!1:n!=null))}function y_(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function eL(e,t){var n;let r=O_(e),{nodeExtensions:o,markExtensions:i}=zs(e),s=(n=o.find(u=>j(u,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(u=>{let c=r.filter(m=>m.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((m,y)=>{let x=j(y,"extendNodeSchema",d);return{...m,...x?x(u):{}}},{}),p=b_({...f,content:he(j(u,"content",d)),marks:he(j(u,"marks",d)),group:he(j(u,"group",d)),inline:he(j(u,"inline",d)),atom:he(j(u,"atom",d)),selectable:he(j(u,"selectable",d)),draggable:he(j(u,"draggable",d)),code:he(j(u,"code",d)),whitespace:he(j(u,"whitespace",d)),linebreakReplacement:he(j(u,"linebreakReplacement",d)),defining:he(j(u,"defining",d)),isolating:he(j(u,"isolating",d)),attrs:Object.fromEntries(c.map(y_))}),h=he(j(u,"parseHTML",d));h&&(p.parseDOM=h.map(m=>g_(m,c)));let g=j(u,"renderHTML",d);g&&(p.toDOM=m=>g({node:m,HTMLAttributes:Us(m,c)}));let b=j(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),a=Object.fromEntries(i.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,m)=>{let y=j(m,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=b_({...f,inclusive:he(j(u,"inclusive",d)),excludes:he(j(u,"excludes",d)),group:he(j(u,"group",d)),spanning:he(j(u,"spanning",d)),code:he(j(u,"code",d)),attrs:Object.fromEntries(c.map(y_))}),h=he(j(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>g_(b,c)));let g=j(u,"renderHTML",d);return g&&(p.toDOM=b=>g({mark:b,HTMLAttributes:Us(b,c)})),[u.name,p]}));return new vo({topNode:s,nodes:l,marks:a})}function tL(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Vg(e){return e.sort((n,r)=>{let o=j(n,"priority")||100,i=j(r,"priority")||100;return o>i?-1:or.name)).length,t}function D_(e,t,n){let{from:r,to:o}=t,{blockSeparator:i=` -`,textSerializers:s={}}=n||{},l="";return e.nodesBetween(r,o,(a,u,c,d)=>{var f;a.isBlock&&u>r&&(l+=i);let p=s?.[a.type.name];if(p)return c&&(l+=p({node:a,pos:u,parent:c,index:d,range:t})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),l}function qg(e,t){let n={from:0,to:e.content.size};return O_(e,n,t)}function Nd(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function rL(e,t){let n=ze(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Vg(e,t){let n=Cd(typeof t=="string"?t:t.name,e.schema);return n==="node"?rL(e,t):n==="mark"?C_(e,t):{}}function oL(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function iL(e){let t=oL(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Wg(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let u=t.slice(i).map(l,-1),c=t.slice(i).map(a),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),iL(r)}function Md(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let i=n.resolve(e),s=Fg(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var R_=(e,t,n,r=20)=>{let o=e.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===t?s=l:i-=1}return[s,i]};function Og(e,t){return t.nodes[e]||t.marks[e]||null}function vd(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var sL=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,l)=>{var a,u;let c=((u=(a=o.type.spec).toText)==null?void 0:u.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-i))}),n};function Lg(e,t,n={}){let{empty:r,ranges:o}=e.selection,i=t?Lr(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>kd(d.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),y=Math.min(h,b+m.nodeSize),x=y-g;s+=x,l.push(...m.marks.map(v=>({mark:v,from:g,to:y})))})}),s===0)return!1;let a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>kd(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+u:a)>=s}function lL(e,t,n={}){if(!t)return Zn(e,null,n)||Lg(e,null,n);let r=Cd(t,e.schema);return r==="node"?Zn(e,t,n):r==="mark"?Lg(e,t,n):!1}var D_=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let i=Ad(l=>l.type.name===t)(e.selection);if(!i)return!1;let s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function b_(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function y_(e,t){let{nodeExtensions:n}=zs(t),r=n.find(s=>s.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=he(j(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Aa(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(Aa(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function Od(e){return e instanceof z}var L_=class P_{constructor(t){this.position=t}static fromJSON(t){return new P_(t.position)}toJSON(){return{position:this.position}}};function aL(e,t){let n=t.mapping.mapResult(e.position);return{position:new L_(n.pos),mapResult:n}}function uL(e){return new L_(e)}function Rd(e,t,n){let o=e.state.doc.content.size,i=Ir(t,0,o),s=Ir(n,0,o),l=e.coordsAtPos(i),a=e.coordsAtPos(s,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function cL(e,t,n){var r;let{selection:o}=t,i=null;if(_d(o)&&(i=o.$cursor),i){let l=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(u=>u.type.excludes(n)))}let{ranges:s}=o;return s.some(({$from:l,$to:a})=>{let u=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(l.pos,a.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var dL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=n,{empty:s,ranges:l}=i,a=Lr(e,r.schema);if(o)if(s){let u=C_(r,a);n.addStoredMark(a.create({...u,...t}))}else l.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===a)?f.marks.forEach(g=>{a===g.type&&n.addMark(h,m,a.create({...g.attrs,...t}))}):n.addMark(h,m,a.create(t))})});return cL(r,n,a)},fL=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),pL=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let i=ze(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>Z0(i,{...s,...t})(n)?!0:l.clearNodes()).command(({state:l})=>Z0(i,{...s,...t})(l,r)).run():!1},hL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=Ir(e,0,r.content.size),i=z.create(r,o);t.setSelection(i)}return!0},mL=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=r,s,l;return typeof t=="number"?(s=t,l=t):t&&"from"in t&&"to"in t?(s=t.from,l=t.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(a,u)=>{a.isText||n.setNodeMarkup(u,void 0,{...a.attrs,dir:e})}),!0},gL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=U.atStart(r).from,l=U.atEnd(r).to,a=Ir(o,s,l),u=Ir(i,s,l),c=U.create(r,a,u);t.setSelection(c)}return!0},bL=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return Qw(r)(t,n)};function x_(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var yL=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:i,doc:s}=t,{$from:l,$to:a}=i,u=o.extensionManager.attributes,c=vd(u,l.node().type.name,l.node().attrs);if(i instanceof z&&i.node.isBlock)return!l.parentOffset||!Qt(s,l.pos)?!1:(r&&(e&&x_(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:XI(l.node(-1).contentMatchAt(l.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=Qt(t.doc,t.mapping.map(l.pos),1,p);if(!p&&!h&&Qt(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(i instanceof U&&t.deleteSelection(),t.split(t.mapping.map(l.pos),1,p),f&&!d&&!l.parentOffset&&l.parent.type!==f)){let m=t.mapping.map(l.before()),b=t.doc.resolve(m);l.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}e&&x_(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},xL=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;let l=ze(e,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;let d=a.node(-1);if(d.type!==l)return!1;let f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let g=N.empty,y=a.index(-1)?1:a.index(-2)?2:3;for(let _=a.depth-y;_>=a.depth-3;_-=1)g=N.from(a.node(_).copy(g));let x=a.indexAfter(-1){if(w>-1)return!1;_.isTextblock&&_.content.size===0&&(w=A+1)}),w>-1&&n.setSelection(U.near(n.doc.resolve(w))),n.scrollIntoView()}return!0}let p=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...vd(f,d.type.name,d.attrs),...t},m={...vd(f,a.node().type.name,a.node().attrs),...t};n.delete(a.pos,u.pos);let b=p?[{type:l,attrs:h},{type:p,attrs:m}]:[{type:l,attrs:h}];if(!Qt(n.doc,a.pos,2))return!1;if(o){let{selection:g,storedMarks:y}=r,{splittableMarks:x}=i.extensionManager,v=y||g.$to.parentOffset&&g.$from.marks();if(n.split(a.pos,2,b).scrollIntoView(),!v||!o)return!0;let k=v.filter(E=>x.includes(E.type.name));n.ensureMarks(k)}return!0},Rg=(e,t)=>{let n=Ad(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,n.pos)&&e.join(n.pos),!0},Dg=(e,t)=>{let n=Ad(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,r)&&e.join(r),!0},vL=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=ze(e,s.schema),h=ze(t,s.schema),{selection:m,storedMarks:b}=s,{$from:g,$to:y}=m,x=g.blockRange(y),v=b||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;let k=Ad(E=>y_(E.type.name,d))(m);if(x.depth>=1&&k&&x.depth-k.depth<=1){if(k.node.type===p)return u.liftListItem(h);if(y_(k.node.type.name,d)&&p.validContent(k.node.content)&&l)return a().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>Rg(i,p)).command(()=>Dg(i,p)).run()}return!n||!v||!l?a().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>Rg(i,p)).command(()=>Dg(i,p)).run():a().command(()=>{let E=c().wrapInList(p,r),w=v.filter(_=>f.includes(_.type.name));return i.ensureMarks(w),E?!0:u.clearNodes()}).wrapInList(p,r).command(()=>Rg(i,p)).command(()=>Dg(i,p)).run()},kL=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:i=!1}=n,s=Lr(e,r.schema);return Lg(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},EL=(e,t,n={})=>({state:r,commands:o})=>{let i=ze(e,r.schema),s=ze(t,r.schema),l=Zn(r,i,n),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(s,a):o.setNode(i,{...a,...n})},wL=(e,t={})=>({state:n,commands:r})=>{let o=ze(e,n.schema);return Zn(n,o,t)?r.lift(o):r.wrapIn(o,t)},_L=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},SL=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},CL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;let{extendEmptyMarkRange:s=!1}=t,{selection:l}=n,a=Lr(e,r.schema),{$from:u,empty:c,ranges:d}=l;if(!o)return!0;if(c&&s){let{from:f,to:p}=l,h=(i=u.marks().find(b=>b.type===a))==null?void 0:i.attrs,m=Fg(u,a,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,a)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},TL=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,i,s;return typeof e=="number"?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,(l,a)=>{if(l.isText)return;let u={...l.attrs};delete u.dir,t.setNodeMarkup(a,void 0,u)}),!0},AL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=Cd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Lr(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?r.doc.nodesBetween(c,d,(b,g)=>{i&&i===b.type&&(a=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):r.doc.nodesBetween(c,d,(b,g)=>{g=c&&g<=d&&(i&&i===b.type&&(a=!0,o&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(y=>{if(s===y.type&&(a=!0,o)){let x=Math.max(g,c),v=Math.min(g+b.nodeSize,d);n.addMark(x,v,s.create({...y.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&o&&n.addMark(h,m,s.create({...b.attrs,...t}))}))}),a},NL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Jw(o,t)(n,r)},ML=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Zw(o,t)(n,r)},OL=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Dd=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},RL=(e,t)=>{if(Bg(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function bd(e){var t;let{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=e,{view:a}=n;if(a.composing)return!1;let u=a.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=sL(u)+i;return s.forEach(f=>{if(c)return;let p=RL(d,f.find);if(!p)return;let h=a.state.tr,m=Ed({state:a.state,transaction:h}),b={from:r-(p[0].length-i.length),to:o},{commands:g,chain:y,can:x}=new wd({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:y,can:x})===null||!h.steps.length||(f.undoable&&h.setMeta(l,{transform:h,from:r,to:o,text:i}),a.dispatch(h),c=!0)}),c}function DL(e){let{editor:t,rules:n}=e,r=new q({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=$s(N.from(c),s.schema);let{from:d}=a,f=d+c.length;bd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return bd({editor:t,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&bd({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?bd({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function IL(e){return Object.prototype.toString.call(e).slice(8,-1)}function yd(e){return IL(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function B_(e,t){let n={...e};return yd(e)&&yd(t)&&Object.keys(t).forEach(r=>{yd(t[r])&&yd(e[r])?n[r]=B_(e[r],t[r]):n[r]=t[r]}),n}var jg=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...he(j(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...he(j(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>B_(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Ge=class F_ extends jg{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new F_(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let a=s.find(u=>u?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function LL(e){return typeof e=="number"}var PL=class{constructor(e){this.find=e.find,this.handler=e.handler}},BL=(e,t,n)=>{if(Bg(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),i.push(o.replaceWith)),i}):[]};function FL(e){let{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=e,{commands:a,chain:u,can:c}=new wd({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var m,b,g,y,x;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let v=(x=(y=(g=p.content)==null?void 0:g.size)!=null?y:p.nodeSize)!=null?x:0,k=Math.max(r,h),E=Math.min(o,h+v);if(k>=E)return;let w=p.isText?p.text||"":p.textBetween(k-h,E-h,void 0,"\uFFFC");BL(w,i.find,s).forEach(A=>{if(A.index===void 0)return;let T=k+A.index+1,B=T+A[0].length,G={from:n.tr.mapping.map(T),to:n.tr.mapping.map(B)},te=i.handler({state:n,range:G,match:A,commands:a,chain:u,can:c,pasteEvent:s,dropEvent:l});d.push(te)})}),d.every(p=>p!==null)}var xd=null,zL=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function UL(e){let{editor:t,rules:n}=e,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=Ed({state:c,transaction:m});if(!(!FL({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new q({view(d){let f=h=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,r&&(xd=t)},p=()=>{xd&&(xd=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,l=f,!i){let p=xd;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!i,g=h.getMeta("applyPasteRules"),y=!!g;if(!m&&!b&&!y)return;if(y){let{text:k}=g;typeof k=="string"?k=k:k=$s(N.from(k),p.schema);let{from:E}=g,w=E+k.length,_=zL(k);return a({rule:c,state:p,from:E,to:{b:w},pasteEvt:_})}let x=f.doc.content.findDiffStart(p.doc.content),v=f.doc.content.findDiffEnd(p.doc.content);if(!(!LL(x)||!v||x===v.b))return a({rule:c,state:p,from:x,to:v,pasteEvt:s})}}))}var Id=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=M_(e),this.schema=tL(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Og(t.name,this.schema)},r=j(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Hg([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:Og(r.name,this.schema)},i=[],s=j(r,"addKeyboardShortcuts",o),l={};if(r.type==="mark"&&j(r,"exitable",o)&&(l.ArrowRight=()=>Ge.handleExit({editor:e,mark:r})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));l={...l,...f}}let a=d_(l);i.push(a);let u=j(r,"addInputRules",o);if(b_(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=DL({editor:e,rules:f}),h=Array.isArray(p)?p:[p];i.push(...h)}}let c=j(r,"addPasteRules",o);if(b_(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=UL({editor:e,rules:f});i.push(...p)}}let d=j(r,"addProseMirrorPlugins",o);if(d){let f=d();i.push(...f)}return i})}get attributes(){return N_(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=zs(this.extensions);return Object.fromEntries(t.filter(n=>!!j(n,"addNodeView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ze(n.name,this.schema)},i=j(n,"addNodeView",o);if(!i)return[];let s=i();if(!s)return[];let l=(a,u,c,d,f)=>{let p=Us(a,r);return s({node:a,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,l]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=zs(this.extensions);return Object.fromEntries(t.filter(n=>!!j(n,"addMarkView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Lr(n.name,this.schema)},i=j(n,"addMarkView",o);if(!i)return[];let s=(l,a,u)=>{let c=Us(l,r);return i()({mark:l,view:a,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{JL(l,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Og(t.name,this.schema)};t.type==="mark"&&((n=he(j(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=j(t,"onBeforeCreate",r),i=j(t,"onCreate",r),s=j(t,"onUpdate",r),l=j(t,"onSelectionUpdate",r),a=j(t,"onTransaction",r),u=j(t,"onFocus",r),c=j(t,"onBlur",r),d=j(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};Id.resolve=M_;Id.sort=Hg;Id.flatten=$g;var Kg={};Pg(Kg,{ClipboardTextSerializer:()=>U_,Commands:()=>$_,Delete:()=>H_,Drop:()=>q_,Editable:()=>V_,FocusEvents:()=>j_,Keymap:()=>K_,Paste:()=>G_,Tabindex:()=>Y_,TextDirection:()=>J_,focusEventsPluginKey:()=>W_});var re=class z_ extends jg{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new z_(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},U_=re.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new q({key:new Z("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(c=>c.$from.pos)),l=Math.max(...i.map(c=>c.$to.pos)),a=Nd(n);return O_(r,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),$_=re.create({name:"commands",addCommands(){return{...v_}}}),H_=re.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let i=()=>{var s,l,a,u;if((u=(a=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,e))!=null?u:e.getMeta("y-sync$"))return;let c=zg(e.before,[e,...t]);Wg(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof Tr){let g=f.slice(h).map(p.from,-1),y=f.slice(h).map(p.to),x=f.invert().map(g,-1),v=f.invert().map(y),k=(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(w=>w.eq(p.mark)),E=(b=c.doc.nodeAt(y))==null?void 0:b.marks.some(w=>w.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:v},newRange:{from:g,to:y},partial:!!(E||k),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),q_=re.create({name:"drop",addProseMirrorPlugins(){return[new q({key:new Z("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),V_=re.create({name:"editable",addProseMirrorPlugins(){return[new q({key:new Z("editable"),props:{editable:()=>this.editor.options.editable}})]}}),W_=new Z("focusEvents"),j_=re.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new q({key:W_,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),K_=re.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{let{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:W.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Sd()||S_()?i:o},addProseMirrorPlugins(){return[new q({key:new Z("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:l}=t.selection,a=W.atStart(t.doc).from,u=W.atEnd(t.doc).to;if(i||!(s===a&&l===u)||!Aa(n.doc))return;let f=n.tr,p=Ed({state:n,transaction:f}),{commands:h}=new wd({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),G_=re.create({name:"paste",addProseMirrorPlugins(){return[new q({key:new Z("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),Y_=re.create({name:"tabindex",addProseMirrorPlugins(){return[new q({key:new Z("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),J_=re.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=zs(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new q({key:new Z("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),$L=class Fs{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Fs(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Fs(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Fs(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(s);if(!o&&l.depth<=this.depth)return;let a=new Fs(l,this.editor,o,o?n:null);o&&(a.actualDepth=this.depth+1),t.push(new Fs(l,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let i=o.node.attrs,s=Object.keys(n);for(let l=0;l{r&&o.length>0||(s.node.type.name===t&&i.every(a=>n[a]===s.node.attrs[a])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},HL=`.ProseMirror { +`,textSerializers:s={}}=n||{},l="";return e.nodesBetween(r,o,(a,u,c,d)=>{var f;a.isBlock&&u>r&&(l+=i);let p=s?.[a.type.name];if(p)return c&&(l+=p({node:a,pos:u,parent:c,index:d,range:t})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),l}function qg(e,t){let n={from:0,to:e.content.size};return D_(e,n,t)}function Nd(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function nL(e,t){let n=ze(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Wg(e,t){let n=Cd(typeof t=="string"?t:t.name,e.schema);return n==="node"?nL(e,t):n==="mark"?A_(e,t):{}}function rL(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function oL(e){let t=rL(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function jg(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let u=t.slice(i).map(l,-1),c=t.slice(i).map(a),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),oL(r)}function Md(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let i=n.resolve(e),s=zg(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var I_=(e,t,n,r=20)=>{let o=e.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===t?s=l:i-=1}return[s,i]};function Rg(e,t){return t.nodes[e]||t.marks[e]||null}function vd(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var iL=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,l)=>{var a,u;let c=((u=(a=o.type.spec).toText)==null?void 0:u.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-i))}),n};function Pg(e,t,n={}){let{empty:r,ranges:o}=e.selection,i=t?Lr(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>kd(d.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(g,b)=>{if(!g.isText&&!g.marks.length)return;let m=Math.max(p,b),y=Math.min(h,b+g.nodeSize),x=y-m;s+=x,l.push(...g.marks.map(v=>({mark:v,from:m,to:y})))})}),s===0)return!1;let a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>kd(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+u:a)>=s}function sL(e,t,n={}){if(!t)return Zn(e,null,n)||Pg(e,null,n);let r=Cd(t,e.schema);return r==="node"?Zn(e,t,n):r==="mark"?Pg(e,t,n):!1}var L_=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let i=Ad(l=>l.type.name===t)(e.selection);if(!i)return!1;let s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function x_(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function v_(e,t){let{nodeExtensions:n}=zs(t),r=n.find(s=>s.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=he(j(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Aa(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(Aa(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function Od(e){return e instanceof z}var B_=class F_{constructor(t){this.position=t}static fromJSON(t){return new F_(t.position)}toJSON(){return{position:this.position}}};function lL(e,t){let n=t.mapping.mapResult(e.position);return{position:new B_(n.pos),mapResult:n}}function aL(e){return new B_(e)}function Rd(e,t,n){let o=e.state.doc.content.size,i=Ir(t,0,o),s=Ir(n,0,o),l=e.coordsAtPos(i),a=e.coordsAtPos(s,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),p=f-d,h=c-u,m={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...m,toJSON:()=>m}}function uL(e,t,n){var r;let{selection:o}=t,i=null;if(_d(o)&&(i=o.$cursor),i){let l=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(u=>u.type.excludes(n)))}let{ranges:s}=o;return s.some(({$from:l,$to:a})=>{let u=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(l.pos,a.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(g=>g.type.excludes(n));u=p&&h}return!u}),u})}var cL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=n,{empty:s,ranges:l}=i,a=Lr(e,r.schema);if(o)if(s){let u=A_(r,a);n.addStoredMark(a.create({...u,...t}))}else l.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),g=Math.min(p+f.nodeSize,d);f.marks.find(m=>m.type===a)?f.marks.forEach(m=>{a===m.type&&n.addMark(h,g,a.create({...m.attrs,...t}))}):n.addMark(h,g,a.create(t))})});return uL(r,n,a)},dL=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),fL=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let i=ze(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>X0(i,{...s,...t})(n)?!0:l.clearNodes()).command(({state:l})=>X0(i,{...s,...t})(l,r)).run():!1},pL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=Ir(e,0,r.content.size),i=z.create(r,o);t.setSelection(i)}return!0},hL=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=r,s,l;return typeof t=="number"?(s=t,l=t):t&&"from"in t&&"to"in t?(s=t.from,l=t.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(a,u)=>{a.isText||n.setNodeMarkup(u,void 0,{...a.attrs,dir:e})}),!0},mL=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=U.atStart(r).from,l=U.atEnd(r).to,a=Ir(o,s,l),u=Ir(i,s,l),c=U.create(r,a,u);t.setSelection(c)}return!0},gL=e=>({state:t,dispatch:n})=>{let r=ze(e,t.schema);return t2(r)(t,n)};function k_(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var bL=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:i,doc:s}=t,{$from:l,$to:a}=i,u=o.extensionManager.attributes,c=vd(u,l.node().type.name,l.node().attrs);if(i instanceof z&&i.node.isBlock)return!l.parentOffset||!Qt(s,l.pos)?!1:(r&&(e&&k_(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:ZI(l.node(-1).contentMatchAt(l.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=Qt(t.doc,t.mapping.map(l.pos),1,p);if(!p&&!h&&Qt(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(i instanceof U&&t.deleteSelection(),t.split(t.mapping.map(l.pos),1,p),f&&!d&&!l.parentOffset&&l.parent.type!==f)){let g=t.mapping.map(l.before()),b=t.doc.resolve(g);l.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}e&&k_(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},yL=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;let l=ze(e,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;let d=a.node(-1);if(d.type!==l)return!1;let f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let m=N.empty,y=a.index(-1)?1:a.index(-2)?2:3;for(let _=a.depth-y;_>=a.depth-3;_-=1)m=N.from(a.node(_).copy(m));let x=a.indexAfter(-1){if(w>-1)return!1;_.isTextblock&&_.content.size===0&&(w=A+1)}),w>-1&&n.setSelection(U.near(n.doc.resolve(w))),n.scrollIntoView()}return!0}let p=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...vd(f,d.type.name,d.attrs),...t},g={...vd(f,a.node().type.name,a.node().attrs),...t};n.delete(a.pos,u.pos);let b=p?[{type:l,attrs:h},{type:p,attrs:g}]:[{type:l,attrs:h}];if(!Qt(n.doc,a.pos,2))return!1;if(o){let{selection:m,storedMarks:y}=r,{splittableMarks:x}=i.extensionManager,v=y||m.$to.parentOffset&&m.$from.marks();if(n.split(a.pos,2,b).scrollIntoView(),!v||!o)return!0;let k=v.filter(E=>x.includes(E.type.name));n.ensureMarks(k)}return!0},Dg=(e,t)=>{let n=Ad(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,n.pos)&&e.join(n.pos),!0},Ig=(e,t)=>{let n=Ad(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&pn(e.doc,r)&&e.join(r),!0},xL=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=ze(e,s.schema),h=ze(t,s.schema),{selection:g,storedMarks:b}=s,{$from:m,$to:y}=g,x=m.blockRange(y),v=b||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;let k=Ad(E=>v_(E.type.name,d))(g);if(x.depth>=1&&k&&x.depth-k.depth<=1){if(k.node.type===p)return u.liftListItem(h);if(v_(k.node.type.name,d)&&p.validContent(k.node.content)&&l)return a().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>Dg(i,p)).command(()=>Ig(i,p)).run()}return!n||!v||!l?a().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>Dg(i,p)).command(()=>Ig(i,p)).run():a().command(()=>{let E=c().wrapInList(p,r),w=v.filter(_=>f.includes(_.type.name));return i.ensureMarks(w),E?!0:u.clearNodes()}).wrapInList(p,r).command(()=>Dg(i,p)).command(()=>Ig(i,p)).run()},vL=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:i=!1}=n,s=Lr(e,r.schema);return Pg(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},kL=(e,t,n={})=>({state:r,commands:o})=>{let i=ze(e,r.schema),s=ze(t,r.schema),l=Zn(r,i,n),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(s,a):o.setNode(i,{...a,...n})},EL=(e,t={})=>({state:n,commands:r})=>{let o=ze(e,n.schema);return Zn(n,o,t)?r.lift(o):r.wrapIn(o,t)},wL=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},_L=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},SL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;let{extendEmptyMarkRange:s=!1}=t,{selection:l}=n,a=Lr(e,r.schema),{$from:u,empty:c,ranges:d}=l;if(!o)return!0;if(c&&s){let{from:f,to:p}=l,h=(i=u.marks().find(b=>b.type===a))==null?void 0:i.attrs,g=zg(u,a,h);g&&(f=g.from,p=g.to),n.removeMark(f,p,a)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},CL=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,i,s;return typeof e=="number"?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,(l,a)=>{if(l.isText)return;let u={...l.attrs};delete u.dir,t.setNodeMarkup(a,void 0,u)}),!0},TL=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,l=Cd(typeof e=="string"?e:e.name,r.schema);if(!l)return!1;l==="node"&&(i=ze(e,r.schema)),l==="mark"&&(s=Lr(e,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,g;n.selection.empty?r.doc.nodesBetween(c,d,(b,m)=>{i&&i===b.type&&(a=!0,h=Math.max(m,c),g=Math.min(m+b.nodeSize,d),f=m,p=b)}):r.doc.nodesBetween(c,d,(b,m)=>{m=c&&m<=d&&(i&&i===b.type&&(a=!0,o&&n.setNodeMarkup(m,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(y=>{if(s===y.type&&(a=!0,o)){let x=Math.max(m,c),v=Math.min(m+b.nodeSize,d);n.addMark(x,v,s.create({...y.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&o&&n.addMark(h,g,s.create({...b.attrs,...t}))}))}),a},AL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Xw(o,t)(n,r)},NL=(e,t={})=>({state:n,dispatch:r})=>{let o=ze(e,n.schema);return Qw(o,t)(n,r)},ML=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Dd=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},OL=(e,t)=>{if(Fg(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function bd(e){var t;let{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=e,{view:a}=n;if(a.composing)return!1;let u=a.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=iL(u)+i;return s.forEach(f=>{if(c)return;let p=OL(d,f.find);if(!p)return;let h=a.state.tr,g=Ed({state:a.state,transaction:h}),b={from:r-(p[0].length-i.length),to:o},{commands:m,chain:y,can:x}=new wd({editor:n,state:g});f.handler({state:g,range:b,match:p,commands:m,chain:y,can:x})===null||!h.steps.length||(f.undoable&&h.setMeta(l,{transform:h,from:r,to:o,text:i}),a.dispatch(h),c=!0)}),c}function RL(e){let{editor:t,rules:n}=e,r=new V({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=$s(N.from(c),s.schema);let{from:d}=a,f=d+c.length;bd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return bd({editor:t,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&bd({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?bd({editor:t,from:s.pos,to:s.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function DL(e){return Object.prototype.toString.call(e).slice(8,-1)}function yd(e){return DL(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function z_(e,t){let n={...e};return yd(e)&&yd(t)&&Object.keys(t).forEach(r=>{yd(t[r])&&yd(e[r])?n[r]=z_(e[r],t[r]):n[r]=t[r]}),n}var Kg=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...he(j(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...he(j(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>z_(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Ge=class U_ extends Kg{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new U_(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let a=s.find(u=>u?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function IL(e){return typeof e=="number"}var LL=class{constructor(e){this.find=e.find,this.handler=e.handler}},PL=(e,t,n)=>{if(Fg(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),i.push(o.replaceWith)),i}):[]};function BL(e){let{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=e,{commands:a,chain:u,can:c}=new wd({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var g,b,m,y,x;if((b=(g=p.type)==null?void 0:g.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let v=(x=(y=(m=p.content)==null?void 0:m.size)!=null?y:p.nodeSize)!=null?x:0,k=Math.max(r,h),E=Math.min(o,h+v);if(k>=E)return;let w=p.isText?p.text||"":p.textBetween(k-h,E-h,void 0,"\uFFFC");PL(w,i.find,s).forEach(A=>{if(A.index===void 0)return;let T=k+A.index+1,B=T+A[0].length,G={from:n.tr.mapping.map(T),to:n.tr.mapping.map(B)},te=i.handler({state:n,range:G,match:A,commands:a,chain:u,can:c,pasteEvent:s,dropEvent:l});d.push(te)})}),d.every(p=>p!==null)}var xd=null,FL=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function zL(e){let{editor:t,rules:n}=e,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let g=c.tr,b=Ed({state:c,transaction:g});if(!(!BL({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:l})||!g.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(c=>new V({view(d){let f=h=>{var g;r=(g=d.dom.parentElement)!=null&&g.contains(h.target)?d.dom.parentElement:null,r&&(xd=t)},p=()=>{xd&&(xd=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,l=f,!i){let p=xd;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],g=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!i,m=h.getMeta("applyPasteRules"),y=!!m;if(!g&&!b&&!y)return;if(y){let{text:k}=m;typeof k=="string"?k=k:k=$s(N.from(k),p.schema);let{from:E}=m,w=E+k.length,_=FL(k);return a({rule:c,state:p,from:E,to:{b:w},pasteEvt:_})}let x=f.doc.content.findDiffStart(p.doc.content),v=f.doc.content.findDiffEnd(p.doc.content);if(!(!IL(x)||!v||x===v.b))return a({rule:c,state:p,from:x,to:v,pasteEvt:s})}}))}var Id=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=R_(e),this.schema=eL(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Rg(t.name,this.schema)},r=j(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Vg([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:Rg(r.name,this.schema)},i=[],s=j(r,"addKeyboardShortcuts",o),l={};if(r.type==="mark"&&j(r,"exitable",o)&&(l.ArrowRight=()=>Ge.handleExit({editor:e,mark:r})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));l={...l,...f}}let a=p_(l);i.push(a);let u=j(r,"addInputRules",o);if(x_(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=RL({editor:e,rules:f}),h=Array.isArray(p)?p:[p];i.push(...h)}}let c=j(r,"addPasteRules",o);if(x_(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=zL({editor:e,rules:f});i.push(...p)}}let d=j(r,"addProseMirrorPlugins",o);if(d){let f=d();i.push(...f)}return i})}get attributes(){return O_(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=zs(this.extensions);return Object.fromEntries(t.filter(n=>!!j(n,"addNodeView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ze(n.name,this.schema)},i=j(n,"addNodeView",o);if(!i)return[];let s=i();if(!s)return[];let l=(a,u,c,d,f)=>{let p=Us(a,r);return s({node:a,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,l]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=zs(this.extensions);return Object.fromEntries(t.filter(n=>!!j(n,"addMarkView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Lr(n.name,this.schema)},i=j(n,"addMarkView",o);if(!i)return[];let s=(l,a,u)=>{let c=Us(l,r);return i()({mark:l,view:a,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{YL(l,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Rg(t.name,this.schema)};t.type==="mark"&&((n=he(j(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=j(t,"onBeforeCreate",r),i=j(t,"onCreate",r),s=j(t,"onUpdate",r),l=j(t,"onSelectionUpdate",r),a=j(t,"onTransaction",r),u=j(t,"onFocus",r),c=j(t,"onBlur",r),d=j(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};Id.resolve=R_;Id.sort=Vg;Id.flatten=Hg;var Gg={};Bg(Gg,{ClipboardTextSerializer:()=>H_,Commands:()=>V_,Delete:()=>q_,Drop:()=>W_,Editable:()=>j_,FocusEvents:()=>G_,Keymap:()=>Y_,Paste:()=>J_,Tabindex:()=>Z_,TextDirection:()=>X_,focusEventsPluginKey:()=>K_});var re=class $_ extends Kg{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new $_(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},H_=re.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new V({key:new Z("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(c=>c.$from.pos)),l=Math.max(...i.map(c=>c.$to.pos)),a=Nd(n);return D_(r,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),V_=re.create({name:"commands",addCommands(){return{...E_}}}),q_=re.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let i=()=>{var s,l,a,u;if((u=(a=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,e))!=null?u:e.getMeta("y-sync$"))return;let c=Ug(e.before,[e,...t]);jg(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,g)=>{let b=g+h.nodeSize-2,m=p.oldRange.from<=g&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:g,to:b,newFrom:c.mapping.map(g),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!m,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var g,b;if(p instanceof Tr){let m=f.slice(h).map(p.from,-1),y=f.slice(h).map(p.to),x=f.invert().map(m,-1),v=f.invert().map(y),k=(g=c.doc.nodeAt(m-1))==null?void 0:g.marks.some(w=>w.eq(p.mark)),E=(b=c.doc.nodeAt(y))==null?void 0:b.marks.some(w=>w.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:v},newRange:{from:m,to:y},partial:!!(E||k),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),W_=re.create({name:"drop",addProseMirrorPlugins(){return[new V({key:new Z("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),j_=re.create({name:"editable",addProseMirrorPlugins(){return[new V({key:new Z("editable"),props:{editable:()=>this.editor.options.editable}})]}}),K_=new Z("focusEvents"),G_=re.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new V({key:K_,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Y_=re.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{let{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,g=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,m=g&&h.parent.childCount===1?b===d.pos:W.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!m||m&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Sd()||T_()?i:o},addProseMirrorPlugins(){return[new V({key:new Z("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(g=>g.getMeta("composition")))return;let r=e.some(g=>g.docChanged)&&!t.doc.eq(n.doc),o=e.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:l}=t.selection,a=W.atStart(t.doc).from,u=W.atEnd(t.doc).to;if(i||!(s===a&&l===u)||!Aa(n.doc))return;let f=n.tr,p=Ed({state:n,transaction:f}),{commands:h}=new wd({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),J_=re.create({name:"paste",addProseMirrorPlugins(){return[new V({key:new Z("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),Z_=re.create({name:"tabindex",addProseMirrorPlugins(){return[new V({key:new Z("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),X_=re.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=zs(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new V({key:new Z("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),UL=class Fs{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Fs(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Fs(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Fs(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(s);if(!o&&l.depth<=this.depth)return;let a=new Fs(l,this.editor,o,o?n:null);o&&(a.actualDepth=this.depth+1),t.push(new Fs(l,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let i=o.node.attrs,s=Object.keys(n);for(let l=0;l{r&&o.length>0||(s.node.type.name===t&&i.every(a=>n[a]===s.node.attrs[a])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},$L=`.ProseMirror { position: relative; } @@ -282,71 +282,71 @@ img.ProseMirror-separator { .ProseMirror-focused .ProseMirror-gapcursor { display: block; -}`;function qL(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var Z_=class extends OL{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:aL,createMappablePosition:uL},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=E_(t,this.options.autofocus);this.editorState=ed.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=qL(HL,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=A_(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[V_,U_.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),$_,j_,K_,Y_,q_,G_,H_,J_.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new Id(r,this)}createCommandManager(){this.commandManager=new wd({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Ig(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=Ig(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new wa(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=s?.getMeta("focus"),a=s?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Vg(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return lL(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return $s(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` +}`;function HL(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var Q_=class extends ML{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:lL,createMappablePosition:aL},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=__(t,this.options.autofocus);this.editorState=ed.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=HL($L,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=M_(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[j_,H_.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),V_,G_,Y_,Z_,W_,J_,q_,X_.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new Id(r,this)}createCommandManager(){this.commandManager=new wd({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Lg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=Lg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new wa(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=s?.getMeta("focus"),a=s?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Wg(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return sL(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return $s(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` -`,textSerializers:n={}}=e||{};return qg(this.state.doc,{blockSeparator:t,textSerializers:{...Nd(this.schema),...n}})}get isEmpty(){return Aa(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new $L(t,this)}get $doc(){return this.$pos(0)}};function Xn(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),u=n.from+l.indexOf(s),c=u+s.length;if(Md(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&i.delete(n.from+a,u);let f=n.from+a+s.length;i.addMark(n.from+a,f,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function X_(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from,l=n.to,a=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=s+u;c>l?c=l:l=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,l,a)}else if(r[0]){let u=e.type.isInline?s:s-1;i.insert(u,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:e.undoable})}function Na(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),i=he(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function Qn(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let i=he(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),u=a&&Ts(a,e.type,i);if(!u)return null;if(s.wrap(a,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));s.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&pn(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}function Q_(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof z){let i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(t))return!0;o-=1}return!1}function eS(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var VL={};Pg(VL,{createAtomBlockMarkdownSpec:()=>WL,createBlockMarkdownSpec:()=>jL,createInlineMarkdownSpec:()=>YL,parseAttributes:()=>Gg,parseIndentedBlocks:()=>Ld,renderNestedMarkdownContent:()=>Ma,serializeAttributes:()=>Yg});function Gg(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function Yg(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function WL(e){let{nodeName:t,name:n,parseAttributes:r=Gg,serializeAttributes:o=Yg,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=e,a=n||t,u=c=>{if(!l)return c;let d={};return l.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...i,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=r(m);if(!s.find(y=>!(y in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${a}${p} :::`}}}function jL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=Gg,serializeAttributes:i=Yg,defaultAttributes:s={},content:l="block",allowedAttributes:a}=e,u=n||t,c=d=>{if(!a)return d;let f={};return a.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else l==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,y=""]=b,x=o(y),v=1,k=g.length,E="",w=/^:::([\w-]*)(\s.*)?/gm,_=d.slice(k);for(w.lastIndex=0;;){let A=w.exec(_);if(A===null)break;let T=A.index,B=A[1];if(!((h=A[2])!=null&&h.endsWith(":::"))){if(B)v+=1;else if(v-=1,v===0){let G=_.slice(0,T);E=G.trim();let te=d.slice(0,k+T+A[0].length),$=[];if(E)if(l==="block")for($=p.blockTokens(G),$.forEach(C=>{C.text&&(!C.tokens||C.tokens.length===0)&&(C.tokens=p.inlineTokens(C.text))});$.length>0;){let C=$[$.length-1];if(C.type==="paragraph"&&(!C.text||C.text.trim()===""))$.pop();else break}else $=p.inlineTokens(E);return{type:t,raw:te,attributes:x,content:E,tokens:$}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=i(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` +`,textSerializers:n={}}=e||{};return qg(this.state.doc,{blockSeparator:t,textSerializers:{...Nd(this.schema),...n}})}get isEmpty(){return Aa(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new UL(t,this)}get $doc(){return this.$pos(0)}};function Xn(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),u=n.from+l.indexOf(s),c=u+s.length;if(Md(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(g=>g===e.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&i.delete(n.from+a,u);let f=n.from+a+s.length;i.addMark(n.from+a,f,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function eS(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=he(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from,l=n.to,a=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=s+u;c>l?c=l:l=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,l,a)}else if(r[0]){let u=e.type.isInline?s:s-1;i.insert(u,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:e.undoable})}function Na(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),i=he(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function Qn(e){return new Dd({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let i=he(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),u=a&&Ts(a,e.type,i);if(!u)return null;if(s.wrap(a,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let g=h.filter(b=>p.includes(b.type.name));s.ensureMarks(g)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&pn(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}function tS(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof z){let i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(t))return!0;o-=1}return!1}function nS(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var VL={};Bg(VL,{createAtomBlockMarkdownSpec:()=>qL,createBlockMarkdownSpec:()=>WL,createInlineMarkdownSpec:()=>GL,parseAttributes:()=>Yg,parseIndentedBlocks:()=>Ld,renderNestedMarkdownContent:()=>Ma,serializeAttributes:()=>Jg});function Yg(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function Jg(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function qL(e){let{nodeName:t,name:n,parseAttributes:r=Yg,serializeAttributes:o=Jg,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=e,a=n||t,u=c=>{if(!l)return c;let d={};return l.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...i,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let g=h[1]||"",b=r(g);if(!s.find(y=>!(y in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${a}${p} :::`}}}function WL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=Yg,serializeAttributes:i=Jg,defaultAttributes:s={},content:l="block",allowedAttributes:a}=e,u=n||t,c=d=>{if(!a)return d;let f={};return a.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let g=r(d);p=typeof g=="string"?[{type:"text",text:g}]:g}else l==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let g=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(g);if(!b)return;let[m,y=""]=b,x=o(y),v=1,k=m.length,E="",w=/^:::([\w-]*)(\s.*)?/gm,_=d.slice(k);for(w.lastIndex=0;;){let A=w.exec(_);if(A===null)break;let T=A.index,B=A[1];if(!((h=A[2])!=null&&h.endsWith(":::"))){if(B)v+=1;else if(v-=1,v===0){let G=_.slice(0,T);E=G.trim();let te=d.slice(0,k+T+A[0].length),$=[];if(E)if(l==="block")for($=p.blockTokens(G),$.forEach(C=>{C.text&&(!C.tokens||C.tokens.length===0)&&(C.tokens=p.inlineTokens(C.text))});$.length>0;){let C=$[$.length-1];if(C.type==="paragraph"&&(!C.text||C.text.trim()===""))$.pop();else break}else $=p.inlineTokens(E);return{type:t,raw:te,attributes:x,content:E,tokens:$}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=i(p),g=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` -`);return`:::${u}${m} +`);return`:::${u}${g} ${b} -:::`}}}function KL(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function GL(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function YL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=KL,serializeAttributes:i=GL,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=e,u=n||t,c=f=>{if(!a)return f;let p={};return a.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(l)return p.createNode(t,h);let m=r?r(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",y="";if(l){let[,v]=b;y=v}else{let[,v,k]=b;y=v,g=k||""}let x=o(y.trim());return{type:t,raw:b[0],content:g.trim(),attributes:x}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=i(h),b=m?` ${m}`:"";return l?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function Ld(e,t,n){var r,o,i,s;let l=e.split(` +:::`}}}function jL(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function KL(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function GL(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=jL,serializeAttributes:i=KL,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=e,u=n||t,c=f=>{if(!a)return f;let p={};return a.forEach(h=>{let g=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(g in f){let m=f[g];if(b!==void 0&&m===b)return;p[g]=m}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(l)return p.createNode(t,h);let g=r?r(f):f.content||"";return g?p.createNode(t,h,[p.createTextNode(g)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),g=h?.index;return g!==void 0?g:-1},tokenize(f,p,h){let g=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(g);if(!b)return;let m="",y="";if(l){let[,v]=b;y=v}else{let[,v,k]=b;y=v,m=k||""}let x=o(y.trim());return{type:t,raw:b[0],content:m.trim(),attributes:x}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(m=>m.type==="text").map(m=>m.text).join(""));let h=c(f.attrs||{}),g=i(h),b=g?` ${g}`:"";return l?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function Ld(e,t,n){var r,o,i,s;let l=e.split(` `),a=[],u="",c=0,d=t.baseIndentSize||2;for(;c0)break;if(f.trim()===""){c+=1,u=`${u}${f} -`;continue}else return}let h=t.extractItemData(p),{indentLevel:m,mainContent:b}=h;u=`${u}${f} -`;let g=[b];for(c+=1;cT.trim()!=="");if(w===-1)break;if((((o=(r=l[c+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){g.push(k),u=`${u}${k} -`,c+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>m)g.push(k),u=`${u}${k} -`,c+=1;else break}let y,x=g.slice(1);if(x.length>0){let k=x.map(E=>E.slice(m+d)).join(` +`;continue}else return}let h=t.extractItemData(p),{indentLevel:g,mainContent:b}=h;u=`${u}${f} +`;let m=[b];for(c+=1;cT.trim()!=="");if(w===-1)break;if((((o=(r=l[c+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>g){m.push(k),u=`${u}${k} +`,c+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>g)m.push(k),u=`${u}${k} +`,c+=1;else break}let y,x=m.slice(1);if(x.length>0){let k=x.map(E=>E.slice(g+d)).join(` `);k.trim()&&(t.customNestedParser?y=t.customNestedParser(k):y=n.blockTokens(k))}let v=t.createToken(h,y);a.push(v)}if(a.length!==0)return{items:a,raw:u}}function Ma(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=e.content,l=t.renderChildren([i]),a=[`${o}${l}`];return s&&s.length>0&&s.forEach(u=>{let c=t.renderChildren([u]);if(c){let d=c.split(` `).map(f=>f?t.indent(f):"").join(` `);a.push(d)}}),a.join(` -`)}function JL(e,t,n={}){let{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((l,a)=>{let u=i.mapping.map(a),c=i.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var Q=class tS extends jg{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new tS(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},nS=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,i,s,l;let{view:a}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let y=this.dom.getBoundingClientRect(),x=c.getBoundingClientRect(),v=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,k=(s=e.offsetY)!=null?s:(i=e.nativeEvent)==null?void 0:i.offsetY;d=x.x-y.x+v,f=x.y-y.y+k}let p=this.dom.cloneNode(!0);try{let y=this.dom.getBoundingClientRect();p.style.width=`${Math.round(y.width)}px`,p.style.height=`${Math.round(y.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(l=e.dataTransfer)==null||l.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let b=z.create(a.state.doc,m),g=a.state.tr.setSelection(b);a.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),i=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:a}=this,u=!!this.node.type.spec.draggable,c=z.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(u&&l&&!a&&h){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Sd()||w_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function yn(e){return new PL({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let i=he(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=t,l=r[r.length-1],a=r[0],u=n.to;if(l){let c=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(Md(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+c,d),u=n.from+c+l.length,s.addMark(n.from+c,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var Oo=H(Re(),1),wS=H(Uc(),1);var ZL=Object.getOwnPropertyNames,XL=Object.getOwnPropertySymbols,QL=Object.prototype.hasOwnProperty;function rS(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function Pd(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var i=o.cache,s=i.get(n),l=i.get(r);if(s&&l)return s===r&&l===n;i.set(n,r),i.set(r,n);var a=e(n,r,o);return i.delete(n),i.delete(r),a}}function e8(e){return e?.[Symbol.toStringTag]}function oS(e){return ZL(e).concat(XL(e))}var t8=Object.hasOwn||(function(e,t){return QL.call(e,t)});function Ei(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var n8="__v",r8="__o",o8="_owner",iS=Object.getOwnPropertyDescriptor,sS=Object.keys;function i8(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function s8(e,t){return Ei(e.getTime(),t.getTime())}function l8(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function a8(e,t){return e===t}function lS(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),s,l,a=0;(s=i.next())&&!s.done;){for(var u=t.entries(),c=!1,d=0;(l=u.next())&&!l.done;){if(o[d]){d++;continue}var f=s.value,p=l.value;if(n.equals(f[0],p[0],a,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;a++}return!0}var u8=Ei;function c8(e,t,n){var r=sS(e),o=r.length;if(sS(t).length!==o)return!1;for(;o-- >0;)if(!dS(e,t,n,r[o]))return!1;return!0}function Oa(e,t,n){var r=oS(e),o=r.length;if(oS(t).length!==o)return!1;for(var i,s,l;o-- >0;)if(i=r[o],!dS(e,t,n,i)||(s=iS(e,i),l=iS(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function d8(e,t){return Ei(e.valueOf(),t.valueOf())}function f8(e,t){return e.source===t.source&&e.flags===t.flags}function aS(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),s,l;(s=i.next())&&!s.done;){for(var a=t.values(),u=!1,c=0;(l=a.next())&&!l.done;){if(!o[c]&&n.equals(s.value,l.value,s.value,l.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function p8(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function h8(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function dS(e,t,n,r){return(r===o8||r===r8||r===n8)&&(e.$$typeof||t.$$typeof)?!0:t8(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var m8="[object Arguments]",g8="[object Boolean]",b8="[object Date]",y8="[object Error]",x8="[object Map]",v8="[object Number]",k8="[object Object]",E8="[object RegExp]",w8="[object Set]",_8="[object String]",S8="[object URL]",C8=Array.isArray,uS=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,cS=Object.assign,T8=Object.prototype.toString.call.bind(Object.prototype.toString);function A8(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,l=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual,p=e.unknownTagComparators;return function(m,b,g){if(m===b)return!0;if(m==null||b==null)return!1;var y=typeof m;if(y!==typeof b)return!1;if(y!=="object")return y==="number"?s(m,b,g):y==="function"?o(m,b,g):!1;var x=m.constructor;if(x!==b.constructor)return!1;if(x===Object)return l(m,b,g);if(C8(m))return t(m,b,g);if(uS!=null&&uS(m))return d(m,b,g);if(x===Date)return n(m,b,g);if(x===RegExp)return u(m,b,g);if(x===Map)return i(m,b,g);if(x===Set)return c(m,b,g);var v=T8(m);if(v===b8)return n(m,b,g);if(v===E8)return u(m,b,g);if(v===x8)return i(m,b,g);if(v===w8)return c(m,b,g);if(v===k8)return typeof m.then!="function"&&typeof b.then!="function"&&l(m,b,g);if(v===S8)return f(m,b,g);if(v===y8)return r(m,b,g);if(v===m8)return l(m,b,g);if(v===g8||v===v8||v===_8)return a(m,b,g);if(p){var k=p[v];if(!k){var E=e8(m);E&&(k=p[E])}if(k)return k(m,b,g)}return!1}}function N8(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?Oa:i8,areDatesEqual:s8,areErrorsEqual:l8,areFunctionsEqual:a8,areMapsEqual:r?rS(lS,Oa):lS,areNumbersEqual:u8,areObjectsEqual:r?Oa:c8,arePrimitiveWrappersEqual:d8,areRegExpsEqual:f8,areSetsEqual:r?rS(aS,Oa):aS,areTypedArraysEqual:r?Oa:p8,areUrlsEqual:h8,unknownTagComparators:void 0};if(n&&(o=cS({},o,n(o))),t){var i=Pd(o.areArraysEqual),s=Pd(o.areMapsEqual),l=Pd(o.areObjectsEqual),a=Pd(o.areSetsEqual);o=cS({},o,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:l,areSetsEqual:a})}return o}function M8(e){return function(t,n,r,o,i,s,l){return e(t,n,l)}}function O8(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(a,u){var c=r(),d=c.cache,f=d===void 0?t?new WeakMap:void 0:d,p=c.meta;return n(a,u,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(a,u){return n(a,u,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var s={cache:void 0,equals:o,meta:void 0,strict:i};return function(a,u){return n(a,u,s)}}var fS=No(),uV=No({strict:!0}),cV=No({circular:!0}),dV=No({circular:!0,strict:!0}),fV=No({createInternalComparator:function(){return Ei}}),pV=No({strict:!0,createInternalComparator:function(){return Ei}}),hV=No({circular:!0,createInternalComparator:function(){return Ei}}),mV=No({circular:!0,createInternalComparator:function(){return Ei},strict:!0});function No(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,s=i===void 0?!1:i,l=N8(e),a=A8(l),u=r?r(a):M8(a);return O8({circular:n,comparator:a,createState:o,equals:u,strict:s})}var Ro=H(Re(),1),_S=H(gS(),1),TS=H(de(),1),Da=H(Re(),1),OS=H(de(),1),DS=H(Re(),1),IS=H(de(),1);var PS=H(Re(),1),Zg=H(Re(),1),BS=H(ks(),1),FS=H(de(),1),X8=H(de(),1);var Hs=H(Re(),1),zS=H(de(),1),U8=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},$8=({contentComponent:e})=>{let t=(0,kS.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Pr.jsx)(Pr.Fragment,{children:Object.values(t)})};function H8(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:vS.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var q8=class extends Mo.default.Component{constructor(e){var t;super(e),this.editorContentRef=Mo.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(e.view.dom),e.setOptions({element:t}),e.contentComponent=H8(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.firstChild))return;let n=document.createElement("div");n.append(t.view.dom),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{ref:U8(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Pr.jsx)($8,{contentComponent:e.contentComponent})]})}},V8=(0,Mo.forwardRef)((e,t)=>{let n=Mo.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Mo.default.createElement(q8,{key:n,innerRef:t,...e})}),ES=Mo.default.memo(V8),W8=typeof window<"u"?Ro.useLayoutEffect:Ro.useEffect,j8=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function Xg(e){var t;let[n]=(0,Ro.useState)(()=>new j8(e.editor)),r=(0,_S.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:fS);return W8(()=>n.watch(e.editor),[e.editor,n]),(0,Ro.useDebugValue)(r),r}var bS=!1,Jg=typeof window>"u",K8=Jg||!!(typeof window<"u"&&window.next),G8=class SS{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Jg||K8){if(bS)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Jg&&bS)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new Z_(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?SS.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function CS(e={},t=[]){let n=(0,Oo.useRef)(e);n.current=e;let[r]=(0,Oo.useState)(()=>new G8(n)),o=(0,wS.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,Oo.useDebugValue)(o),(0,Oo.useEffect)(r.onRender(t)),Xg({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),o}var AS=(0,Ra.createContext)({editor:null}),kV=AS.Consumer,Fd=()=>(0,Ra.useContext)(AS);var NS=(0,Da.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var MS=()=>(0,Da.useContext)(NS);function RS({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=MS();return(0,OS.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var LS=DS.default.forwardRef((e,t)=>{let{onDragStart:n}=MS(),r=e.as||"div";return(0,IS.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function yS(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function xS(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function Y8(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function J8(e){if(yS(e)||xS(e))return!0;if(Y8(e)){let t=e.type;if(t)return yS(t)||xS(t)}return!1}function Z8(){try{if(Zg.version)return parseInt(Zg.version.split(".")[0],10)>=19}catch{}return!1}var Qg=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,BS.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=Z8(),i=J8(t),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=l=>{this.ref=l}),this.reactElement=(0,FS.jsx)(t,{...s}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},EV=PS.default.createContext({markViewContentRef:()=>{}});var Q8=class extends nS{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(a={})=>this.updateAttributes(a),deleteNode:()=>this.deleteNode(),ref:(0,Hs.createRef)()};if(!this.component.displayName){let a=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=a(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:a=>{a&&this.contentDOMElement&&a.firstChild!==this.contentDOMElement&&(a.hasAttribute("data-node-view-wrapper")&&a.removeAttribute("data-node-view-wrapper"),a.appendChild(this.contentDOMElement))}},o=this.component,i=(0,Hs.memo)(a=>(0,zS.jsx)(NS.Provider,{value:r,children:(0,Hs.createElement)(o,a)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Qg(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=Us(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function US(e,t){return n=>n.editor.contentComponent?new Q8(e,n,t):{}}var qs=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var eP=/^\s*>\s$/,$S=Q.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return qs("blockquote",{...ne(this.options.HTMLAttributes,e),children:qs("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let l=t.renderChildren([o]).split(` +`)}function YL(e,t,n={}){let{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((l,a)=>{let u=i.mapping.map(a),c=i.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var Q=class rS extends Kg{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new rS(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},oS=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,i,s,l;let{view:a}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let y=this.dom.getBoundingClientRect(),x=c.getBoundingClientRect(),v=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,k=(s=e.offsetY)!=null?s:(i=e.nativeEvent)==null?void 0:i.offsetY;d=x.x-y.x+v,f=x.y-y.y+k}let p=this.dom.cloneNode(!0);try{let y=this.dom.getBoundingClientRect();p.style.width=`${Math.round(y.width)}px`,p.style.height=`${Math.round(y.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(l=e.dataTransfer)==null||l.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let g=this.getPos();if(typeof g!="number")return;let b=z.create(a.state.doc,g),m=a.state.tr.setSelection(b);a.dispatch(m)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),i=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:a}=this,u=!!this.node.type.spec.draggable,c=z.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(u&&l&&!a&&h){let g=n.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Sd()||S_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function yn(e){return new LL({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let i=he(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=t,l=r[r.length-1],a=r[0],u=n.to;if(l){let c=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(Md(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+c,d),u=n.from+c+l.length,s.addMark(n.from+c,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var Oo=H(Re(),1),ES=H(Uc(),1);var{getOwnPropertyNames:JL,getOwnPropertySymbols:ZL}=Object,{hasOwnProperty:XL}=Object.prototype;function Zg(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function Pd(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);let{cache:i}=o,s=i.get(n),l=i.get(r);if(s&&l)return s===r&&l===n;i.set(n,r),i.set(r,n);let a=e(n,r,o);return i.delete(n),i.delete(r),a}}function QL(e){return e?.[Symbol.toStringTag]}function iS(e){return JL(e).concat(ZL(e))}var e8=Object.hasOwn||((e,t)=>XL.call(e,t));function Ei(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var t8="__v",n8="__o",r8="_owner",{getOwnPropertyDescriptor:sS,keys:lS}=Object;function o8(e,t){return e.byteLength===t.byteLength&&Bd(new Uint8Array(e),new Uint8Array(t))}function i8(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function s8(e,t){return e.byteLength===t.byteLength&&Bd(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function l8(e,t){return Ei(e.getTime(),t.getTime())}function a8(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function u8(e,t){return e===t}function aS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),i=e.entries(),s,l,a=0;for(;(s=i.next())&&!s.done;){let u=t.entries(),c=!1,d=0;for(;(l=u.next())&&!l.done;){if(o[d]){d++;continue}let f=s.value,p=l.value;if(n.equals(f[0],p[0],a,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;a++}return!0}var c8=Ei;function d8(e,t,n){let r=lS(e),o=r.length;if(lS(t).length!==o)return!1;for(;o-- >0;)if(!cS(e,t,n,r[o]))return!1;return!0}function Oa(e,t,n){let r=iS(e),o=r.length;if(iS(t).length!==o)return!1;let i,s,l;for(;o-- >0;)if(i=r[o],!cS(e,t,n,i)||(s=sS(e,i),l=sS(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function f8(e,t){return Ei(e.valueOf(),t.valueOf())}function p8(e,t){return e.source===t.source&&e.flags===t.flags}function uS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),i=e.values(),s,l;for(;(s=i.next())&&!s.done;){let a=t.values(),u=!1,c=0;for(;(l=a.next())&&!l.done;){if(!o[c]&&n.equals(s.value,l.value,s.value,l.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function Bd(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function h8(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function cS(e,t,n,r){return(r===r8||r===n8||r===t8)&&(e.$$typeof||t.$$typeof)?!0:e8(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var m8="[object ArrayBuffer]",g8="[object Arguments]",b8="[object Boolean]",y8="[object DataView]",x8="[object Date]",v8="[object Error]",k8="[object Map]",E8="[object Number]",w8="[object Object]",_8="[object RegExp]",S8="[object Set]",C8="[object String]",T8={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},A8="[object URL]",N8=Object.prototype.toString;function M8({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:h}){return function(b,m,y){if(b===m)return!0;if(b==null||m==null)return!1;let x=typeof b;if(x!==typeof m)return!1;if(x!=="object")return x==="number"?l(b,m,y):x==="function"?i(b,m,y):!1;let v=b.constructor;if(v!==m.constructor)return!1;if(v===Object)return a(b,m,y);if(Array.isArray(b))return t(b,m,y);if(v===Date)return r(b,m,y);if(v===RegExp)return c(b,m,y);if(v===Map)return s(b,m,y);if(v===Set)return d(b,m,y);let k=N8.call(b);if(k===x8)return r(b,m,y);if(k===_8)return c(b,m,y);if(k===k8)return s(b,m,y);if(k===S8)return d(b,m,y);if(k===w8)return typeof b.then!="function"&&typeof m.then!="function"&&a(b,m,y);if(k===A8)return p(b,m,y);if(k===v8)return o(b,m,y);if(k===g8)return a(b,m,y);if(T8[k])return f(b,m,y);if(k===m8)return e(b,m,y);if(k===y8)return n(b,m,y);if(k===b8||k===E8||k===C8)return u(b,m,y);if(h){let E=h[k];if(!E){let w=QL(b);w&&(E=h[w])}if(E)return E(b,m,y)}return!1}}function O8({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:o8,areArraysEqual:n?Oa:i8,areDataViewsEqual:s8,areDatesEqual:l8,areErrorsEqual:a8,areFunctionsEqual:u8,areMapsEqual:n?Zg(aS,Oa):aS,areNumbersEqual:c8,areObjectsEqual:n?Oa:d8,arePrimitiveWrappersEqual:f8,areRegExpsEqual:p8,areSetsEqual:n?Zg(uS,Oa):uS,areTypedArraysEqual:n?Zg(Bd,Oa):Bd,areUrlsEqual:h8,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let o=Pd(r.areArraysEqual),i=Pd(r.areMapsEqual),s=Pd(r.areObjectsEqual),l=Pd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return r}function R8(e){return function(t,n,r,o,i,s,l){return e(t,n,l)}}function D8({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(l,a){let{cache:u=e?new WeakMap:void 0,meta:c}=n();return t(l,a,{cache:u,equals:r,meta:c,strict:o})};if(e)return function(l,a){return t(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};let i={cache:void 0,equals:r,meta:void 0,strict:o};return function(l,a){return t(l,a,i)}}var dS=No(),dq=No({strict:!0}),fq=No({circular:!0}),pq=No({circular:!0,strict:!0}),hq=No({createInternalComparator:()=>Ei}),mq=No({strict:!0,createInternalComparator:()=>Ei}),gq=No({circular:!0,createInternalComparator:()=>Ei}),bq=No({circular:!0,createInternalComparator:()=>Ei,strict:!0});function No(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,i=O8(e),s=M8(i),l=n?n(s):R8(s);return D8({circular:t,comparator:s,createState:r,equals:l,strict:o})}var Ro=H(Re(),1),wS=H(mS(),1),CS=H(de(),1),Da=H(Re(),1),MS=H(de(),1),RS=H(Re(),1),DS=H(de(),1);var LS=H(Re(),1),Qg=H(Re(),1),PS=H(ks(),1),BS=H(de(),1),eP=H(de(),1);var Hs=H(Re(),1),FS=H(de(),1),H8=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},V8=({contentComponent:e})=>{let t=(0,vS.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Pr.jsx)(Pr.Fragment,{children:Object.values(t)})};function q8(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:xS.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var W8=class extends Mo.default.Component{constructor(e){var t;super(e),this.editorContentRef=Mo.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=q8(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{ref:H8(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Pr.jsx)(V8,{contentComponent:e.contentComponent})]})}},j8=(0,Mo.forwardRef)((e,t)=>{let n=Mo.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Mo.default.createElement(W8,{key:n,innerRef:t,...e})}),kS=Mo.default.memo(j8),K8=typeof window<"u"?Ro.useLayoutEffect:Ro.useEffect,G8=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function e1(e){var t;let[n]=(0,Ro.useState)(()=>new G8(e.editor)),r=(0,wS.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:dS);return K8(()=>n.watch(e.editor),[e.editor,n]),(0,Ro.useDebugValue)(r),r}var gS=!1,Xg=typeof window>"u",Y8=Xg||!!(typeof window<"u"&&window.next),J8=class _S{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Xg||Y8){if(gS)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Xg&&gS)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new Q_(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?_S.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function SS(e={},t=[]){let n=(0,Oo.useRef)(e);n.current=e;let[r]=(0,Oo.useState)(()=>new J8(n)),o=(0,ES.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,Oo.useDebugValue)(o),(0,Oo.useEffect)(r.onRender(t)),e1({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),o}var TS=(0,Ra.createContext)({editor:null}),wq=TS.Consumer,zd=()=>(0,Ra.useContext)(TS);var AS=(0,Da.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var NS=()=>(0,Da.useContext)(AS);function OS({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=NS();return(0,MS.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var IS=RS.default.forwardRef((e,t)=>{let{onDragStart:n}=NS(),r=e.as||"div";return(0,DS.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function bS(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function yS(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function Z8(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function X8(e){if(bS(e)||yS(e))return!0;if(Z8(e)){let t=e.type;if(t)return bS(t)||yS(t)}return!1}function Q8(){try{if(Qg.version)return parseInt(Qg.version.split(".")[0],10)>=19}catch{}return!1}var t1=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,PS.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=Q8(),i=X8(t),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=l=>{this.ref=l}),this.reactElement=(0,BS.jsx)(t,{...s}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},_q=LS.default.createContext({markViewContentRef:()=>{}});var tP=class extends oS{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(a={})=>this.updateAttributes(a),deleteNode:()=>this.deleteNode(),ref:(0,Hs.createRef)()};if(!this.component.displayName){let a=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=a(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:a=>{a&&this.contentDOMElement&&a.firstChild!==this.contentDOMElement&&(a.hasAttribute("data-node-view-wrapper")&&a.removeAttribute("data-node-view-wrapper"),a.appendChild(this.contentDOMElement))}},o=this.component,i=(0,Hs.memo)(a=>(0,FS.jsx)(AS.Provider,{value:r,children:(0,Hs.createElement)(o,a)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new t1(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=Us(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function zS(e,t){return n=>n.editor.contentComponent?new tP(e,n,t):{}}var Vs=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var nP=/^\s*>\s$/,US=Q.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return Vs("blockquote",{...ne(this.options.HTMLAttributes,e),children:Vs("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let l=t.renderChildren([o]).split(` `).map(a=>a.trim()===""?n:`${n} ${a}`);r.push(l.join(` `))}),r.join(` ${n} -`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Qn({find:eP,type:this.type})]}});var tP=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,nP=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,rP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,oP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,HS=Ge.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return qs("strong",{...ne(this.options.HTMLAttributes,e),children:qs("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Xn({find:tP,type:this.type}),Xn({find:rP,type:this.type})]},addPasteRules(){return[yn({find:nP,type:this.type}),yn({find:oP,type:this.type})]}});var iP=/(^|[^`])`([^`]+)`(?!`)$/,sP=/(^|[^`])`([^`]+)`(?!`)/g,qS=Ge.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Xn({find:iP,type:this.type})]},addPasteRules(){return[yn({find:sP,type:this.type})]}});var e1=4,lP=/^```([a-z]+)?[\s\n]$/,aP=/^~~~([a-z]+)?[\s\n]$/,t1=Q.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:e1,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",ne(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` +`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Qn({find:nP,type:this.type})]}});var rP=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,oP=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,iP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,sP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,$S=Ge.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Vs("strong",{...ne(this.options.HTMLAttributes,e),children:Vs("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Xn({find:rP,type:this.type}),Xn({find:iP,type:this.type})]},addPasteRules(){return[yn({find:oP,type:this.type}),yn({find:sP,type:this.type})]}});var lP=/(^|[^`])`([^`]+)`(?!`)$/,aP=/(^|[^`])`([^`]+)`(?!`)/g,HS=Ge.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Xn({find:lP,type:this.type})]},addPasteRules(){return[yn({find:aP,type:this.type})]}});var n1=4,uP=/^```([a-z]+)?[\s\n]$/,cP=/^~~~([a-z]+)?[\s\n]$/,r1=Q.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:n1,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",ne(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` `):r=`\`\`\`${o} -\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:e1,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?e.commands.insertContent(l):e.commands.command(({tr:a})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` +\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:n1,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?e.commands.insertContent(l):e.commands.command(({tr:a})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` `,` `).split(` `).map(h=>l+h).join(` -`);return a.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:e1,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?e.commands.command(({tr:l})=>{var a;let{pos:u}=i,c=i.start(),d=i.end(),p=r.doc.textBetween(c,d,` +`);return a.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:n1,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?e.commands.command(({tr:l})=>{var a;let{pos:u}=i,c=i.start(),d=i.end(),p=r.doc.textBetween(c,d,` `,` `).split(` -`),h=0,m=0,b=u-c;for(let E=0;E=b){h=E;break}m+=p[E].length+1}let y=((a=p[h].match(/^ */))==null?void 0:a[0])||"",x=Math.min(y.length,n);if(x===0)return!0;let v=c;for(let E=0;E{let{from:a,to:u}=o,f=r.doc.textBetween(a,u,` +`),h=0,g=0,b=u-c;for(let E=0;E=b){h=E;break}g+=p[E].length+1}let y=((a=p[h].match(/^ */))==null?void 0:a[0])||"",x=Math.min(y.length,n);if(x===0)return!0;let v=c;for(let E=0;E{let{from:a,to:u}=o,f=r.doc.textBetween(a,u,` `,` `).split(` -`).map(p=>{var h;let m=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(m.length,n);return p.slice(b)}).join(` +`).map(p=>{var h;let g=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(g.length,n);return p.slice(b)}).join(` `);return l.replaceWith(a,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` -`);return!i||!s?!1:e.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?e.commands.command(({tr:u})=>(u.setSelection(W.near(r.resolve(l))),!0)):e.commands.exitCode()}}},addInputRules(){return[Na({find:lP,type:this.type,getAttributes:e=>({language:e[1]})}),Na({find:aP,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new q({key:new Z("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=e.state,a=l.text(n.replace(/\r\n?/g,` -`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(U.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),VS=t1;var WS=Q.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`);return!i||!s?!1:e.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?e.commands.command(({tr:u})=>(u.setSelection(W.near(r.resolve(l))),!0)):e.commands.exitCode()}}},addInputRules(){return[Na({find:uP,type:this.type,getAttributes:e=>({language:e[1]})}),Na({find:cP,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new V({key:new Z("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=e.state,a=l.text(n.replace(/\r\n?/g,` +`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(U.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),VS=r1;var qS=Q.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):""});var jS=Q.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",ne(this.options.HTMLAttributes,e)]},renderText(){return` +`):""});var WS=Q.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",ne(this.options.HTMLAttributes,e)]},renderText(){return` `},renderMarkdown:()=>` -`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&s){let d=a.filter(f=>l.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var KS=Q.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,ne(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Na({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var GS=Q.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",ne(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Q_(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return Od(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,u=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(U.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection(z.create(s.doc,a.pos)):s.setSelection(U.create(s.doc,a.pos));else{let c=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(U.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[X_({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var uP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,cP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,dP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,fP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,YS=Ge.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",ne(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Xn({find:uP,type:this.type}),Xn({find:dP,type:this.type})]},addPasteRules(){return[yn({find:cP,type:this.type}),yn({find:fP,type:this.type})]}});var pP="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",hP="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",a1="numeric",u1="ascii",c1="alpha",Pa="asciinumeric",La="alphanumeric",d1="domain",nC="emoji",mP="scheme",gP="slashscheme",n1="whitespace";function bP(e,t){return e in t||(t[e]=[]),t[e]}function wi(e,t,n){t[a1]&&(t[Pa]=!0,t[La]=!0),t[u1]&&(t[Pa]=!0,t[c1]=!0),t[Pa]&&(t[La]=!0),t[c1]&&(t[La]=!0),t[La]&&(t[d1]=!0),t[nC]&&(t[d1]=!0);for(let r in t){let o=bP(r,n);o.indexOf(e)<0&&o.push(e)}}function yP(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function qt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}qt.groups={};qt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Ue=(e,t,n,r,o)=>e.tr(t,n,r,o),JS=(e,t,n,r,o)=>e.ts(t,n,r,o),D=(e,t,n,r,o)=>e.tt(t,n,r,o),zr="WORD",f1="UWORD",rC="ASCIINUMERICAL",oC="ALPHANUMERICAL",Ha="LOCALHOST",p1="TLD",h1="UTLD",Hd="SCHEME",Vs="SLASH_SCHEME",g1="NUM",m1="WS",b1="NL",Ba="OPENBRACE",Fa="CLOSEBRACE",qd="OPENBRACKET",Vd="CLOSEBRACKET",Wd="OPENPAREN",jd="CLOSEPAREN",Kd="OPENANGLEBRACKET",Gd="CLOSEANGLEBRACKET",Yd="FULLWIDTHLEFTPAREN",Jd="FULLWIDTHRIGHTPAREN",Zd="LEFTCORNERBRACKET",Xd="RIGHTCORNERBRACKET",Qd="LEFTWHITECORNERBRACKET",ef="RIGHTWHITECORNERBRACKET",tf="FULLWIDTHLESSTHAN",nf="FULLWIDTHGREATERTHAN",rf="AMPERSAND",of="APOSTROPHE",sf="ASTERISK",Io="AT",lf="BACKSLASH",af="BACKTICK",uf="CARET",Lo="COLON",y1="COMMA",cf="DOLLAR",er="DOT",df="EQUALS",x1="EXCLAMATION",vn="HYPHEN",za="PERCENT",ff="PIPE",pf="PLUS",hf="POUND",Ua="QUERY",v1="QUOTE",iC="FULLWIDTHMIDDLEDOT",k1="SEMI",tr="SLASH",$a="TILDE",mf="UNDERSCORE",sC="EMOJI",gf="SYM",lC=Object.freeze({__proto__:null,ALPHANUMERICAL:oC,AMPERSAND:rf,APOSTROPHE:of,ASCIINUMERICAL:rC,ASTERISK:sf,AT:Io,BACKSLASH:lf,BACKTICK:af,CARET:uf,CLOSEANGLEBRACKET:Gd,CLOSEBRACE:Fa,CLOSEBRACKET:Vd,CLOSEPAREN:jd,COLON:Lo,COMMA:y1,DOLLAR:cf,DOT:er,EMOJI:sC,EQUALS:df,EXCLAMATION:x1,FULLWIDTHGREATERTHAN:nf,FULLWIDTHLEFTPAREN:Yd,FULLWIDTHLESSTHAN:tf,FULLWIDTHMIDDLEDOT:iC,FULLWIDTHRIGHTPAREN:Jd,HYPHEN:vn,LEFTCORNERBRACKET:Zd,LEFTWHITECORNERBRACKET:Qd,LOCALHOST:Ha,NL:b1,NUM:g1,OPENANGLEBRACKET:Kd,OPENBRACE:Ba,OPENBRACKET:qd,OPENPAREN:Wd,PERCENT:za,PIPE:ff,PLUS:pf,POUND:hf,QUERY:Ua,QUOTE:v1,RIGHTCORNERBRACKET:Xd,RIGHTWHITECORNERBRACKET:ef,SCHEME:Hd,SEMI:k1,SLASH:tr,SLASH_SCHEME:Vs,SYM:gf,TILDE:$a,TLD:p1,UNDERSCORE:mf,UTLD:h1,UWORD:f1,WORD:zr,WS:m1}),Br=/[a-z]/,Ia=/\p{L}/u,r1=/\p{Emoji}/u;var Fr=/\d/,o1=/\s/;var ZS="\r",i1=` -`,xP="\uFE0F",vP="\u200D",s1="\uFFFC",zd=null,Ud=null;function kP(e=[]){let t={};qt.groups=t;let n=new qt;zd==null&&(zd=XS(pP)),Ud==null&&(Ud=XS(hP)),D(n,"'",of),D(n,"{",Ba),D(n,"}",Fa),D(n,"[",qd),D(n,"]",Vd),D(n,"(",Wd),D(n,")",jd),D(n,"<",Kd),D(n,">",Gd),D(n,"\uFF08",Yd),D(n,"\uFF09",Jd),D(n,"\u300C",Zd),D(n,"\u300D",Xd),D(n,"\u300E",Qd),D(n,"\u300F",ef),D(n,"\uFF1C",tf),D(n,"\uFF1E",nf),D(n,"&",rf),D(n,"*",sf),D(n,"@",Io),D(n,"`",af),D(n,"^",uf),D(n,":",Lo),D(n,",",y1),D(n,"$",cf),D(n,".",er),D(n,"=",df),D(n,"!",x1),D(n,"-",vn),D(n,"%",za),D(n,"|",ff),D(n,"+",pf),D(n,"#",hf),D(n,"?",Ua),D(n,'"',v1),D(n,"/",tr),D(n,";",k1),D(n,"~",$a),D(n,"_",mf),D(n,"\\",lf),D(n,"\u30FB",iC);let r=Ue(n,Fr,g1,{[a1]:!0});Ue(r,Fr,r);let o=Ue(r,Br,rC,{[Pa]:!0}),i=Ue(r,Ia,oC,{[La]:!0}),s=Ue(n,Br,zr,{[u1]:!0});Ue(s,Fr,o),Ue(s,Br,s),Ue(o,Fr,o),Ue(o,Br,o);let l=Ue(n,Ia,f1,{[c1]:!0});Ue(l,Br),Ue(l,Fr,i),Ue(l,Ia,l),Ue(i,Fr,i),Ue(i,Br),Ue(i,Ia,i);let a=D(n,i1,b1,{[n1]:!0}),u=D(n,ZS,m1,{[n1]:!0}),c=Ue(n,o1,m1,{[n1]:!0});D(n,s1,c),D(u,i1,a),D(u,s1,c),Ue(u,o1,c),D(c,ZS),D(c,i1),Ue(c,o1,c),D(c,s1,c);let d=Ue(n,r1,sC,{[nC]:!0});D(d,"#"),Ue(d,r1,d),D(d,xP,d);let f=D(d,vP);D(f,"#"),Ue(f,r1,d);let p=[[Br,s],[Fr,o]],h=[[Br,null],[Ia,l],[Fr,i]];for(let m=0;mm[0]>b[0]?1:-1);for(let m=0;m=0?y[d1]=!0:Br.test(b)?Fr.test(b)?y[Pa]=!0:y[u1]=!0:y[a1]=!0,JS(n,b,b,y)}return JS(n,"localhost",Ha,{ascii:!0}),n.jd=new qt(gf),{start:n,tokens:Object.assign({groups:t},lC)}}function aC(e,t){let n=EP(t.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s=0&&(d+=n[s].length,f++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=f,u-=d,o.push({t:c.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function EP(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Do(e,t,n,r,o){let i,s=t.length;for(let l=0;l=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}var qa={defaultProtocol:"http",events:null,format:QS,formatHref:QS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function E1(e,t=null){let n=Object.assign({},qa);e&&(n=Object.assign(n,e instanceof E1?e.o:e));let r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=qa.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},l=e.get("className",n,t),a=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=r,l&&(s.class=l),a&&(s.target=a),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:o,attributes:s,content:i,eventListeners:d}}};function bf(e,t){class n extends uC{constructor(o,i){super(o,i),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var eC=bf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tC=bf("text"),wP=bf("nl"),$d=bf("url",{isLink:!0,toHref(e=qa.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ha&&e[1].t===Lo}});var xn=e=>new qt(e);function _P({groups:e}){let t=e.domain.concat([rf,sf,Io,lf,af,uf,cf,df,vn,g1,za,ff,pf,hf,tr,gf,$a,mf]),n=[of,Lo,y1,er,x1,za,Ua,v1,k1,Kd,Gd,Ba,Fa,Vd,qd,Wd,jd,Yd,Jd,Zd,Xd,Qd,ef,tf,nf],r=[rf,of,sf,lf,af,uf,cf,df,vn,Ba,Fa,za,ff,pf,hf,Ua,tr,gf,$a,mf],o=xn(),i=D(o,$a);se(i,r,i),se(i,e.domain,i);let s=xn(),l=xn(),a=xn();se(o,e.domain,s),se(o,e.scheme,l),se(o,e.slashscheme,a),se(s,r,i),se(s,e.domain,s);let u=D(s,Io);D(i,Io,u),D(l,Io,u),D(a,Io,u);let c=D(i,er);se(c,r,i),se(c,e.domain,i);let d=xn();se(u,e.domain,d),se(d,e.domain,d);let f=D(d,er);se(f,e.domain,d);let p=xn(eC);se(f,e.tld,p),se(f,e.utld,p),D(u,Ha,p);let h=D(d,vn);D(h,vn,h),se(h,e.domain,d),se(p,e.domain,d),D(p,er,f),D(p,vn,h);let m=D(p,Lo);se(m,e.numeric,eC);let b=D(s,vn),g=D(s,er);D(b,vn,b),se(b,e.domain,s),se(g,r,i),se(g,e.domain,s);let y=xn($d);se(g,e.tld,y),se(g,e.utld,y),se(y,e.domain,s),se(y,r,i),D(y,er,g),D(y,vn,b),D(y,Io,u);let x=D(y,Lo),v=xn($d);se(x,e.numeric,v);let k=xn($d),E=xn();se(k,t,k),se(k,n,E),se(E,t,k),se(E,n,E),D(y,tr,k),D(v,tr,k);let w=D(l,Lo),_=D(a,Lo),A=D(_,tr),T=D(A,tr);se(l,e.domain,s),D(l,er,g),D(l,vn,b),se(a,e.domain,s),D(a,er,g),D(a,vn,b),se(w,e.domain,k),D(w,tr,k),D(w,Ua,k),se(T,e.domain,k),se(T,t,k),D(T,tr,k);let B=[[Ba,Fa],[qd,Vd],[Wd,jd],[Kd,Gd],[Yd,Jd],[Zd,Xd],[Qd,ef],[tf,nf]];for(let G=0;G=0&&f++,o++,c++;if(f<0)o-=c,o0&&(i.push(l1(tC,t,s)),s=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);i.push(l1(p,t,h))}}return s.length>0&&i.push(l1(tC,t,s)),i}function l1(e,t,n){let r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}var CP=typeof console<"u"&&console&&console.warn||(()=>{}),TP="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ne={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function cC(){return qt.groups={},Ne.scanner=null,Ne.parser=null,Ne.tokenQueue=[],Ne.pluginQueue=[],Ne.customSchemes=[],Ne.initialized=!1,Ne}function w1(e,t=!1){if(Ne.initialized&&CP(`linkifyjs: already initialized - will not register custom scheme "${e}" ${TP}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. +`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&s){let d=a.filter(f=>l.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var jS=Q.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,ne(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Na({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var KS=Q.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",ne(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!tS(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return Od(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,u=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(U.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection(z.create(s.doc,a.pos)):s.setSelection(U.create(s.doc,a.pos));else{let c=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(U.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[eS({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var dP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,fP=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,pP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,hP=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,GS=Ge.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",ne(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Xn({find:dP,type:this.type}),Xn({find:pP,type:this.type})]},addPasteRules(){return[yn({find:fP,type:this.type}),yn({find:hP,type:this.type})]}});var mP="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",gP="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",c1="numeric",d1="ascii",f1="alpha",Pa="asciinumeric",La="alphanumeric",p1="domain",tC="emoji",bP="scheme",yP="slashscheme",o1="whitespace";function xP(e,t){return e in t||(t[e]=[]),t[e]}function wi(e,t,n){t[c1]&&(t[Pa]=!0,t[La]=!0),t[d1]&&(t[Pa]=!0,t[f1]=!0),t[Pa]&&(t[La]=!0),t[f1]&&(t[La]=!0),t[La]&&(t[p1]=!0),t[tC]&&(t[p1]=!0);for(let r in t){let o=xP(r,n);o.indexOf(e)<0&&o.push(e)}}function vP(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Vt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Vt.groups={};Vt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Ue=(e,t,n,r,o)=>e.tr(t,n,r,o),YS=(e,t,n,r,o)=>e.ts(t,n,r,o),D=(e,t,n,r,o)=>e.tt(t,n,r,o),zr="WORD",h1="UWORD",nC="ASCIINUMERICAL",rC="ALPHANUMERICAL",Ha="LOCALHOST",m1="TLD",g1="UTLD",Vd="SCHEME",qs="SLASH_SCHEME",y1="NUM",b1="WS",x1="NL",Ba="OPENBRACE",Fa="CLOSEBRACE",qd="OPENBRACKET",Wd="CLOSEBRACKET",jd="OPENPAREN",Kd="CLOSEPAREN",Gd="OPENANGLEBRACKET",Yd="CLOSEANGLEBRACKET",Jd="FULLWIDTHLEFTPAREN",Zd="FULLWIDTHRIGHTPAREN",Xd="LEFTCORNERBRACKET",Qd="RIGHTCORNERBRACKET",ef="LEFTWHITECORNERBRACKET",tf="RIGHTWHITECORNERBRACKET",nf="FULLWIDTHLESSTHAN",rf="FULLWIDTHGREATERTHAN",of="AMPERSAND",sf="APOSTROPHE",lf="ASTERISK",Io="AT",af="BACKSLASH",uf="BACKTICK",cf="CARET",Lo="COLON",v1="COMMA",df="DOLLAR",er="DOT",ff="EQUALS",k1="EXCLAMATION",vn="HYPHEN",za="PERCENT",pf="PIPE",hf="PLUS",mf="POUND",Ua="QUERY",E1="QUOTE",oC="FULLWIDTHMIDDLEDOT",w1="SEMI",tr="SLASH",$a="TILDE",gf="UNDERSCORE",iC="EMOJI",bf="SYM",sC=Object.freeze({__proto__:null,ALPHANUMERICAL:rC,AMPERSAND:of,APOSTROPHE:sf,ASCIINUMERICAL:nC,ASTERISK:lf,AT:Io,BACKSLASH:af,BACKTICK:uf,CARET:cf,CLOSEANGLEBRACKET:Yd,CLOSEBRACE:Fa,CLOSEBRACKET:Wd,CLOSEPAREN:Kd,COLON:Lo,COMMA:v1,DOLLAR:df,DOT:er,EMOJI:iC,EQUALS:ff,EXCLAMATION:k1,FULLWIDTHGREATERTHAN:rf,FULLWIDTHLEFTPAREN:Jd,FULLWIDTHLESSTHAN:nf,FULLWIDTHMIDDLEDOT:oC,FULLWIDTHRIGHTPAREN:Zd,HYPHEN:vn,LEFTCORNERBRACKET:Xd,LEFTWHITECORNERBRACKET:ef,LOCALHOST:Ha,NL:x1,NUM:y1,OPENANGLEBRACKET:Gd,OPENBRACE:Ba,OPENBRACKET:qd,OPENPAREN:jd,PERCENT:za,PIPE:pf,PLUS:hf,POUND:mf,QUERY:Ua,QUOTE:E1,RIGHTCORNERBRACKET:Qd,RIGHTWHITECORNERBRACKET:tf,SCHEME:Vd,SEMI:w1,SLASH:tr,SLASH_SCHEME:qs,SYM:bf,TILDE:$a,TLD:m1,UNDERSCORE:gf,UTLD:g1,UWORD:h1,WORD:zr,WS:b1}),Br=/[a-z]/,Ia=/\p{L}/u,i1=/\p{Emoji}/u;var Fr=/\d/,s1=/\s/;var JS="\r",l1=` +`,kP="\uFE0F",EP="\u200D",a1="\uFFFC",Ud=null,$d=null;function wP(e=[]){let t={};Vt.groups=t;let n=new Vt;Ud==null&&(Ud=ZS(mP)),$d==null&&($d=ZS(gP)),D(n,"'",sf),D(n,"{",Ba),D(n,"}",Fa),D(n,"[",qd),D(n,"]",Wd),D(n,"(",jd),D(n,")",Kd),D(n,"<",Gd),D(n,">",Yd),D(n,"\uFF08",Jd),D(n,"\uFF09",Zd),D(n,"\u300C",Xd),D(n,"\u300D",Qd),D(n,"\u300E",ef),D(n,"\u300F",tf),D(n,"\uFF1C",nf),D(n,"\uFF1E",rf),D(n,"&",of),D(n,"*",lf),D(n,"@",Io),D(n,"`",uf),D(n,"^",cf),D(n,":",Lo),D(n,",",v1),D(n,"$",df),D(n,".",er),D(n,"=",ff),D(n,"!",k1),D(n,"-",vn),D(n,"%",za),D(n,"|",pf),D(n,"+",hf),D(n,"#",mf),D(n,"?",Ua),D(n,'"',E1),D(n,"/",tr),D(n,";",w1),D(n,"~",$a),D(n,"_",gf),D(n,"\\",af),D(n,"\u30FB",oC);let r=Ue(n,Fr,y1,{[c1]:!0});Ue(r,Fr,r);let o=Ue(r,Br,nC,{[Pa]:!0}),i=Ue(r,Ia,rC,{[La]:!0}),s=Ue(n,Br,zr,{[d1]:!0});Ue(s,Fr,o),Ue(s,Br,s),Ue(o,Fr,o),Ue(o,Br,o);let l=Ue(n,Ia,h1,{[f1]:!0});Ue(l,Br),Ue(l,Fr,i),Ue(l,Ia,l),Ue(i,Fr,i),Ue(i,Br),Ue(i,Ia,i);let a=D(n,l1,x1,{[o1]:!0}),u=D(n,JS,b1,{[o1]:!0}),c=Ue(n,s1,b1,{[o1]:!0});D(n,a1,c),D(u,l1,a),D(u,a1,c),Ue(u,s1,c),D(c,JS),D(c,l1),Ue(c,s1,c),D(c,a1,c);let d=Ue(n,i1,iC,{[tC]:!0});D(d,"#"),Ue(d,i1,d),D(d,kP,d);let f=D(d,EP);D(f,"#"),Ue(f,i1,d);let p=[[Br,s],[Fr,o]],h=[[Br,null],[Ia,l],[Fr,i]];for(let g=0;gg[0]>b[0]?1:-1);for(let g=0;g=0?y[p1]=!0:Br.test(b)?Fr.test(b)?y[Pa]=!0:y[d1]=!0:y[c1]=!0,YS(n,b,b,y)}return YS(n,"localhost",Ha,{ascii:!0}),n.jd=new Vt(bf),{start:n,tokens:Object.assign({groups:t},sC)}}function lC(e,t){let n=_P(t.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s=0&&(d+=n[s].length,f++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=f,u-=d,o.push({t:c.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function _P(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Do(e,t,n,r,o){let i,s=t.length;for(let l=0;l=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Va={defaultProtocol:"http",events:null,format:XS,formatHref:XS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function _1(e,t=null){let n=Object.assign({},Va);e&&(n=Object.assign(n,e instanceof _1?e.o:e));let r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Va.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},l=e.get("className",n,t),a=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=r,l&&(s.class=l),a&&(s.target=a),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:o,attributes:s,content:i,eventListeners:d}}};function yf(e,t){class n extends aC{constructor(o,i){super(o,i),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var QS=yf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eC=yf("text"),SP=yf("nl"),Hd=yf("url",{isLink:!0,toHref(e=Va.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ha&&e[1].t===Lo}});var xn=e=>new Vt(e);function CP({groups:e}){let t=e.domain.concat([of,lf,Io,af,uf,cf,df,ff,vn,y1,za,pf,hf,mf,tr,bf,$a,gf]),n=[sf,Lo,v1,er,k1,za,Ua,E1,w1,Gd,Yd,Ba,Fa,Wd,qd,jd,Kd,Jd,Zd,Xd,Qd,ef,tf,nf,rf],r=[of,sf,lf,af,uf,cf,df,ff,vn,Ba,Fa,za,pf,hf,mf,Ua,tr,bf,$a,gf],o=xn(),i=D(o,$a);se(i,r,i),se(i,e.domain,i);let s=xn(),l=xn(),a=xn();se(o,e.domain,s),se(o,e.scheme,l),se(o,e.slashscheme,a),se(s,r,i),se(s,e.domain,s);let u=D(s,Io);D(i,Io,u),D(l,Io,u),D(a,Io,u);let c=D(i,er);se(c,r,i),se(c,e.domain,i);let d=xn();se(u,e.domain,d),se(d,e.domain,d);let f=D(d,er);se(f,e.domain,d);let p=xn(QS);se(f,e.tld,p),se(f,e.utld,p),D(u,Ha,p);let h=D(d,vn);D(h,vn,h),se(h,e.domain,d),se(p,e.domain,d),D(p,er,f),D(p,vn,h);let g=D(p,Lo);se(g,e.numeric,QS);let b=D(s,vn),m=D(s,er);D(b,vn,b),se(b,e.domain,s),se(m,r,i),se(m,e.domain,s);let y=xn(Hd);se(m,e.tld,y),se(m,e.utld,y),se(y,e.domain,s),se(y,r,i),D(y,er,m),D(y,vn,b),D(y,Io,u);let x=D(y,Lo),v=xn(Hd);se(x,e.numeric,v);let k=xn(Hd),E=xn();se(k,t,k),se(k,n,E),se(E,t,k),se(E,n,E),D(y,tr,k),D(v,tr,k);let w=D(l,Lo),_=D(a,Lo),A=D(_,tr),T=D(A,tr);se(l,e.domain,s),D(l,er,m),D(l,vn,b),se(a,e.domain,s),D(a,er,m),D(a,vn,b),se(w,e.domain,k),D(w,tr,k),D(w,Ua,k),se(T,e.domain,k),se(T,t,k),D(T,tr,k);let B=[[Ba,Fa],[qd,Wd],[jd,Kd],[Gd,Yd],[Jd,Zd],[Xd,Qd],[ef,tf],[nf,rf]];for(let G=0;G=0&&f++,o++,c++;if(f<0)o-=c,o0&&(i.push(u1(eC,t,s)),s=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);i.push(u1(p,t,h))}}return s.length>0&&i.push(u1(eC,t,s)),i}function u1(e,t,n){let r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}var AP=typeof console<"u"&&console&&console.warn||(()=>{}),NP="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ne={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function uC(){return Vt.groups={},Ne.scanner=null,Ne.parser=null,Ne.tokenQueue=[],Ne.pluginQueue=[],Ne.customSchemes=[],Ne.initialized=!1,Ne}function S1(e,t=!1){if(Ne.initialized&&AP(`linkifyjs: already initialized - will not register custom scheme "${e}" ${NP}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);Ne.customSchemes.push([e,t])}function AP(){Ne.scanner=kP(Ne.customSchemes);for(let e=0;e{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=zg(n.doc,[...t]);if(Wg(l).forEach(({newRange:u})=>{let c=T_(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!MP.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(NP).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=yf(h).map(g=>g.toObject(e.defaultProtocol));if(!RP(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{Md(g.from,g.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function IP(e){return new q({key:new Z("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let l=null;if(r.target instanceof HTMLAnchorElement)l=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;l=f.find(p=>p.nodeName==="A")}if(!l)return s;let a=Vg(t.state,e.type.name),u=(o=l?.href)!=null?o:a.href,c=(i=l?.target)!=null?i:a.target;l&&u&&(window.open(u,c),s=!0)}return s}}})}function LP(e){return new q({key:new Z("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:i}=t,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});let u=xf(a,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function _i(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(OP,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var S1=Ge.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){w1(e);return}w1(e.scheme,e.optionalSlashes)})},onDestroy(){cC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!_i(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!_i(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!_i(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ne(this.options.HTMLAttributes,e),0]:["a",ne(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_i(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!_i(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[yn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=xf(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!_i(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(DP({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!_i(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(IP({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(LP({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),dC=S1;var PP=Object.defineProperty,BP=(e,t)=>{for(var n in t)PP(e,n,{get:t[n],enumerable:!0})},FP="listItem",fC="textStyle",pC=/^\s*([-+*])\s$/,A1=Q.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(FP,this.editor.getAttributes(fC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Qn({find:pC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Qn({find:pC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(fC),editor:this.editor})),[e]}}),N1=Q.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=e.tokens.slice(1),l=t.parseChildren(s);n.push(...l)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>Ma(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),zP={};BP(zP,{findListItemPos:()=>Va,getNextListDepth:()=>M1,handleBackspace:()=>C1,handleDelete:()=>T1,hasListBefore:()=>bC,hasListItemAfter:()=>UP,hasListItemBefore:()=>yC,listItemHasSubList:()=>xC,nextListIsDeeper:()=>vC,nextListIsHigher:()=>kC});var Va=(e,t)=>{let{$from:n}=t.selection,r=ze(e,t.schema),o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:t.doc.resolve(s),depth:l}},M1=(e,t)=>{let n=Va(e,t);if(!n)return!1;let[,r]=R_(t,e,n.$pos.pos+4);return r},bC=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},yC=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},xC=(e,t,n)=>{if(!n)return!1;let r=ze(e,t.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},C1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Zn(e.state,t)&&bC(e.state,t,n)){let{$anchor:l}=e.state.selection,a=e.state.doc.resolve(l.before()-1),u=[];a.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(a.start()+c.pos+1);return e.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Zn(e.state,t)||!I_(e.state))return!1;let r=Va(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=xC(t,e.state,i);return yC(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},vC=(e,t)=>{let n=M1(e,t),r=Va(e,t);return!r||!n?!1:n>r.depth},kC=(e,t)=>{let n=M1(e,t),r=Va(e,t);return!r||!n?!1:n{if(!Zn(e.state,t)||!D_(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:vC(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():kC(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},UP=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},O1=re.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&T1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&T1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&C1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&C1(e,n,r)&&(t=!0)}),t}}}}),hC=/^(\s*)(\d+)\.\s+(.*)$/,$P=/^\s/;function HP(e){let t=[],n=0,r=0;for(;n{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=Ug(n.doc,[...t]);if(jg(l).forEach(({newRange:u})=>{let c=N_(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!RP.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(OP).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],g=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=xf(h).map(m=>m.toObject(e.defaultProtocol));if(!IP(b))return!1;b.filter(m=>m.isLink).map(m=>({...m,from:g+m.start+1,to:g+m.end+1})).filter(m=>r.schema.marks.code?!r.doc.rangeHasMark(m.from,m.to,r.schema.marks.code):!0).filter(m=>e.validate(m.value)).filter(m=>e.shouldAutoLink(m.value)).forEach(m=>{Md(m.from,m.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(m.from,m.to,e.type.create({href:m.href}))})}}),!!s.steps.length)return s}})}function PP(e){return new V({key:new Z("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let l=null;if(r.target instanceof HTMLAnchorElement)l=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;l=f.find(p=>p.nodeName==="A")}if(!l)return s;let a=Wg(t.state,e.type.name),u=(o=l?.href)!=null?o:a.href,c=(i=l?.target)!=null?i:a.target;l&&u&&(window.open(u,c),s=!0)}return s}}})}function BP(e){return new V({key:new Z("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:i}=t,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});let u=vf(a,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function _i(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(DP,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var T1=Ge.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){S1(e);return}S1(e.scheme,e.optionalSlashes)})},onDestroy(){uC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!_i(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!_i(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!_i(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ne(this.options.HTMLAttributes,e),0]:["a",ne(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_i(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!_i(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[yn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=vf(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!_i(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(LP({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!_i(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(PP({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(BP({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),cC=T1;var FP=Object.defineProperty,zP=(e,t)=>{for(var n in t)FP(e,n,{get:t[n],enumerable:!0})},UP="listItem",dC="textStyle",fC=/^\s*([-+*])\s$/,M1=Q.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(UP,this.editor.getAttributes(dC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Qn({find:fC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Qn({find:fC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(dC),editor:this.editor})),[e]}}),O1=Q.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=e.tokens.slice(1),l=t.parseChildren(s);n.push(...l)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>Ma(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$P={};zP($P,{findListItemPos:()=>qa,getNextListDepth:()=>R1,handleBackspace:()=>A1,handleDelete:()=>N1,hasListBefore:()=>gC,hasListItemAfter:()=>HP,hasListItemBefore:()=>bC,listItemHasSubList:()=>yC,nextListIsDeeper:()=>xC,nextListIsHigher:()=>vC});var qa=(e,t)=>{let{$from:n}=t.selection,r=ze(e,t.schema),o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:t.doc.resolve(s),depth:l}},R1=(e,t)=>{let n=qa(e,t);if(!n)return!1;let[,r]=I_(t,e,n.$pos.pos+4);return r},gC=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},bC=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},yC=(e,t,n)=>{if(!n)return!1;let r=ze(e,t.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},A1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Zn(e.state,t)&&gC(e.state,t,n)){let{$anchor:l}=e.state.selection,a=e.state.doc.resolve(l.before()-1),u=[];a.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(a.start()+c.pos+1);return e.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Zn(e.state,t)||!P_(e.state))return!1;let r=qa(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=yC(t,e.state,i);return bC(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},xC=(e,t)=>{let n=R1(e,t),r=qa(e,t);return!r||!n?!1:n>r.depth},vC=(e,t)=>{let n=R1(e,t),r=qa(e,t);return!r||!n?!1:n{if(!Zn(e.state,t)||!L_(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:xC(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():vC(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},HP=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},D1=re.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&N1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&N1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&A1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&A1(e,n,r)&&(t=!0)}),t}}}}),pC=/^(\s*)(\d+)\.\s+(.*)$/,VP=/^\s/;function qP(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=EC(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` -`)})}o.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return o}function qP(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=t.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=t.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var VP="listItem",mC="textStyle",gC=/^(\d+)\.\s$/,R1=Q.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",ne(this.options.HTMLAttributes,n),0]:["ol",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?qP(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`).trim();if(c){let p=n.blockTokens(c);u.push(...p)}let d=i+1,f=[];for(;dt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(g=>g.indent)),h=kC(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(g=>g.raw).join(` +`)})}o.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return o}function WP(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=t.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=t.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var jP="listItem",hC="textStyle",mC=/^(\d+)\.\s$/,I1=Q.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",ne(this.options.HTMLAttributes,n),0]:["ol",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?WP(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` `):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=t?.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;let o=e.split(` -`),[i,s]=HP(o);if(i.length===0)return;let l=EC(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(` -`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(VP,this.editor.getAttributes(mC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Qn({find:gC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Qn({find:gC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(mC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),WP=/^\s*(\[([( |x])?\])\s$/,vf=Q.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",ne(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return Ma(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),u=c=>{var d,f;l.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,l.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:a,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,l.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[Qn({find:WP,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),kf=Q.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",ne(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=i=>{let s=Ld(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Ld(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),EW=re.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(A1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(N1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(O1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(R1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(vf.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(kf.configure(this.options.taskList)),e}});var wC=Q.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",ne(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var jP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,KP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,_C=Ge.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Xn({find:jP,type:this.type})]},addPasteRules(){return[yn({find:KP,type:this.type})]}});var SC=Q.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var CC=Ge.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",ne(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function TC(e={}){return new q({view(t){return new D1(t,e)}})}var D1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*l;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!a||a==document.body&&getComputedStyle(a).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,p=d.height/a.offsetHeight;u=d.left-a.scrollLeft*f,c=d.top-a.scrollTop*p}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-c)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Zc(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var _t=class e extends W{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):W.near(r)}content(){return L.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new I1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!GP(t)||!YP(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let l=t.node(s);if(n>0?t.indexAfter(s)0){i=l.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let a=t.doc.resolve(o);if(e.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!z.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}return null}}};_t.prototype.visible=!1;_t.findFrom=_t.findGapCursorFrom;W.jsonID("gapcursor",_t);var I1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return _t.valid(n)?new _t(n):W.near(n)}};function AC(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function GP(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||AC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function YP(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||AC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function NC(){return new q({props:{decorations:QP,createSelectionBetween(e,t,n){return t.pos==n.pos&&_t.valid(n)?new _t(n):null},handleClick:ZP,handleKeyDown:JP,handleDOMEvents:{beforeinput:XP}}})}var JP=Ca({ArrowLeft:Ef("horiz",-1),ArrowRight:Ef("horiz",1),ArrowUp:Ef("vert",-1),ArrowDown:Ef("vert",1)});function Ef(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,l=t>0?s.$to:s.$from,a=s.empty;if(s instanceof U){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(t>0?l.after():l.before())}let u=_t.findGapCursorFrom(l,t,a);return u?(o&&o(r.tr.setSelection(new _t(u))),!0):!1}}function ZP(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!_t.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&z.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new _t(r))),!0)}function XP(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof _t))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=N.empty;for(let s=r.length-1;s>=0;s--)o=N.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new L(o,0,0));return i.setSelection(U.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function QP(e){if(!(e.selection instanceof _t))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",xe.create(e.doc,[Oe.widget(e.selection.head,t,{key:"gapcursor"})])}var wf=200,ct=function(){};ct.prototype.append=function(t){return t.length?(t=ct.from(t),!this.length&&t||t.length=n?ct.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};ct.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};ct.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};ct.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};ct.from=function(t){return t instanceof ct?t:t&&t.length?new MC(t):ct.empty};var MC=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=wf)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=wf)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(ct);ct.empty=new MC([]);var e5=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(ct),L1=ct;var t5=500,Ci=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new nr(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new nr(h,void 0,void 0,u.length+c.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(t,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cr5&&(l=n5(l,u),s-=u),new e(l.append(i),s)}remapping(t,n){let r=new fa;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new nr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},o);let a=n;this.items.forEach(f=>{let p=i.getMirror(--a);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(a+1,p));b&&l++,r.push(new nr(h,m,b))}else r.push(new nr(h))},o);let u=[];for(let f=n;ft5&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=t)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new nr(u.invert(),a,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new e(L1.from(o.reverse()),i)}};Ci.empty=new Ci(L1.empty,0);function n5(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var nr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},rr=class{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},r5=20;function o5(e,t,n,r){let o=n.getMeta(Si),i;if(o)return o.historyState;n.getMeta(l5)&&(e=new rr(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Si))return s.getMeta(Si).redo?new rr(e.done.addTransform(n,void 0,r,_f(t)),e.undone,OC(n.mapping.maps),e.prevTime,e.prevComposition):new rr(e.done,e.undone.addTransform(n,void 0,r,_f(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=e.prevTime==0||!s&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!i5(n,e.prevRanges)),u=s?P1(e.prevRanges,n.mapping):OC(n.mapping.maps);return new rr(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,_f(t)),Ci.empty,u,n.time,l??e.prevComposition)}else return(i=n.getMeta("rebased"))?new rr(e.done.rebased(n,i),e.undone.rebased(n,i),P1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new rr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),P1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function i5(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function OC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,s)=>t.push(i,s));return t}function P1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=Si.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=s5(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}var F1=Sf(!1,!0),z1=Sf(!0,!0),GW=Sf(!1,!1),YW=Sf(!0,!1);var tj=re.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new q({key:new Z("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>o){let s=i-o,l=0,a=s,u=r.tr.deleteRange(l,a);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;let l=t.selection.$head.pos,a=i-r,u=l-a,c=l;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),LC=re.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[TC(this.options)]}}),lj=re.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new q({key:new Z("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return xe.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((a,u)=>{if(a.isText)return;if(!(o>=u&&o<=u+a.nodeSize-1))return!1;s+=1});let l=0;return e.descendants((a,u)=>{if(a.isText||!(o>=u&&o<=u+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(Oe.node(u,u+a.nodeSize,{class:this.options.className}))}),xe.create(e,i)}}})]}}),PC=re.create({name:"gapCursor",addProseMirrorPlugins(){return[NC()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=he(j(e,"allowGapCursor",n)))!=null?t:null}}}),U1=re.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new q({key:new Z("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let i=this.editor.isEmpty;return e.descendants((s,l)=>{let a=r>=l&&r<=l+s.nodeSize,u=!s.isLeaf&&Aa(s);if((a||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];i&&c.push(this.options.emptyEditorClass);let d=Oe.node(l,l+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:a}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),xe.create(e,o)}}})]}}),gj=re.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new q({key:new Z("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Od(n.selection)||e.view.dragging?null:xe.create(n.doc,[Oe.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function IC({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var BC=re.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Z(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new q({key:t,appendTransaction:(o,i,s)=>{let{doc:l,tr:a,schema:u}=s,c=t.getState(s),d=l.content.size,f=u.nodes[n];if(c)return a.insert(d,f.create())},state:{init:(o,i)=>{let s=i.tr.doc.lastChild;return!IC({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;let s=o.doc.lastChild;return!IC({node:s,types:r})}}})]}}),FC=re.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>F1(e,t),redo:()=>({state:e,dispatch:t})=>z1(e,t)}},addProseMirrorPlugins(){return[DC(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var a5=re.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(HS.configure(this.options.bold)),this.options.blockquote!==!1&&o.push($S.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(A1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(qS.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(t1.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(WS.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(LC.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(PC.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(jS.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(KS.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(FC.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(GS.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(YS.configure(this.options.italic)),this.options.listItem!==!1&&o.push(N1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(O1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(S1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(R1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(wC.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(_C.configure(this.options.strike)),this.options.text!==!1&&o.push(SC.configure(this.options.text)),this.options.underline!==!1&&o.push(CC.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(BC.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),zC=a5;var UC=U1;var $C=kf;var HC=vf;var H1,q1;if(typeof WeakMap<"u"){let e=new WeakMap;H1=t=>e.get(t),q1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;H1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var $e=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:g-x});break}let v=o+x*t;for(let k=0;kr&&(i+=u.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function d5(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function p5(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Bn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Of(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Ws(t.$head)||h5(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function h5(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function V1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function m5(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function K1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function XC(e,t,n){let r=e.node(-1),o=$e.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return s==null?null:e.node(0).resolve(i+s)}function Ti(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function QC(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-i);a.unshift(n.pos-i);let u=a.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=i+c+1;return new Ns(l.resolve(f),l.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(V1(r)&&V1(o)&&K1(r,o)){let i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Ur.rowSelection(r,o):i&&this.isColSelection()?Ur.colSelection(r,o):new Ur(r,o)}return U.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=$e.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let a=o.top;a0||b>0){let g=h.attrs;if(m>0&&(g=Ti(g,0,m)),b>0&&(g=Ti(g,g.colspan-b,b)),p.lefto.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.top<=l.top?(s.top>0&&(t=a.resolve(i+o.map[s.left])),l.bottom0&&(n=a.resolve(i+o.map[l.left])),s.bottom0)return!1;let s=o+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(t){return t instanceof Ur&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.left<=l.left?(s.left>0&&(t=a.resolve(i+o.map[s.top*o.width])),l.right0&&(n=a.resolve(i+o.map[l.top*o.width])),s.right{t.push(Oe.node(r,r+n.nodeSize,{class:"selectedCell"}))}),xe.create(e.doc,t)}function x5({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function v5({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){let i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function k5(e,t,n){let r=(t||e).selection,o=(t||e).doc,i,s;if(r instanceof z&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=me.create(o,r.from);else if(s=="row"){let l=o.resolve(r.from+1);i=me.rowSelection(l,l)}else if(!n){let l=$e.get(r.node),a=r.from+1,u=a+l.map[l.width*l.height-1];i=me.create(o,a+1,u)}}else r instanceof U&&x5(r)?i=U.create(o,r.from):r instanceof U&&v5(r)&&(i=U.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var E5=new Z("fix-tables");function tT(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let s=0,l=0;s{o.type.spec.tableRole=="table"&&(n=w5(e,o,i,n))};return t?t.doc!=e.doc&&tT(t.doc,e.doc,0,r):e.doc.descendants(r),n}function w5(e,t,n,r){let o=$e.get(t);if(!o.problems)return r;r||(r=e.tr);let i=[];for(let a=0;a0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;g5(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let s=0;s0&&o0&&t.map[l-1]==a||o0?-1:0;S5(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=a+1+u.content.size,d=qC(u)?a+1:c;i.replaceWith(d+r.tableStart,c+r.tableStart,l)}i.setSelection(new me(i.doc.resolve(a+r.tableStart))),t(i)}return!0}function J1(e,t){let n=St(e.schema);return A5(({node:r})=>n[r.type.spec.tableRole])(e,t)}function A5(e){return(t,n)=>{let r=t.selection,o,i;if(r instanceof me){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=p5(r.$from),!o)return!1;i=(s=Ws(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs,a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let c=or(t),d=t.tr;for(let p=0;p{s.attrs[e]!==t&&i.setNodeMarkup(l,null,{...s.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function N5(e){return function(t,n){if(!Bn(t))return!1;if(n){let r=St(t.schema),o=or(t),i=t.tr,s=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(a=>o.table.nodeAt(a));for(let a=0;a{let p=f+i.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),r(s)}return!0}}var eK=js("row",{useDeprecatedLogic:!0}),tK=js("column",{useDeprecatedLogic:!0}),dT=js("cell",{useDeprecatedLogic:!0});function M5(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let i=e.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Cf(e,t){let n=e.selection;if(!(n instanceof me))return!1;if(t){let r=e.tr,o=St(e.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new L(o,0,0))}),r.docChanged&&t(r)}return!0}function O5(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if(i=="row")for(let a=0;a=0;s--){let{rowspan:l,colspan:a}=i.child(s).attrs;for(let u=o;u=t.length&&t.push(N.empty),n[o]r&&(f=f.type.createChecked(Ti(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),a.push(d)}i.push(N.from(a))}n=i,t=o}return{width:e,height:t,rows:n}}function I5(e,t,n,r,o,i,s){let l=e.doc.type.schema,a=St(l),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==a.header_cell;d.push(b?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}let f=a.row.create(null,N.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let i=n.selection;if(i instanceof me)return Nf(n,r,W.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;let s=pT(o,e,t);if(s==null)return!1;if(e=="horiz")return Nf(n,r,W.near(n.doc.resolve(i.head+t),t));{let l=n.doc.resolve(s),a=XC(l,e,t),u;return a?u=W.near(a,1):t<0?u=W.near(n.doc.resolve(l.before(-1)),-1):u=W.near(n.doc.resolve(l.after(-1)),1),Nf(n,r,u)}}}function Af(e,t){return(n,r,o)=>{if(!o)return!1;let i=n.selection,s;if(i instanceof me)s=i;else{let a=pT(o,e,t);if(a==null)return!1;s=new me(n.doc.resolve(a))}let l=XC(s.$headCell,e,t);return l?Nf(n,r,new me(s.$anchorCell,l)):!1}}function P5(e,t){let n=e.state.doc,r=Ws(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new me(r))),!0):!1}function B5(e,t,n){if(!Bn(e.state))return!1;let r=O5(n),o=e.state.selection;if(o instanceof me){r||(r={width:1,height:1,rows:[N.from(W1(St(e.state.schema).cell,n))]});let i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=$e.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=D5(r,l.right-l.left,l.bottom-l.top),KC(e.state,e.dispatch,s,l,r),!0}else if(r){let i=Of(e.state),s=i.start(-1);return KC(e.state,e.dispatch,s,$e.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function F5(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=GC(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof me)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=Ws(e.state.selection.$anchor))!=null&&((n=$1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(a,u){let c=$1(e,u),d=Po.getState(e.state)==null;if(!c||!K1(a,c))if(d)c=a;else return;let f=new me(a,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Po,a.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",l),Po.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Po,-1))}function l(a){let u=a,c=Po.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(GC(e,u.target)!=r&&(d=$1(e,t),!d))return s();d&&i(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",l)}function pT(e,t,n){if(!(e.state.selection instanceof U))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){let s=r.before(o),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function GC(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function $1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return Ws(e.state.doc.resolve(r))}var z5=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),j1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,j1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function j1(e,t,n,r,o,i){let s=0,l=!0,a=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new U5(-1,!1)},apply(s,l){return l.apply(s)}},props:{attributes:s=>{let l=en.getState(s);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,l)=>{$5(s,l,e,o)},mouseleave:s=>{H5(s)},mousedown:(s,l)=>{q5(s,l,t,n)}},decorations:s=>{let l=en.getState(s);if(l&&l.activeHandle>-1)return G5(s,l.activeHandle)},nodeViews:{}}});return i}var U5=class Mf{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(en);if(r&&r.setHandle!=null)return new Mf(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Mf(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return V1(t.doc.resolve(o))||(o=-1),new Mf(o,n.dragging)}return n}};function $5(e,t,n,r){if(!e.editable)return;let o=en.getState(e.state);if(o&&!o.dragging){let i=W5(t.target),s=-1;if(i){let{left:l,right:a}=i.getBoundingClientRect();t.clientX-l<=n?s=YC(e,t,"left",n):a-t.clientX<=n&&(s=YC(e,t,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){let l=e.state.doc.resolve(s),a=l.node(-1),u=$e.get(a),c=l.start(-1);if(u.colCount(l.pos-c)+l.nodeAfter.attrs.colspan-1==u.width-1)return}mT(e,s)}}}function H5(e){if(!e.editable)return;let t=en.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&mT(e,-1)}function q5(e,t,n,r){var o;if(!e.editable)return!1;let i=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=en.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let l=e.state.doc.nodeAt(s.activeHandle),a=V5(e,s.activeHandle,l.attrs);e.dispatch(e.state.tr.setMeta(en,{setDragging:{startX:t.clientX,startWidth:a}}));function u(d){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",c);let f=en.getState(e.state);f?.dragging&&(j5(e,f.activeHandle,JC(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(en,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=en.getState(e.state);if(f&&f.dragging){let p=JC(f.dragging,d,n);ZC(e,f.activeHandle,p,r)}}return ZC(e,s.activeHandle,a,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",c),t.preventDefault(),!0}function V5(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let a=0;a{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){let i=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&i&&i[s]){let l=i[s].getAttribute("width");return l?[parseInt(l,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",ne(this.options.HTMLAttributes,e),0]}}),eb=Q.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",ne(this.options.HTMLAttributes,e),0]}}),tb=Q.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",ne(this.options.HTMLAttributes,e),0]}});function X1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function bT(e,t,n,r,o,i){var s;let l=0,a=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function X5(e,t,n,r,o){let i=Z5(e),s=[],l=[];for(let u=0;u{let{selection:t}=e.state;if(!Q5(t))return!1;let n=0,r=Ug(t.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},eB="";function tB(e){return(e||"").replace(/\s+/g," ").trim()}function nB(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:eB;if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(b=>{let g="";b.content&&Array.isArray(b.content)&&b.content.length>1?g=b.content.map(k=>t.renderChildren(k)).join(o):g=b.content?t.renderChildren(b.content):"";let y=tB(g),x=b.type==="tableHeader";m.push({text:y,isHeader:x})}),i.push(m)});let s=i.reduce((h,m)=>Math.max(h,m.length),0);if(s===0)return"";let l=new Array(s).fill(0);i.forEach(h=>{var m;for(let b=0;bl[b]&&(l[b]=y),l[b]<3&&(l[b]=3)}});let a=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=i[0],c=u.some(h=>h.isHeader),d=` -`,f=new Array(s).fill(0).map((h,m)=>c&&u[m]&&u[m].text||"");return d+=`| ${f.map((h,m)=>a(h,l[m])).join(" | ")} | +`),[i,s]=qP(o);if(i.length===0)return;let l=kC(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(jP,this.editor.getAttributes(hC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Qn({find:mC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Qn({find:mC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(hC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),KP=/^\s*(\[([( |x])?\])\s$/,kf=Q.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",ne(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return Ma(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),u=c=>{var d,f;l.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,l.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:a,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,l.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[Qn({find:KP,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Ef=Q.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",ne(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=i=>{let s=Ld(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Ld(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),_W=re.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(M1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(O1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(D1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(I1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(kf.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Ef.configure(this.options.taskList)),e}});var EC=Q.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",ne(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var GP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,YP=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,wC=Ge.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",ne(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Xn({find:GP,type:this.type})]},addPasteRules(){return[yn({find:YP,type:this.type})]}});var _C=Q.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var SC=Ge.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",ne(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function CC(e={}){return new V({view(t){return new L1(t,e)}})}var L1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),g=d?h.bottom:h.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*l;r={left:h.left,right:h.right,top:g-b,bottom:g+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!a||a==document.body&&getComputedStyle(a).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,p=d.height/a.offsetHeight;u=d.left-a.scrollLeft*f,c=d.top-a.scrollTop*p}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-c)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Zc(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var _t=class e extends W{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):W.near(r)}content(){return L.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new P1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!JP(t)||!ZP(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let l=t.node(s);if(n>0?t.indexAfter(s)0){i=l.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let a=t.doc.resolve(o);if(e.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!z.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}return null}}};_t.prototype.visible=!1;_t.findFrom=_t.findGapCursorFrom;W.jsonID("gapcursor",_t);var P1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return _t.valid(n)?new _t(n):W.near(n)}};function TC(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function JP(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||TC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function ZP(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||TC(o.type))return!0;if(o.inlineContent)return!1}}return!0}function AC(){return new V({props:{decorations:t5,createSelectionBetween(e,t,n){return t.pos==n.pos&&_t.valid(n)?new _t(n):null},handleClick:QP,handleKeyDown:XP,handleDOMEvents:{beforeinput:e5}}})}var XP=Ca({ArrowLeft:wf("horiz",-1),ArrowRight:wf("horiz",1),ArrowUp:wf("vert",-1),ArrowDown:wf("vert",1)});function wf(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,l=t>0?s.$to:s.$from,a=s.empty;if(s instanceof U){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(t>0?l.after():l.before())}let u=_t.findGapCursorFrom(l,t,a);return u?(o&&o(r.tr.setSelection(new _t(u))),!0):!1}}function QP(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!_t.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&z.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new _t(r))),!0)}function e5(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof _t))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=N.empty;for(let s=r.length-1;s>=0;s--)o=N.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new L(o,0,0));return i.setSelection(U.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function t5(e){if(!(e.selection instanceof _t))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",xe.create(e.doc,[Oe.widget(e.selection.head,t,{key:"gapcursor"})])}var _f=200,ct=function(){};ct.prototype.append=function(t){return t.length?(t=ct.from(t),!this.length&&t||t.length<_f&&this.leafAppend(t)||this.length<_f&&t.leafPrepend(this)||this.appendInner(t)):this};ct.prototype.prepend=function(t){return t.length?ct.from(t).append(this):this};ct.prototype.appendInner=function(t){return new n5(this,t)};ct.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?ct.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};ct.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};ct.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};ct.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};ct.from=function(t){return t instanceof ct?t:t&&t.length?new NC(t):ct.empty};var NC=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=_f)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=_f)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(ct);ct.empty=new NC([]);var n5=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(ct),B1=ct;var r5=500,Ci=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new nr(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new nr(h,void 0,void 0,u.length+c.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(t,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;ci5&&(l=o5(l,u),s-=u),new e(l.append(i),s)}remapping(t,n){let r=new fa;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new nr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},o);let a=n;this.items.forEach(f=>{let p=i.getMirror(--a);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let g=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(a+1,p));b&&l++,r.push(new nr(h,g,b))}else r.push(new nr(h))},o);let u=[];for(let f=n;fr5&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=t)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new nr(u.invert(),a,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new e(B1.from(o.reverse()),i)}};Ci.empty=new Ci(B1.empty,0);function o5(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var nr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},rr=class{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},i5=20;function s5(e,t,n,r){let o=n.getMeta(Si),i;if(o)return o.historyState;n.getMeta(u5)&&(e=new rr(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Si))return s.getMeta(Si).redo?new rr(e.done.addTransform(n,void 0,r,Sf(t)),e.undone,MC(n.mapping.maps),e.prevTime,e.prevComposition):new rr(e.done,e.undone.addTransform(n,void 0,r,Sf(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=e.prevTime==0||!s&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!l5(n,e.prevRanges)),u=s?F1(e.prevRanges,n.mapping):MC(n.mapping.maps);return new rr(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Sf(t)),Ci.empty,u,n.time,l??e.prevComposition)}else return(i=n.getMeta("rebased"))?new rr(e.done.rebased(n,i),e.undone.rebased(n,i),F1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new rr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),F1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function l5(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function MC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,s)=>t.push(i,s));return t}function F1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=Si.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=a5(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}var U1=Cf(!1,!0),$1=Cf(!0,!0),JW=Cf(!1,!1),ZW=Cf(!0,!1);var rj=re.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new V({key:new Z("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>o){let s=i-o,l=0,a=s,u=r.tr.deleteRange(l,a);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;let l=t.selection.$head.pos,a=i-r,u=l-a,c=l;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),IC=re.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[CC(this.options)]}}),uj=re.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new V({key:new Z("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return xe.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((a,u)=>{if(a.isText)return;if(!(o>=u&&o<=u+a.nodeSize-1))return!1;s+=1});let l=0;return e.descendants((a,u)=>{if(a.isText||!(o>=u&&o<=u+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(Oe.node(u,u+a.nodeSize,{class:this.options.className}))}),xe.create(e,i)}}})]}}),LC=re.create({name:"gapCursor",addProseMirrorPlugins(){return[AC()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=he(j(e,"allowGapCursor",n)))!=null?t:null}}}),H1=re.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new V({key:new Z("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let i=this.editor.isEmpty;return e.descendants((s,l)=>{let a=r>=l&&r<=l+s.nodeSize,u=!s.isLeaf&&Aa(s);if((a||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];i&&c.push(this.options.emptyEditorClass);let d=Oe.node(l,l+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:a}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),xe.create(e,o)}}})]}}),yj=re.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new V({key:new Z("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Od(n.selection)||e.view.dragging?null:xe.create(n.doc,[Oe.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function DC({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var PC=re.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Z(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new V({key:t,appendTransaction:(o,i,s)=>{let{doc:l,tr:a,schema:u}=s,c=t.getState(s),d=l.content.size,f=u.nodes[n];if(c)return a.insert(d,f.create())},state:{init:(o,i)=>{let s=i.tr.doc.lastChild;return!DC({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;let s=o.doc.lastChild;return!DC({node:s,types:r})}}})]}}),BC=re.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>U1(e,t),redo:()=>({state:e,dispatch:t})=>$1(e,t)}},addProseMirrorPlugins(){return[RC(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var c5=re.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push($S.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(US.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(M1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(HS.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(r1.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(qS.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(IC.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(LC.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(WS.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(jS.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(BC.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(KS.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(GS.configure(this.options.italic)),this.options.listItem!==!1&&o.push(O1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(D1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(T1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(I1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(EC.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(wC.configure(this.options.strike)),this.options.text!==!1&&o.push(_C.configure(this.options.text)),this.options.underline!==!1&&o.push(SC.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(PC.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),FC=c5;var zC=H1;var UC=Ef;var $C=kf;var q1,W1;if(typeof WeakMap<"u"){let e=new WeakMap;q1=t=>e.get(t),W1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;q1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var $e=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:m-x});break}let v=o+x*t;for(let k=0;kr&&(i+=u.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function p5(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function m5(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Bn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Rf(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Ws(t.$head)||g5(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function g5(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function j1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function b5(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Y1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function ZC(e,t,n){let r=e.node(-1),o=$e.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return s==null?null:e.node(0).resolve(i+s)}function Ti(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function XC(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-i);a.unshift(n.pos-i);let u=a.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=i+c+1;return new Ns(l.resolve(f),l.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(j1(r)&&j1(o)&&Y1(r,o)){let i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Ur.rowSelection(r,o):i&&this.isColSelection()?Ur.colSelection(r,o):new Ur(r,o)}return U.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=$e.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let a=o.top;a0||b>0){let m=h.attrs;if(g>0&&(m=Ti(m,0,g)),b>0&&(m=Ti(m,m.colspan-b,b)),p.lefto.bottom){let m={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.top<=l.top?(s.top>0&&(t=a.resolve(i+o.map[s.left])),l.bottom0&&(n=a.resolve(i+o.map[l.left])),s.bottom0)return!1;let s=o+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(t){return t instanceof Ur&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=$e.get(r),i=t.start(-1),s=o.findCell(t.pos-i),l=o.findCell(n.pos-i),a=t.node(0);return s.left<=l.left?(s.left>0&&(t=a.resolve(i+o.map[s.top*o.width])),l.right0&&(n=a.resolve(i+o.map[l.top*o.width])),s.right{t.push(Oe.node(r,r+n.nodeSize,{class:"selectedCell"}))}),xe.create(e.doc,t)}function k5({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function E5({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){let i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function w5(e,t,n){let r=(t||e).selection,o=(t||e).doc,i,s;if(r instanceof z&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=me.create(o,r.from);else if(s=="row"){let l=o.resolve(r.from+1);i=me.rowSelection(l,l)}else if(!n){let l=$e.get(r.node),a=r.from+1,u=a+l.map[l.width*l.height-1];i=me.create(o,a+1,u)}}else r instanceof U&&k5(r)?i=U.create(o,r.from):r instanceof U&&E5(r)&&(i=U.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var _5=new Z("fix-tables");function eT(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let s=0,l=0;s{o.type.spec.tableRole=="table"&&(n=S5(e,o,i,n))};return t?t.doc!=e.doc&&eT(t.doc,e.doc,0,r):e.doc.descendants(r),n}function S5(e,t,n,r){let o=$e.get(t);if(!o.problems)return r;r||(r=e.tr);let i=[];for(let a=0;a0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;y5(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let s=0;s0&&o0&&t.map[l-1]==a||o0?-1:0;T5(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=a+1+u.content.size,d=HC(u)?a+1:c;i.replaceWith(d+r.tableStart,c+r.tableStart,l)}i.setSelection(new me(i.doc.resolve(a+r.tableStart))),t(i)}return!0}function X1(e,t){let n=St(e.schema);return M5(({node:r})=>n[r.type.spec.tableRole])(e,t)}function M5(e){return(t,n)=>{let r=t.selection,o,i;if(r instanceof me){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=m5(r.$from),!o)return!1;i=(s=Ws(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs,a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let c=or(t),d=t.tr;for(let p=0;p{s.attrs[e]!==t&&i.setNodeMarkup(l,null,{...s.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function O5(e){return function(t,n){if(!Bn(t))return!1;if(n){let r=St(t.schema),o=or(t),i=t.tr,s=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(a=>o.table.nodeAt(a));for(let a=0;a{let p=f+i.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),r(s)}return!0}}var nK=js("row",{useDeprecatedLogic:!0}),rK=js("column",{useDeprecatedLogic:!0}),cT=js("cell",{useDeprecatedLogic:!0});function R5(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let i=e.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Tf(e,t){let n=e.selection;if(!(n instanceof me))return!1;if(t){let r=e.tr,o=St(e.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new L(o,0,0))}),r.docChanged&&t(r)}return!0}function D5(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if(i=="row")for(let a=0;a=0;s--){let{rowspan:l,colspan:a}=i.child(s).attrs;for(let u=o;u=t.length&&t.push(N.empty),n[o]r&&(f=f.type.createChecked(Ti(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),a.push(d)}i.push(N.from(a))}n=i,t=o}return{width:e,height:t,rows:n}}function P5(e,t,n,r,o,i,s){let l=e.doc.type.schema,a=St(l),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,g=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[g+h]).type==a.header_cell;d.push(b?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}let f=a.row.create(null,N.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let i=n.selection;if(i instanceof me)return Mf(n,r,W.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;let s=fT(o,e,t);if(s==null)return!1;if(e=="horiz")return Mf(n,r,W.near(n.doc.resolve(i.head+t),t));{let l=n.doc.resolve(s),a=ZC(l,e,t),u;return a?u=W.near(a,1):t<0?u=W.near(n.doc.resolve(l.before(-1)),-1):u=W.near(n.doc.resolve(l.after(-1)),1),Mf(n,r,u)}}}function Nf(e,t){return(n,r,o)=>{if(!o)return!1;let i=n.selection,s;if(i instanceof me)s=i;else{let a=fT(o,e,t);if(a==null)return!1;s=new me(n.doc.resolve(a))}let l=ZC(s.$headCell,e,t);return l?Mf(n,r,new me(s.$anchorCell,l)):!1}}function F5(e,t){let n=e.state.doc,r=Ws(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new me(r))),!0):!1}function z5(e,t,n){if(!Bn(e.state))return!1;let r=D5(n),o=e.state.selection;if(o instanceof me){r||(r={width:1,height:1,rows:[N.from(K1(St(e.state.schema).cell,n))]});let i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=$e.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=L5(r,l.right-l.left,l.bottom-l.top),jC(e.state,e.dispatch,s,l,r),!0}else if(r){let i=Rf(e.state),s=i.start(-1);return jC(e.state,e.dispatch,s,$e.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function U5(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=KC(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof me)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=Ws(e.state.selection.$anchor))!=null&&((n=V1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(a,u){let c=V1(e,u),d=Po.getState(e.state)==null;if(!c||!Y1(a,c))if(d)c=a;else return;let f=new me(a,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Po,a.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",l),Po.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Po,-1))}function l(a){let u=a,c=Po.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(KC(e,u.target)!=r&&(d=V1(e,t),!d))return s();d&&i(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",l)}function fT(e,t,n){if(!(e.state.selection instanceof U))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){let s=r.before(o),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function KC(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function V1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return Ws(e.state.doc.resolve(r))}var $5=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),G1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,G1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function G1(e,t,n,r,o,i){let s=0,l=!0,a=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new H5(-1,!1)},apply(s,l){return l.apply(s)}},props:{attributes:s=>{let l=en.getState(s);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,l)=>{V5(s,l,e,o)},mouseleave:s=>{q5(s)},mousedown:(s,l)=>{W5(s,l,t,n)}},decorations:s=>{let l=en.getState(s);if(l&&l.activeHandle>-1)return J5(s,l.activeHandle)},nodeViews:{}}});return i}var H5=class Of{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(en);if(r&&r.setHandle!=null)return new Of(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Of(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return j1(t.doc.resolve(o))||(o=-1),new Of(o,n.dragging)}return n}};function V5(e,t,n,r){if(!e.editable)return;let o=en.getState(e.state);if(o&&!o.dragging){let i=K5(t.target),s=-1;if(i){let{left:l,right:a}=i.getBoundingClientRect();t.clientX-l<=n?s=GC(e,t,"left",n):a-t.clientX<=n&&(s=GC(e,t,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){let l=e.state.doc.resolve(s),a=l.node(-1),u=$e.get(a),c=l.start(-1);if(u.colCount(l.pos-c)+l.nodeAfter.attrs.colspan-1==u.width-1)return}hT(e,s)}}}function q5(e){if(!e.editable)return;let t=en.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&hT(e,-1)}function W5(e,t,n,r){var o;if(!e.editable)return!1;let i=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=en.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let l=e.state.doc.nodeAt(s.activeHandle),a=j5(e,s.activeHandle,l.attrs);e.dispatch(e.state.tr.setMeta(en,{setDragging:{startX:t.clientX,startWidth:a}}));function u(d){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",c);let f=en.getState(e.state);f?.dragging&&(G5(e,f.activeHandle,YC(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(en,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=en.getState(e.state);if(f&&f.dragging){let p=YC(f.dragging,d,n);JC(e,f.activeHandle,p,r)}}return JC(e,s.activeHandle,a,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",c),t.preventDefault(),!0}function j5(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let a=0;a{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){let i=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&i&&i[s]){let l=i[s].getAttribute("width");return l?[parseInt(l,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",ne(this.options.HTMLAttributes,e),0]}}),nb=Q.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",ne(this.options.HTMLAttributes,e),0]}}),rb=Q.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",ne(this.options.HTMLAttributes,e),0]}});function eb(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function gT(e,t,n,r,o,i){var s;let l=0,a=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function eB(e,t,n,r,o){let i=Q5(e),s=[],l=[];for(let u=0;u{let{selection:t}=e.state;if(!tB(t))return!1;let n=0,r=$g(t.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},nB="";function rB(e){return(e||"").replace(/\s+/g," ").trim()}function oB(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:nB;if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(h=>{let g=[];h.content&&h.content.forEach(b=>{let m="";b.content&&Array.isArray(b.content)&&b.content.length>1?m=b.content.map(k=>t.renderChildren(k)).join(o):m=b.content?t.renderChildren(b.content):"";let y=rB(m),x=b.type==="tableHeader";g.push({text:y,isHeader:x})}),i.push(g)});let s=i.reduce((h,g)=>Math.max(h,g.length),0);if(s===0)return"";let l=new Array(s).fill(0);i.forEach(h=>{var g;for(let b=0;bl[b]&&(l[b]=y),l[b]<3&&(l[b]=3)}});let a=(h,g)=>h+" ".repeat(Math.max(0,g-h.length)),u=i[0],c=u.some(h=>h.isHeader),d=` +`,f=new Array(s).fill(0).map((h,g)=>c&&u[g]&&u[g].text||"");return d+=`| ${f.map((h,g)=>a(h,l[g])).join(" | ")} | `,d+=`| ${l.map(h=>"-".repeat(Math.max(3,h))).join(" | ")} | -`,(c?i.slice(1):i).forEach(h=>{d+=`| ${new Array(s).fill(0).map((m,b)=>a(h[b]&&h[b].text||"",l[b])).join(" | ")} | -`}),d}var rB=nB,nb=Q.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Y5,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=J5(e,this.options.cellMinWidth),i=t.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",ne(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(i.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>rB(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=X5(i.schema,e,t,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(U.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>rT(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>oT(e,t),deleteColumn:()=>({state:e,dispatch:t})=>iT(e,t),addRowBefore:()=>({state:e,dispatch:t})=>lT(e,t),addRowAfter:()=>({state:e,dispatch:t})=>aT(e,t),deleteRow:()=>({state:e,dispatch:t})=>uT(e,t),deleteTable:()=>({state:e,dispatch:t})=>fT(e,t),mergeCells:()=>({state:e,dispatch:t})=>Y1(e,t),splitCell:()=>({state:e,dispatch:t})=>J1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>js("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>js("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>dT(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>Y1(e,t)?!0:J1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>cT(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>Z1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>Z1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&G1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=me.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Rf,"Mod-Backspace":Rf,Delete:Rf,"Mod-Delete":Rf}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[hT({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],gT({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(j(e,"tableRole",t))}}}),gK=re.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(nb.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Q1.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(eb.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(tb.configure(this.options.tableRow)),e}});var zT=H(FT(),1);var Bf=zT.default;function HT(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?HT(n.children,r):{text:n.value,classes:r}})}function UT(e){return e.value||e.children||[]}function KB(e){return!!Bf.getLanguage(e)}function $T({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return Td(e,i=>i.type.name===t).forEach(i=>{var s;let l=i.pos+1,a=i.node.attrs.language||r,u=n.listLanguages(),c=a&&(u.includes(a)||KB(a)||(s=n.registered)!=null&&s.call(n,a))?UT(n.highlight(a,i.node.textContent)):UT(n.highlightAuto(i.node.textContent));HT(c).forEach(d=>{let f=l+d.text.length;if(d.classes.length){let p=Oe.inline(l,f,{class:d.classes.join(" ")});o.push(p)}l=f})}),xe.create(e,o)}function GB(e){return typeof e=="function"}function YB({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>GB(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new q({key:new Z("lowlight"),state:{init:(o,{doc:i})=>$T({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(o,i,s,l)=>{let a=s.selection.$head.parent.type.name,u=l.selection.$head.parent.type.name,c=Td(s.doc,f=>f.type.name===e),d=Td(l.doc,f=>f.type.name===e);return o.docChanged&&([a,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?$T({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var JB=VS.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],YB({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),qT=JB;function ZB(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function VT(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=ZB(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function WT(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(l);let a={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],v=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...y,...x,"set","shopt",...v,...k]},contains:[p,e.SHEBANG(),h,d,i,s,g,l,a,u,c,n]}}function jT(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function KT(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function GT(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:o.concat(i),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},x=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",v={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+x+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[g,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},v]}}var XB=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),QB=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],e9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],t9=[...QB,...e9],n9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),r9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),i9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function YT(e){let t=e.regex,n=XB(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+r9.join("|")+")"},{begin:":(:)?("+o9.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+i9.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:n9.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+t9.join("|")+")\\b"}]}}function JT(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function ZT(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"t3(e,t,n-1))}function n3(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+t3("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e3,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e3,u]}}var r3="[A-Za-z$_][0-9A-Za-z$_]*",s9=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],l9=["true","false","null","undefined","NaN","Infinity"],o3=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],i3=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],s3=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],u9=[].concat(s3,o3,i3);function l3(e){let t=e.regex,n=(I,{after:Y})=>{let ie="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(I,Y)=>{let ie=I[0].length+I.index,pe=I.input[ie];if(pe==="<"||pe===","){Y.ignoreMatch();return}pe===">"&&(n(I,{after:ie})||Y.ignoreMatch());let ge,ft=I.input.substring(ie);if(ge=ft.match(/^\s*=/)){Y.ignoreMatch();return}if((ge=ft.match(/^\s+extends\s+/))&&ge.index===0){Y.ignoreMatch();return}}},l={$pattern:r3,keyword:s9,literal:l9,built_in:u9,"variable.language":a9},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...o3,...i3]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(I){return t.concat("(?!",I.join("|"),")")}let te={match:t.concat(/\b/,G([...s3,"super","import"].map(I=>`${I}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},te,B,w,C,{match:/\$[(.]/}]}}function a3(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Js="[0-9](_*[0-9])*",Uf=`\\.(${Js})`,$f="[0-9a-fA-F](_*[0-9a-fA-F])*",c9={className:"number",variants:[{begin:`(\\b(${Js})((${Uf})|\\.)?|(${Uf}))[eE][+-]?(${Js})[fFdD]?\\b`},{begin:`\\b(${Js})((${Uf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Uf})[fFdD]?\\b`},{begin:`\\b(${Js})[fFdD]\\b`},{begin:`\\b0[xX]((${$f})\\.?|(${$f})?\\.(${$f}))[pP][+-]?(${Js})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${$f})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function u3(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,o]}]};o.contains.push(s);let l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},u=c9,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,l,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,l,a,s,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,a]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},u]}}var d9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),f9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],p9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],h9=[...f9,...p9],m9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),c3=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),d3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),g9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),b9=c3.concat(d3).sort().reverse();function f3(e){let t=d9(e),n=b9,r="and or not only",o="[\\w-]+",i="("+o+"|@\\{"+o+"\\})",s=[],l=[],a=function(x){return{className:"string",begin:"~?"+x+".*?"+x}},u=function(x,v,k){return{className:x,begin:v,relevance:k}},c={$pattern:/[a-z-]+/,keyword:r,attribute:m9.join(" ")},d={begin:"\\(",end:"\\)",contains:l,keywords:c,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=l.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+g9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:l,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+h9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+c3.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d3.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,y,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function p3(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function h3(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,a={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,a];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,i,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,a,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function g3(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},a={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+a.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:a,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function b3(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},s={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},a={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,i,a],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let y=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,s.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function y3(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":($,C)=>{C.data._beginMatch=$[1]||$[2]},"on:end":($,C)=>{C.data._beginMatch!==$[1]&&C.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ -]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:g,literal:($=>{let C=[];return $.forEach(S=>{C.push(S),S.toLowerCase()===S?C.push(S.toUpperCase()):C.push(S.toLowerCase())}),C})(b),built_in:y},k=$=>$.map(C=>C.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},A={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[A,s,_,e.C_BLOCK_COMMENT_MODE,h,m,E]},B={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(g).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[T]};T.contains.push(B);let G=[A,_,e.C_BLOCK_COMMENT_MODE,h,m,E],te={begin:t.concat(/#\[\s*\\?/,t.either(o,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...G]},...G,{scope:"meta",variants:[{match:o},{match:i}]}]};return{case_insensitive:!1,keywords:v,contains:[te,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},s,B,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:v,contains:["self",te,s,_,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function x3(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function v3(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function k3(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},a={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",a,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,a],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[a,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function E3(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function w3(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function _3(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,u),relevance:0}].concat(a,u);c.contains=E,m.contains=E;let T=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return u.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(T).concat(u).concat(E)}}function S3(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:l,literal:a,built_in:u},illegal:""},i]}}var y9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),x9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],v9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],k9=[...x9,...v9],E9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),w9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),_9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),S9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function C3(e){let t=y9(e),n=_9,r=w9,o="@[a-z-]+",i="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+k9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+S9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:E9.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function T3(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function A3(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...a].filter(k=>!c.includes(k)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k){return t.concat(/\b/,t.either(...k.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}let x={scope:"keyword",match:y(f),relevance:0};function v(k,{exceptions:E,when:w}={}){let _=w;return E=E||[],k.map(A=>A.match(/\|\d+$/)||E.includes(A)?A:_(A)?`${A}|0`:A)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(h,{when:k=>k.length<3}),literal:i,type:l,built_in:d},contains:[{scope:"type",match:y(s)},x,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function R3(e){return e?typeof e=="string"?e:e.source:null}function Ka(e){return we("(?=",e,")")}function we(...e){return e.map(n=>R3(n)).join("")}function C9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function It(...e){return"("+(C9(e).capture?"":"?:")+e.map(r=>R3(r)).join("|")+")"}var pb=e=>we(/\b/,e,/\w$/.test(e)?/\b/:/\B/),T9=["Protocol","Type"].map(pb),N3=["init","self"].map(pb),A9=["Any","Self"],db=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],M3=["false","nil","true"],N9=["assignment","associativity","higherThan","left","lowerThan","none","right"],M9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],O3=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],D3=It(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),I3=It(D3,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),fb=we(D3,I3,"*"),L3=It(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),qf=It(L3,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ir=we(L3,qf,"*"),Hf=we(/[A-Z]/,qf,"*"),O9=["attached","autoclosure",we(/convention\(/,It("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",we(/objc\(/,ir,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],R9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function P3(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,It(...T9,...N3)],className:{2:"keyword"}},i={match:we(/\./,It(...db)),relevance:0},s=db.filter(Ee=>typeof Ee=="string").concat(["_|0"]),l=db.filter(Ee=>typeof Ee!="string").concat(A9).map(pb),a={variants:[{className:"keyword",match:It(...l,...N3)}]},u={$pattern:It(/\b\w+/,/#\w+/),keyword:s.concat(M9),literal:M3},c=[o,i,a],d={match:we(/\./,It(...O3)),relevance:0},f={className:"built_in",match:we(/\b/,It(...O3),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:fb},{match:`\\.(\\.|${I3})+`}]},b=[h,m],g="([0-9]_*)+",y="([0-9a-fA-F]_*)+",x={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},v=(Ee="")=>({className:"subst",variants:[{match:we(/\\/,Ee,/[0\\tnr"']/)},{match:we(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Ee="")=>({className:"subst",match:we(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(Ee="")=>({className:"subst",label:"interpol",begin:we(/\\/,Ee,/\(/),end:/\)/}),w=(Ee="")=>({begin:we(Ee,/"""/),end:we(/"""/,Ee),contains:[v(Ee),k(Ee),E(Ee)]}),_=(Ee="")=>({begin:we(Ee,/"/),end:we(/"/,Ee),contains:[v(Ee),E(Ee)]}),A={className:"string",variants:[w(),w("#"),w("##"),w("###"),_(),_("#"),_("##"),_("###")]},T=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],B={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:T},G=Ee=>{let Jr=we(Ee,/\//),ee=we(/\//,Ee);return{begin:Jr,end:ee,contains:[...T,{scope:"comment",begin:`#(?!.*${ee})`,end:/$/}]}},te={scope:"regexp",variants:[G("###"),G("##"),G("#"),B]},$={match:we(/`/,ir,/`/)},C={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${qf}+`},M=[$,C,S],I={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:R9,contains:[...b,x,A]}]}},Y={scope:"keyword",match:we(/@/,It(...O9),Ka(It(/\(/,/\s+/)))},ie={scope:"meta",match:we(/@/,ir)},pe=[I,Y,ie],ge={match:Ka(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:we(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,qf,"+")},{className:"type",match:Hf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:we(/\s+&\s+/,Ka(Hf)),relevance:0}]},ft={begin://,keywords:u,contains:[...r,...c,...pe,h,ge]};ge.contains.push(ft);let Be={match:we(ir,/\s*:/),keywords:"_|0",relevance:0},pt={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Be,...r,te,...c,...p,...b,x,A,...M,...pe,ge]},Yr={begin://,keywords:"repeat each",contains:[...r,ge]},fu={begin:It(Ka(we(ir,/\s*:/)),Ka(we(ir,/\s+/,ir,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ir}]},ul={begin:/\(/,end:/\)/,keywords:u,contains:[fu,...r,...c,...b,x,A,...pe,ge,pt],endsParent:!0,illegal:/["']/},Hp={match:[/(func|macro)/,/\s+/,It($.match,ir,fb)],className:{1:"keyword",3:"title.function"},contains:[Yr,ul,t],illegal:[/\[/,/%/]},qp={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Yr,ul,t],illegal:/\[|%/},Vp={match:[/operator/,/\s+/,fb],className:{1:"keyword",3:"title"}},Wp={begin:[/precedencegroup/,/\s+/,Hf],className:{1:"keyword",3:"title"},contains:[ge],keywords:[...N9,...M3],end:/}/},qi={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},pu={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ir,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Yr,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Hf},...c],relevance:0}]};for(let Ee of A.variants){let Jr=Ee.contains.find(hu=>hu.label==="interpol");Jr.keywords=u;let ee=[...c,...p,...b,x,A,...M];Jr.contains=[...ee,{begin:/\(/,end:/\)/,contains:["self",...ee]}]}return{name:"Swift",keywords:u,contains:[...r,Hp,qp,qi,pu,rn,Vp,Wp,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},te,...c,...p,...b,x,A,...M,...pe,ge,pt]}}var Vf="[A-Za-z$_][0-9A-Za-z$_]*",B3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],F3=["true","false","null","undefined","NaN","Infinity"],z3=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],U3=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],$3=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],H3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],q3=[].concat($3,z3,U3);function D9(e){let t=e.regex,n=(I,{after:Y})=>{let ie="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(I,Y)=>{let ie=I[0].length+I.index,pe=I.input[ie];if(pe==="<"||pe===","){Y.ignoreMatch();return}pe===">"&&(n(I,{after:ie})||Y.ignoreMatch());let ge,ft=I.input.substring(ie);if(ge=ft.match(/^\s*=/)){Y.ignoreMatch();return}if((ge=ft.match(/^\s+extends\s+/))&&ge.index===0){Y.ignoreMatch();return}}},l={$pattern:Vf,keyword:B3,literal:F3,built_in:q3,"variable.language":H3},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...z3,...U3]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(I){return t.concat("(?!",I.join("|"),")")}let te={match:t.concat(/\b/,G([...$3,"super","import"].map(I=>`${I}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},te,B,w,C,{match:/\$[(.]/}]}}function V3(e){let t=e.regex,n=D9(e),r=Vf,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Vf,keyword:B3.concat(a),literal:F3,built_in:q3.concat(o),"variable.language":H3},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let y=m.contains.findIndex(x=>x.label===b);if(y===-1)throw new Error("can not find mode to replace");m.contains.splice(y,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,i,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",l);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function W3(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,a={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,o),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(i,o),/ +/,t.either(s,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,a,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function j3(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},a={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,s,o,e.QUOTE_STRING_MODE,a,u,l]}}function K3(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,a,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,a,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function G3(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},l=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,i,s],g=[...b];return g.pop(),g.push(l),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var Ga={arduino:VT,bash:WT,c:jT,cpp:KT,csharp:GT,css:YT,diff:JT,go:ZT,graphql:XT,ini:QT,java:n3,javascript:l3,json:a3,kotlin:u3,less:f3,lua:p3,makefile:h3,markdown:m3,objectivec:g3,perl:b3,php:y3,"php-template":x3,plaintext:v3,python:k3,"python-repl":E3,r:w3,ruby:_3,rust:S3,scss:C3,shell:T3,sql:A3,swift:P3,typescript:V3,vbnet:W3,wasm:j3,xml:K3,yaml:G3};var Y3={},I9="hljs-";function Ya(e){let t=Bf.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:o,register:i,registerAlias:s,registered:l};function n(a,u,c){let d=c||Y3,f=typeof d.prefix=="string"?d.prefix:I9;if(!t.getLanguage(a))throw new Error("Unknown language: `"+a+"` is not registered");t.configure({__emitter:hb,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:a});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(a,u){let d=(u||Y3).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function i(a,u){if(typeof a=="string")t.registerLanguage(a,u);else{let c;for(c in a)Object.hasOwn(a,c)&&t.registerLanguage(c,a[c])}}function s(a,u){if(typeof a=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:a});else{let c;for(c in a)if(Object.hasOwn(a,c)){let d=a[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function l(a){return!!t.getLanguage(a)}}var hb=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(s,l){return l?s+"_".repeat(l):n.options.classPrefix+s}),o=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var wb={};cl(wb,{arrayReplaceAt:()=>Eb,assign:()=>Qs,escapeHtml:()=>Hr,escapeRE:()=>bF,fromCodePoint:()=>Xa,has:()=>sF,isMdAsciiPunct:()=>Ri,isPunctChar:()=>Oi,isSpace:()=>ue,isString:()=>np,isValidEntityCode:()=>rp,isWhiteSpace:()=>Mi,lib:()=>yF,normalizeReference:()=>Di,unescapeAll:()=>$r,unescapeMd:()=>dF});var Yf={};cl(Yf,{decode:()=>Ja,encode:()=>Kf,format:()=>Zs,parse:()=>Za});var J3={};function L9(e){let t=J3[e];if(t)return t;t=J3[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),i+=6;continue}}if((l&248)===240&&i+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="\uFFFD"}return o})}Wf.defaultChars=";/?:@&=+$,#";Wf.componentChars="";var Ja=Wf;var Z3={};function P9(e){let t=Z3[e];if(t)return t;t=Z3[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=P9(t),o="";for(let i=0,s=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}jf.defaultChars=";/?:@&=+$,-_.!~*'()#";jf.componentChars="-_.!~*'()";var Kf=jf;function Zs(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Gf(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var B9=/^([a-z0-9.+-]+:)/i,F9=/:[0-9]*$/,z9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,U9=["<",">",'"',"`"," ","\r",` -`," "],$9=["{","}","|","\\","^","`"].concat(U9),H9=["'"].concat($9),X3=["%","/","?",";","#"].concat(H9),Q3=["/","?","#"],q9=255,eA=/^[+a-z0-9A-Z_-]{0,63}$/,V9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,tA={javascript:!0,"javascript:":!0},nA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function W9(e,t){if(e&&e instanceof Gf)return e;let n=new Gf;return n.parse(e,t),n}Gf.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=z9.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=B9.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&tA[s])&&(i=i.substr(2),this.slashes=!0)),!tA[s]&&(o||s&&!nA[s])){let u=-1;for(let h=0;h127?y+="x":y+=g[x];if(!y.match(eA)){let x=h.slice(0,m),v=h.slice(m+1),k=g.match(V9);k&&(x.push(k[1]),v.unshift(k[2])),v.length&&(i=v.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>q9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));let a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),nA[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Gf.prototype.parseHost=function(e){let t=F9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Za=W9;var mb={};cl(mb,{Any:()=>Jf,Cc:()=>Zf,Cf:()=>rA,P:()=>Xs,S:()=>Xf,Z:()=>Qf});var Jf=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Zf=/[\0-\x1F\x7F-\x9F]/;var rA=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Xs=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Xf=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Qf=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var oA=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var iA=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var gb,j9=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]]),bb=(gb=String.fromCodePoint)!==null&&gb!==void 0?gb:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function yb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=j9.get(e))!==null&&t!==void 0?t:e}var nt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(nt||(nt={}));var K9=32,Fo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fo||(Fo={}));function xb(e){return e>=nt.ZERO&&e<=nt.NINE}function G9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_F||e>=nt.LOWER_A&&e<=nt.LOWER_F}function Y9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_Z||e>=nt.LOWER_A&&e<=nt.LOWER_Z||xb(e)}function J9(e){return e===nt.EQUALS||Y9(e)}var tt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(tt||(tt={}));var sr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(sr||(sr={}));var ep=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=sr.Strict}startEntity(t){this.decodeMode=t,this.state=tt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tt.EntityStart:return t.charCodeAt(n)===nt.NUM?(this.state=tt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tt.NamedEntity,this.stateNamedEntity(t,n));case tt.NumericStart:return this.stateNumericStart(t,n);case tt.NumericDecimal:return this.stateNumericDecimal(t,n);case tt.NumericHex:return this.stateNumericHex(t,n);case tt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|K9)===nt.LOWER_X?(this.state=tt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,i!==0){if(s===nt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==sr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&Fo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Fo.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tt.NamedEntity:return this.result!==0&&(this.decodeMode!==sr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tt.NumericDecimal:return this.emitNumericEntity(0,2);case tt.NumericHex:return this.emitNumericEntity(0,3);case tt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tt.EntityStart:return 0}}};function sA(e){let t="",n=new ep(e,r=>t+=bb(r));return function(o,i){let s=0,l=0;for(;(l=o.indexOf("&",l))>=0;){t+=o.slice(s,l),n.startEntity(i);let u=n.write(o,l+1);if(u<0){s=l+n.end();break}s=l+u,l=u===0?s+1:s}let a=t+o.slice(s);return t="",a}}function Z9(e,t,n,r){let o=(t&Fo.BRANCH_LENGTH)>>7,i=t&Fo.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){let a=r-i;return a<0||a>=o?-1:e[n+a]-1}let s=n,l=s+o-1;for(;s<=l;){let a=s+l>>>1,u=e[a];if(ur)l=a-1;else return e[a+o]}return-1}var X9=sA(oA),CY=sA(iA);function zo(e,t=sr.Legacy){return X9(e,t)}function tp(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function vb(e,t){return function(r){let o,i=0,s="";for(;o=e.exec(r);)i!==o.index&&(s+=r.substring(i,o.index)),s+=t.get(o[0].charCodeAt(0)),i=o.index+1;return s+r.substring(i)}}var lA=vb(/[&<>'"]/g,eF),aA=vb(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),uA=vb(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var cA;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(cA||(cA={}));var dA;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(dA||(dA={}));function oF(e){return Object.prototype.toString.call(e)}function np(e){return oF(e)==="[object String]"}var iF=Object.prototype.hasOwnProperty;function sF(e,t){return iF.call(e,t)}function Qs(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Eb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function rp(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Xa(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var hA=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,lF=/&([a-z#][a-z0-9]{1,31});/gi,aF=new RegExp(hA.source+"|"+lF.source,"gi"),uF=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function cF(e,t){if(t.charCodeAt(0)===35&&uF.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return rp(r)?Xa(r):e}let n=zo(e);return n!==e?n:e}function dF(e){return e.indexOf("\\")<0?e:e.replace(hA,"$1")}function $r(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(aF,function(t,n,r){return n||cF(t,r)})}var fF=/[&<>"]/,pF=/[&<>"]/g,hF={"&":"&","<":"<",">":">",'"':"""};function mF(e){return hF[e]}function Hr(e){return fF.test(e)?e.replace(pF,mF):e}var gF=/[.?*+^$[\]\\(){}|-]/g;function bF(e){return e.replace(gF,"\\$&")}function ue(e){switch(e){case 9:case 32:return!0}return!1}function Mi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Oi(e){return Xs.test(e)||Xf.test(e)}function Ri(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Di(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var yF={mdurl:Yf,ucmicro:mb};var Tb={};cl(Tb,{parseLinkDestination:()=>Sb,parseLinkLabel:()=>_b,parseLinkTitle:()=>Cb});function _b(e,t,n){let r,o,i,s,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=$r(e.slice(t,o)),i.pos=o,i.ok=!0),i}function Cb(e,t,n,r){let o,i=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return s;t++,i++,l===40&&(l=41),s.marker=l}for(;i"+Hr(i.content)+""};lr.code_block=function(e,t,n,r,o){let i=e[t];return""+Hr(e[t].content)+` +`,(c?i.slice(1):i).forEach(h=>{d+=`| ${new Array(s).fill(0).map((g,b)=>a(h[b]&&h[b].text||"",l[b])).join(" | ")} | +`}),d}var iB=oB,ob=Q.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Z5,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=X5(e,this.options.cellMinWidth),i=t.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",ne(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(i.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>iB(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=eB(i.schema,e,t,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(U.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>nT(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>rT(e,t),deleteColumn:()=>({state:e,dispatch:t})=>oT(e,t),addRowBefore:()=>({state:e,dispatch:t})=>sT(e,t),addRowAfter:()=>({state:e,dispatch:t})=>lT(e,t),deleteRow:()=>({state:e,dispatch:t})=>aT(e,t),deleteTable:()=>({state:e,dispatch:t})=>dT(e,t),mergeCells:()=>({state:e,dispatch:t})=>Z1(e,t),splitCell:()=>({state:e,dispatch:t})=>X1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>js("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>js("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>cT(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>Z1(e,t)?!0:X1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>uT(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>Q1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>Q1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&J1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=me.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Df,"Mod-Backspace":Df,Delete:Df,"Mod-Delete":Df}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[pT({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],mT({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(j(e,"tableRole",t))}}}),yK=re.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(ob.configure(this.options.table)),this.options.tableCell!==!1&&e.push(tb.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(nb.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(rb.configure(this.options.tableRow)),e}});var FT=H(BT(),1);var Ff=FT.default;function $T(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?$T(n.children,r):{text:n.value,classes:r}})}function zT(e){return e.value||e.children||[]}function YB(e){return!!Ff.getLanguage(e)}function UT({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return Td(e,i=>i.type.name===t).forEach(i=>{var s;let l=i.pos+1,a=i.node.attrs.language||r,u=n.listLanguages(),c=a&&(u.includes(a)||YB(a)||(s=n.registered)!=null&&s.call(n,a))?zT(n.highlight(a,i.node.textContent)):zT(n.highlightAuto(i.node.textContent));$T(c).forEach(d=>{let f=l+d.text.length;if(d.classes.length){let p=Oe.inline(l,f,{class:d.classes.join(" ")});o.push(p)}l=f})}),xe.create(e,o)}function JB(e){return typeof e=="function"}function ZB({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>JB(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new V({key:new Z("lowlight"),state:{init:(o,{doc:i})=>UT({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(o,i,s,l)=>{let a=s.selection.$head.parent.type.name,u=l.selection.$head.parent.type.name,c=Td(s.doc,f=>f.type.name===e),d=Td(l.doc,f=>f.type.name===e);return o.docChanged&&([a,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?UT({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var XB=VS.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],ZB({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),HT=XB;function QB(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],m=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:g,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function VT(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=QB(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function qT(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(l);let a={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},g=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],m={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],v=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:g,literal:b,built_in:[...y,...x,"set","shopt",...v,...k]},contains:[p,e.SHEBANG(),h,d,i,s,m,l,a,u,c,n]}}function WT(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},m=[d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:m.concat([{begin:/\(/,end:/\)/,keywords:b,contains:m.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function jT(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],m=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],v={type:g,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,d,l,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:E.concat([{begin:/\(/,end:/\)/,keywords:v,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"",keywords:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function KT(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:o.concat(i),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},g={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(g,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[g,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[u,g,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},x=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",v={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},m,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+x+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},v]}}var e9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r9=[...t9,...n9],o9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),l9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function GT(e){let t=e.regex,n=e9(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i9.join("|")+")"},{begin:":(:)?("+s9.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+l9.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:o9.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r9.join("|")+")\\b"}]}}function YT(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function JT(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"eA(e,t,n-1))}function tA(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+eA("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,QT,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},QT,u]}}var nA="[A-Za-z$_][0-9A-Za-z$_]*",a9=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],u9=["true","false","null","undefined","NaN","Infinity"],rA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],oA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],iA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d9=[].concat(iA,rA,oA);function sA(e){let t=e.regex,n=(I,{after:Y})=>{let ie="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(I,Y)=>{let ie=I[0].length+I.index,pe=I.input[ie];if(pe==="<"||pe===","){Y.ignoreMatch();return}pe===">"&&(n(I,{after:ie})||Y.ignoreMatch());let ge,ft=I.input.substring(ie);if(ge=ft.match(/^\s*=/)){Y.ignoreMatch();return}if((ge=ft.match(/^\s+extends\s+/))&&ge.index===0){Y.ignoreMatch();return}}},l={$pattern:nA,keyword:a9,literal:u9,built_in:d9,"variable.language":c9},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rA,...oA]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(I){return t.concat("(?!",I.join("|"),")")}let te={match:t.concat(/\b/,G([...iA,"super","import"].map(I=>`${I}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},te,B,w,C,{match:/\$[(.]/}]}}function lA(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Js="[0-9](_*[0-9])*",$f=`\\.(${Js})`,Hf="[0-9a-fA-F](_*[0-9a-fA-F])*",f9={className:"number",variants:[{begin:`(\\b(${Js})((${$f})|\\.)?|(${$f}))[eE][+-]?(${Js})[fFdD]?\\b`},{begin:`\\b(${Js})((${$f})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${$f})[fFdD]?\\b`},{begin:`\\b(${Js})[fFdD]\\b`},{begin:`\\b0[xX]((${Hf})\\.?|(${Hf})?\\.(${Hf}))[pP][+-]?(${Js})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Hf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function aA(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,o]}]};o.contains.push(s);let l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},u=f9,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,l,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,l,a,s,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,a]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},u]}}var p9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),h9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],m9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],g9=[...h9,...m9],b9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),uA=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),cA=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),y9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),x9=uA.concat(cA).sort().reverse();function dA(e){let t=p9(e),n=x9,r="and or not only",o="[\\w-]+",i="("+o+"|@\\{"+o+"\\})",s=[],l=[],a=function(x){return{className:"string",begin:"~?"+x+".*?"+x}},u=function(x,v,k){return{className:x,begin:v,relevance:k}},c={$pattern:/[a-z-]+/,keyword:r,attribute:b9.join(" ")},d={begin:"\\(",end:"\\)",contains:l,keywords:c,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=l.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+y9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:l,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},m={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+g9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+uA.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+cA.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[m]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,b,y,h,m,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function fA(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function pA(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,a={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,a];return[u,c,d,f].forEach(m=>{m.contains=m.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,i,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,a,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function mA(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},a={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+a.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:a,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function gA(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},s={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},a={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,i,a],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(g,b,m="\\1")=>{let y=m==="\\1"?m:t.concat(m,b);return t.concat(t.concat("(?:",g,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,m,r)},p=(g,b,m)=>t.concat(t.concat("(?:",g,")"),b,/(?:\\.|[^\\\/])*?/,m,r),h=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,s.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function bA(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":($,C)=>{C.data._beginMatch=$[1]||$[2]},"on:end":($,C)=>{C.data._beginMatch!==$[1]&&C.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ +]`,h={scope:"string",variants:[c,u,d,f]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],m=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:m,literal:($=>{let C=[];return $.forEach(S=>{C.push(S),S.toLowerCase()===S?C.push(S.toUpperCase()):C.push(S.toLowerCase())}),C})(b),built_in:y},k=$=>$.map(C=>C.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},A={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[A,s,_,e.C_BLOCK_COMMENT_MODE,h,g,E]},B={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(m).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[T]};T.contains.push(B);let G=[A,_,e.C_BLOCK_COMMENT_MODE,h,g,E],te={begin:t.concat(/#\[\s*\\?/,t.either(o,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...G]},...G,{scope:"meta",variants:[{match:o},{match:i}]}]};return{case_insensitive:!1,keywords:v,contains:[te,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},s,B,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:v,contains:["self",te,s,_,e.C_BLOCK_COMMENT_MODE,h,g]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,g]}}function yA(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function xA(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function vA(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},a={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",a,g,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,g,a],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[a,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,d]}]}}function kA(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function EA(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function wA(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,u),relevance:0}].concat(a,u);c.contains=E,g.contains=E;let T=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return u.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(T).concat(u).concat(E)}}function _A(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:l,literal:a,built_in:u},illegal:""},i]}}var v9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),k9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],E9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],w9=[...k9,...E9],_9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),S9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),C9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),T9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function SA(e){let t=v9(e),n=C9,r=S9,o="@[a-z-]+",i="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+w9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+T9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:_9.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function CA(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function TA(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...a].filter(k=>!c.includes(k)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},m={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k){return t.concat(/\b/,t.either(...k.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}let x={scope:"keyword",match:y(f),relevance:0};function v(k,{exceptions:E,when:w}={}){let _=w;return E=E||[],k.map(A=>A.match(/\|\d+$/)||E.includes(A)?A:_(A)?`${A}|0`:A)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(h,{when:k=>k.length<3}),literal:i,type:l,built_in:d},contains:[{scope:"type",match:y(s)},x,m,g,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function OA(e){return e?typeof e=="string"?e:e.source:null}function Ka(e){return we("(?=",e,")")}function we(...e){return e.map(n=>OA(n)).join("")}function A9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function It(...e){return"("+(A9(e).capture?"":"?:")+e.map(r=>OA(r)).join("|")+")"}var mb=e=>we(/\b/,e,/\w$/.test(e)?/\b/:/\B/),N9=["Protocol","Type"].map(mb),AA=["init","self"].map(mb),M9=["Any","Self"],pb=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],NA=["false","nil","true"],O9=["assignment","associativity","higherThan","left","lowerThan","none","right"],R9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],MA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],RA=It(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),DA=It(RA,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),hb=we(RA,DA,"*"),IA=It(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),qf=It(IA,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ir=we(IA,qf,"*"),Vf=we(/[A-Z]/,qf,"*"),D9=["attached","autoclosure",we(/convention\(/,It("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",we(/objc\(/,ir,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],I9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function LA(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,It(...N9,...AA)],className:{2:"keyword"}},i={match:we(/\./,It(...pb)),relevance:0},s=pb.filter(Ee=>typeof Ee=="string").concat(["_|0"]),l=pb.filter(Ee=>typeof Ee!="string").concat(M9).map(mb),a={variants:[{className:"keyword",match:It(...l,...AA)}]},u={$pattern:It(/\b\w+/,/#\w+/),keyword:s.concat(R9),literal:NA},c=[o,i,a],d={match:we(/\./,It(...MA)),relevance:0},f={className:"built_in",match:we(/\b/,It(...MA),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},g={className:"operator",relevance:0,variants:[{match:hb},{match:`\\.(\\.|${DA})+`}]},b=[h,g],m="([0-9]_*)+",y="([0-9a-fA-F]_*)+",x={className:"number",relevance:0,variants:[{match:`\\b(${m})(\\.(${m}))?([eE][+-]?(${m}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${m}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},v=(Ee="")=>({className:"subst",variants:[{match:we(/\\/,Ee,/[0\\tnr"']/)},{match:we(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Ee="")=>({className:"subst",match:we(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(Ee="")=>({className:"subst",label:"interpol",begin:we(/\\/,Ee,/\(/),end:/\)/}),w=(Ee="")=>({begin:we(Ee,/"""/),end:we(/"""/,Ee),contains:[v(Ee),k(Ee),E(Ee)]}),_=(Ee="")=>({begin:we(Ee,/"/),end:we(/"/,Ee),contains:[v(Ee),E(Ee)]}),A={className:"string",variants:[w(),w("#"),w("##"),w("###"),_(),_("#"),_("##"),_("###")]},T=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],B={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:T},G=Ee=>{let Jr=we(Ee,/\//),ee=we(/\//,Ee);return{begin:Jr,end:ee,contains:[...T,{scope:"comment",begin:`#(?!.*${ee})`,end:/$/}]}},te={scope:"regexp",variants:[G("###"),G("##"),G("#"),B]},$={match:we(/`/,ir,/`/)},C={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${qf}+`},M=[$,C,S],I={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:I9,contains:[...b,x,A]}]}},Y={scope:"keyword",match:we(/@/,It(...D9),Ka(It(/\(/,/\s+/)))},ie={scope:"meta",match:we(/@/,ir)},pe=[I,Y,ie],ge={match:Ka(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:we(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,qf,"+")},{className:"type",match:Vf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:we(/\s+&\s+/,Ka(Vf)),relevance:0}]},ft={begin://,keywords:u,contains:[...r,...c,...pe,h,ge]};ge.contains.push(ft);let Be={match:we(ir,/\s*:/),keywords:"_|0",relevance:0},pt={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Be,...r,te,...c,...p,...b,x,A,...M,...pe,ge]},Yr={begin://,keywords:"repeat each",contains:[...r,ge]},fu={begin:It(Ka(we(ir,/\s*:/)),Ka(we(ir,/\s+/,ir,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ir}]},ul={begin:/\(/,end:/\)/,keywords:u,contains:[fu,...r,...c,...b,x,A,...pe,ge,pt],endsParent:!0,illegal:/["']/},Vp={match:[/(func|macro)/,/\s+/,It($.match,ir,hb)],className:{1:"keyword",3:"title.function"},contains:[Yr,ul,t],illegal:[/\[/,/%/]},qp={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Yr,ul,t],illegal:/\[|%/},Wp={match:[/operator/,/\s+/,hb],className:{1:"keyword",3:"title"}},jp={begin:[/precedencegroup/,/\s+/,Vf],className:{1:"keyword",3:"title"},contains:[ge],keywords:[...O9,...NA],end:/}/},Vi={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},pu={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ir,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Yr,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Vf},...c],relevance:0}]};for(let Ee of A.variants){let Jr=Ee.contains.find(hu=>hu.label==="interpol");Jr.keywords=u;let ee=[...c,...p,...b,x,A,...M];Jr.contains=[...ee,{begin:/\(/,end:/\)/,contains:["self",...ee]}]}return{name:"Swift",keywords:u,contains:[...r,Vp,qp,Vi,pu,rn,Wp,jp,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},te,...c,...p,...b,x,A,...M,...pe,ge,pt]}}var Wf="[A-Za-z$_][0-9A-Za-z$_]*",PA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],BA=["true","false","null","undefined","NaN","Infinity"],FA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],zA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],UA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],$A=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],HA=[].concat(UA,FA,zA);function L9(e){let t=e.regex,n=(I,{after:Y})=>{let ie="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(I,Y)=>{let ie=I[0].length+I.index,pe=I.input[ie];if(pe==="<"||pe===","){Y.ignoreMatch();return}pe===">"&&(n(I,{after:ie})||Y.ignoreMatch());let ge,ft=I.input.substring(ie);if(ge=ft.match(/^\s*=/)){Y.ignoreMatch();return}if((ge=ft.match(/^\s+extends\s+/))&&ge.index===0){Y.ignoreMatch();return}}},l={$pattern:Wf,keyword:PA,literal:BA,built_in:HA,"variable.language":$A},a="[0-9](_?[0-9])*",u=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(x)});let v=[].concat(y,f.contains),k=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...FA,...zA]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(I){return t.concat("(?!",I.join("|"),")")}let te={match:t.concat(/\b/,G([...UA,"super","import"].map(I=>`${I}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,g,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},te,B,w,C,{match:/\$[(.]/}]}}function VA(e){let t=e.regex,n=L9(e),r=Wf,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Wf,keyword:PA.concat(a),literal:BA,built_in:HA.concat(o),"variable.language":$A},c={className:"meta",begin:"@"+r},d=(g,b,m)=>{let y=g.contains.findIndex(x=>x.label===b);if(y===-1)throw new Error("can not find mode to replace");g.contains.splice(y,1,m)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(g=>g.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,i,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",l);let h=n.contains.find(g=>g.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function qA(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,a={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,o),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(i,o),/ +/,t.either(s,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,a,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function WA(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},a={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,s,o,e.QUOTE_STRING_MODE,a,u,l]}}function jA(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,a,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,a,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function KA(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},l=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,g,i,s],m=[...b];return m.pop(),m.push(l),p.contains=m,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var Ga={arduino:VT,bash:qT,c:WT,cpp:jT,csharp:KT,css:GT,diff:YT,go:JT,graphql:ZT,ini:XT,java:tA,javascript:sA,json:lA,kotlin:aA,less:dA,lua:fA,makefile:pA,markdown:hA,objectivec:mA,perl:gA,php:bA,"php-template":yA,plaintext:xA,python:vA,"python-repl":kA,r:EA,ruby:wA,rust:_A,scss:SA,shell:CA,sql:TA,swift:LA,typescript:VA,vbnet:qA,wasm:WA,xml:jA,yaml:KA};var GA={},P9="hljs-";function Ya(e){let t=Ff.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:o,register:i,registerAlias:s,registered:l};function n(a,u,c){let d=c||GA,f=typeof d.prefix=="string"?d.prefix:P9;if(!t.getLanguage(a))throw new Error("Unknown language: `"+a+"` is not registered");t.configure({__emitter:gb,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:a});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,g=h.data;return g.language=p.language,g.relevance=p.relevance,h}function r(a,u){let d=(u||GA).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function i(a,u){if(typeof a=="string")t.registerLanguage(a,u);else{let c;for(c in a)Object.hasOwn(a,c)&&t.registerLanguage(c,a[c])}}function s(a,u){if(typeof a=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:a});else{let c;for(c in a)if(Object.hasOwn(a,c)){let d=a[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function l(a){return!!t.getLanguage(a)}}var gb=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(s,l){return l?s+"_".repeat(l):n.options.classPrefix+s}),o=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var Sb={};cl(Sb,{arrayReplaceAt:()=>_b,assign:()=>Qs,escapeHtml:()=>Hr,escapeRE:()=>xF,fromCodePoint:()=>Xa,has:()=>aF,isMdAsciiPunct:()=>Ri,isPunctChar:()=>Oi,isSpace:()=>ue,isString:()=>rp,isValidEntityCode:()=>op,isWhiteSpace:()=>Mi,lib:()=>vF,normalizeReference:()=>Di,unescapeAll:()=>$r,unescapeMd:()=>pF});var Jf={};cl(Jf,{decode:()=>Ja,encode:()=>Gf,format:()=>Zs,parse:()=>Za});var YA={};function B9(e){let t=YA[e];if(t)return t;t=YA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),i+=6;continue}}if((l&248)===240&&i+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="\uFFFD"}return o})}jf.defaultChars=";/?:@&=+$,#";jf.componentChars="";var Ja=jf;var JA={};function F9(e){let t=JA[e];if(t)return t;t=JA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=F9(t),o="";for(let i=0,s=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}Kf.defaultChars=";/?:@&=+$,-_.!~*'()#";Kf.componentChars="-_.!~*'()";var Gf=Kf;function Zs(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Yf(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var z9=/^([a-z0-9.+-]+:)/i,U9=/:[0-9]*$/,$9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,H9=["<",">",'"',"`"," ","\r",` +`," "],V9=["{","}","|","\\","^","`"].concat(H9),q9=["'"].concat(V9),ZA=["%","/","?",";","#"].concat(q9),XA=["/","?","#"],W9=255,QA=/^[+a-z0-9A-Z_-]{0,63}$/,j9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,e3={javascript:!0,"javascript:":!0},t3={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function K9(e,t){if(e&&e instanceof Yf)return e;let n=new Yf;return n.parse(e,t),n}Yf.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=$9.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=z9.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&e3[s])&&(i=i.substr(2),this.slashes=!0)),!e3[s]&&(o||s&&!t3[s])){let u=-1;for(let h=0;h127?y+="x":y+=m[x];if(!y.match(QA)){let x=h.slice(0,g),v=h.slice(g+1),k=m.match(j9);k&&(x.push(k[1]),v.unshift(k[2])),v.length&&(i=v.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>W9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));let a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),t3[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Yf.prototype.parseHost=function(e){let t=U9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Za=K9;var bb={};cl(bb,{Any:()=>Zf,Cc:()=>Xf,Cf:()=>n3,P:()=>Xs,S:()=>Qf,Z:()=>ep});var Zf=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Xf=/[\0-\x1F\x7F-\x9F]/;var n3=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Xs=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Qf=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var ep=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var r3=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var o3=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var yb,G9=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]]),xb=(yb=String.fromCodePoint)!==null&&yb!==void 0?yb:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function vb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=G9.get(e))!==null&&t!==void 0?t:e}var nt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(nt||(nt={}));var Y9=32,Fo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fo||(Fo={}));function kb(e){return e>=nt.ZERO&&e<=nt.NINE}function J9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_F||e>=nt.LOWER_A&&e<=nt.LOWER_F}function Z9(e){return e>=nt.UPPER_A&&e<=nt.UPPER_Z||e>=nt.LOWER_A&&e<=nt.LOWER_Z||kb(e)}function X9(e){return e===nt.EQUALS||Z9(e)}var tt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(tt||(tt={}));var sr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(sr||(sr={}));var tp=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=sr.Strict}startEntity(t){this.decodeMode=t,this.state=tt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tt.EntityStart:return t.charCodeAt(n)===nt.NUM?(this.state=tt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tt.NamedEntity,this.stateNamedEntity(t,n));case tt.NumericStart:return this.stateNumericStart(t,n);case tt.NumericDecimal:return this.stateNumericDecimal(t,n);case tt.NumericHex:return this.stateNumericHex(t,n);case tt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Y9)===nt.LOWER_X?(this.state=tt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,i!==0){if(s===nt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==sr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&Fo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Fo.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tt.NamedEntity:return this.result!==0&&(this.decodeMode!==sr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tt.NumericDecimal:return this.emitNumericEntity(0,2);case tt.NumericHex:return this.emitNumericEntity(0,3);case tt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tt.EntityStart:return 0}}};function i3(e){let t="",n=new tp(e,r=>t+=xb(r));return function(o,i){let s=0,l=0;for(;(l=o.indexOf("&",l))>=0;){t+=o.slice(s,l),n.startEntity(i);let u=n.write(o,l+1);if(u<0){s=l+n.end();break}s=l+u,l=u===0?s+1:s}let a=t+o.slice(s);return t="",a}}function Q9(e,t,n,r){let o=(t&Fo.BRANCH_LENGTH)>>7,i=t&Fo.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){let a=r-i;return a<0||a>=o?-1:e[n+a]-1}let s=n,l=s+o-1;for(;s<=l;){let a=s+l>>>1,u=e[a];if(ur)l=a-1;else return e[a+o]}return-1}var eF=i3(r3),AY=i3(o3);function zo(e,t=sr.Legacy){return eF(e,t)}function np(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Eb(e,t){return function(r){let o,i=0,s="";for(;o=e.exec(r);)i!==o.index&&(s+=r.substring(i,o.index)),s+=t.get(o[0].charCodeAt(0)),i=o.index+1;return s+r.substring(i)}}var s3=Eb(/[&<>'"]/g,nF),l3=Eb(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),a3=Eb(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var u3;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(u3||(u3={}));var c3;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(c3||(c3={}));function sF(e){return Object.prototype.toString.call(e)}function rp(e){return sF(e)==="[object String]"}var lF=Object.prototype.hasOwnProperty;function aF(e,t){return lF.call(e,t)}function Qs(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function _b(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function op(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Xa(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var p3=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,uF=/&([a-z#][a-z0-9]{1,31});/gi,cF=new RegExp(p3.source+"|"+uF.source,"gi"),dF=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function fF(e,t){if(t.charCodeAt(0)===35&&dF.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return op(r)?Xa(r):e}let n=zo(e);return n!==e?n:e}function pF(e){return e.indexOf("\\")<0?e:e.replace(p3,"$1")}function $r(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(cF,function(t,n,r){return n||fF(t,r)})}var hF=/[&<>"]/,mF=/[&<>"]/g,gF={"&":"&","<":"<",">":">",'"':"""};function bF(e){return gF[e]}function Hr(e){return hF.test(e)?e.replace(mF,bF):e}var yF=/[.?*+^$[\]\\(){}|-]/g;function xF(e){return e.replace(yF,"\\$&")}function ue(e){switch(e){case 9:case 32:return!0}return!1}function Mi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Oi(e){return Xs.test(e)||Qf.test(e)}function Ri(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Di(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var vF={mdurl:Jf,ucmicro:bb};var Nb={};cl(Nb,{parseLinkDestination:()=>Tb,parseLinkLabel:()=>Cb,parseLinkTitle:()=>Ab});function Cb(e,t,n){let r,o,i,s,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=$r(e.slice(t,o)),i.pos=o,i.ok=!0),i}function Ab(e,t,n,r){let o,i=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return s;t++,i++,l===40&&(l=41),s.marker=l}for(;i"+Hr(i.content)+""};lr.code_block=function(e,t,n,r,o){let i=e[t];return""+Hr(e[t].content)+` `};lr.fence=function(e,t,n,r,o){let i=e[t],s=i.info?$r(i.info).trim():"",l="",a="";if(s){let c=s.split(/(\s+)/g);l=c[0],a=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(i.content,l,a)||Hr(i.content):u=Hr(i.content),u.indexOf("${u} `}return`
${u}
@@ -358,25 +358,25 @@ ${p.slice(u+2)}`,d+=1;else break}t.push({indent:u,number:parseInt(l,10),content: `};lr.text=function(e,t){return Hr(e[t].content)};lr.html_block=function(e,t){return e[t].content};lr.html_inline=function(e,t){return e[t].content};function el(){this.rules=Qs({},lr)}el.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n `:">",i};el.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let i=0,s=e.length;i=0&&(r=this.attrs[n][1]),r};tl.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var qr=tl;function gA(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}gA.prototype.Token=qr;var bA=gA;var xF=/\r\n?|\n/g,vF=/\0/g;function Ab(e){let t;t=e.src.replace(xF,` -`),t=t.replace(vF,"\uFFFD"),e.src=t}function Nb(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Mb(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function EF(e){return/^<\/a\s*>/i.test(e)}function Ob(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;s--){let l=o[s];if(l.type==="link_close"){for(s--;o[s].level!==l.level&&o[s].type!=="link_open";)s--;continue}if(l.type==="html_inline"&&(kF(l.content)&&i>0&&i--,EF(l.content)&&i++),!(i>0)&&l.type==="text"&&e.md.linkify.test(l.content)){let a=l.content,u=e.md.linkify.match(a),c=[],d=l.level,f=0;u.length>0&&u[0].index===0&&s>0&&o[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let k=new e.Token("text","",0);k.content=a.slice(f,g),k.level=d,c.push(k)}let y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let x=new e.Token("text","",0);x.content=b,x.level=d,c.push(x);let v=new e.Token("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(_F,CF)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function AF(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&yA.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Rb(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(wF.test(e.tokens[t].content)&&TF(e.tokens[t].children),yA.test(e.tokens[t].content)&&AF(e.tokens[t].children))}var NF=/['"]/,xA=/['"]/g,vA="\u2019";function op(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function MF(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,i.type!=="text")continue;let l=i.content,a=0,u=l.length;e:for(;a=0)h=l.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(a=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(i.content=op(i.content,c.index,vA));continue}if(f)for(n=r.length-1;n>=0;n--){let v=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!NF.test(e.tokens[t].content)||MF(e.tokens[t].children,e)}function Ib(e){let t,n,r=e.tokens,o=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};ar.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};ar.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!ue(this.src.charCodeAt(--t)))return t+1;return t};ar.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};ar.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let i=new Array(n-t);for(let s=0,l=t;lr?i[s]=new Array(a-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};ar.prototype.Token=qr;var EA=ar;var OF=65536;function Bb(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function wA(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),i=!1,s=0,l="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;let s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;let l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!ue(l)||s===45&&ue(l))return!1;for(;i=4)return!1;u=wA(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let v=0;v=4||(u=wA(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),x+=d-u.length,x>OF))break;if(o===t+2){let E=e.push("tbody_open","tbody",1);E.map=y=[t+2,0]}let k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let E=0;E=4){r++,o=r;continue}break}e.line=o;let i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+` -`,i.map=[t,e.line],!0}function Ub(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;let s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let l=o;o=e.skipChars(o,s);let a=o-l;if(a<3)return!1;let u=e.src.slice(l,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o=4)&&(o=e.skipChars(o,s),!(o-l=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let l=[],a=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=i)break;if(e.src.charCodeAt(o++)===62&&!x){let k=e.sCount[h]+1,E,w;e.src.charCodeAt(o)===32?(o++,k++,w=!1,E=!0):e.src.charCodeAt(o)===9?(E=!0,(e.bsCount[h]+k)%4===3?(o++,k++,w=!1):w=!0):E=!1;let _=k;for(l.push(e.bMarks[h]),e.bMarks[h]=o;o=i,a.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(E?1:0),u.push(e.sCount[h]),e.sCount[h]=_-k,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let v=!1;for(let k=0,E=d.length;k";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=f,g[1]=e.line;for(let x=0;x=4)return!1;let i=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let l=1;for(;i=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]=e.blkIndent&&(c=!0);let d,f,p;if((p=SA(e,a))>=0){if(d=!0,s=e.bMarks[a]+e.tShift[a],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=_A(e,a))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[a])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(l=e.push("ordered_list_open","ol",1),f!==1&&(l.attrs=[["start",f]])):l=e.push("bullet_list_open","ul",1);let b=[a,0];l.map=b,l.markup=String.fromCharCode(h);let g=!1,y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";a=o?w=1:w=k-v,w>4&&(w=1);let _=v+w;l=e.push("list_item_open","li",1),l.markup=String.fromCharCode(h);let A=[a,0];l.map=A,d&&(l.info=e.src.slice(s,p-1));let T=e.tight,B=e.tShift[a],G=e.sCount[a],te=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[a]=E-e.bMarks[a],e.sCount[a]=k,E>=o&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n,!0),(!e.tight||g)&&(u=!1),g=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=te,e.tShift[a]=B,e.sCount[a]=G,e.tight=T,l=e.push("list_item_close","li",-1),l.markup=String.fromCharCode(h),a=e.line,A[1]=a,a>=n||e.sCount[a]=4)break;let $=!1;for(let C=0,S=y.length;C=4||e.src.charCodeAt(o)!==91)return!1;function l(y){let x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let v=!1;if(e.sCount[y]-e.blkIndent>3&&(v=!0),e.sCount[y]<0&&(v=!0),!v){let w=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let A=!1;for(let T=0,B=w.length;T"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=s),!0):!1}var CA=["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"];var DF="[a-zA-Z_:][a-zA-Z0-9:._-]*",IF="[^\"'=<>`\\x00-\\x20]+",LF="'[^']*'",PF='"[^"]*"',BF="(?:"+IF+"|"+LF+"|"+PF+")",FF="(?:\\s+"+DF+"(?:\\s*=\\s*"+BF+")?)",TA="<[A-Za-z][A-Za-z0-9\\-]*"+FF+"*\\s*\\/?>",AA="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",zF="",UF="<[?][\\s\\S]*?[?]>",$F="]*>",HF="",NA=new RegExp("^(?:"+TA+"|"+AA+"|"+zF+"|"+UF+"|"+$F+"|"+HF+")"),MA=new RegExp("^(?:"+TA+"|"+AA+")");var nl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(MA.source+"\\s*$"),/^$/,!1]];function Wb(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),l=0;for(;l=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let l=1;for(s=e.src.charCodeAt(++o);s===35&&o6||oo&&ue(e.src.charCodeAt(a-1))&&(i=a),e.line=t+1;let u=e.push("heading_open","h"+String(l),1);u.markup="########".slice(0,l),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,i).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(l),-1);return d.markup="########".slice(0,l),!0}function Kb(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let i=0,s,l=t+1;for(;l3)continue;if(e.sCount[l]>=e.blkIndent){let p=e.bMarks[l]+e.tShift[l],h=e.eMarks[l];if(p=h))){i=s===61?1:2;break}}if(e.sCount[l]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[i]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[s]=i){e.line=n;break}let a=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Qa.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,i=e;for(;i0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(VF);if(!o)return!1;let i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let l=s.url;if(l.length<=i.length)return!1;l=l.replace(/\*+$/,"");let a=e.md.normalizeLink(l);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=l.length-i.length,!0}function Zb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){Xb[e.charCodeAt(0)]=1});function Qb(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&l<=57343&&(i+=e.src[n+1],n++)}let s="\\"+i;if(!t){let l=e.push("text_special","",0);o<256&&Xb[o]!==0?l.content=i:l.content=s,l.markup=s,l.info="escape"}return e.pos=n+1,!0}function ey(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let i=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,l=String.fromCharCode(o.marker),a=e.tokens[o.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?l+l:l,a.content="";let u=e.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?l+l:l,u.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function GF(e){let t=e.tokens_meta,n=e.tokens_meta.length;IA(e,e.delimiters);for(let r=0;r=d)return!1;if(a=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",a=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(a,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[Di(r)],!i)return e.pos=c,!1;s=i.href,l=i.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,l&&b.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function oy(e,t){let n,r,o,i,s,l,a,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;for(u=i,l=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),l.ok&&(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?i=l.pos:c=""),u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?o=e.src.slice(u,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[Di(o)],!s)return e.pos=d,!1;c=s.href,a=s.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,a&&g.push(["title",a])}return e.pos=i,e.posMax=f,!0}var YF=/^([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])?)*)$/,JF=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function iy(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let i=e.src.slice(r+1,n);if(JF.test(i)){let s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(YF.test(i)){let s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function ZF(e){return/^\s]/i.test(e)}function XF(e){return/^<\/a\s*>/i.test(e)}function QF(e){let t=e|32;return t>=97&&t<=122}function sy(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!QF(o))return!1;let i=e.src.slice(r).match(NA);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=i[0],ZF(s.content)&&e.linkLevel++,XF(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var ez=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,tz=/^&([a-z][a-z0-9]{1,31});/i;function ly(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(ez);if(i){if(!t){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),l=e.push("text_special","",0);l.content=rp(s)?Xa(s):Xa(65533),l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(tz);if(i){let s=zo(i[0]);if(s!==i[0]){if(!t){let l=e.push("text_special","",0);l.content=s,l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function LA(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,i=[];for(let s=0;sa;u-=i[u]+1){let d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,l.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function ay(e){let t=e.tokens_meta,n=e.tokens_meta.length;LA(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};eu.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};eu.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let i=this.ruler2.getRules(""),s=i.length;for(let l=0;l|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function fy(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function ap(e){return Object.prototype.toString.call(e)}function nz(e){return ap(e)==="[object String]"}function rz(e){return ap(e)==="[object Object]"}function oz(e){return ap(e)==="[object RegExp]"}function FA(e){return ap(e)==="[object Function]"}function iz(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var UA={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function sz(e){return Object.keys(e||{}).reduce(function(t,n){return t||UA.hasOwnProperty(n)},!1)}var lz={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},az="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",uz="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function cz(e){e.__index__=-1,e.__text_cache__=""}function dz(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function zA(){return function(e,t){t.normalize(e)}}function lp(e){let t=e.re=BA(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(az),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function i(l,a){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+a)}Object.keys(e.__schemas__).forEach(function(l){let a=e.__schemas__[l];if(a===null)return;let u={validate:null,link:null};if(e.__compiled__[l]=u,rz(a)){oz(a.validate)?u.validate=dz(a.validate):FA(a.validate)?u.validate=a.validate:i(l,a),FA(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=zA();return}if(nz(a)){o.push(l);return}i(l,a)}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:zA()};let s=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(iz).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),cz(e)}function fz(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function py(e,t){let n=new fz(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function tn(e,t){if(!(this instanceof tn))return new tn(e,t);t||sz(e)&&(t=e,e={}),this.__opts__=fy({},UA,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=fy({},lz,e),this.__compiled__={},this.__tlds__=uz,this.__tlds_replaced__=!1,this.re={},lp(this)}tn.prototype.add=function(t,n){return this.__schemas__[t]=n,lp(this),this};tn.prototype.set=function(t){return this.__opts__=fy(this.__opts__,t),this};tn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,i,s,l,a,u,c;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(n=a.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],a.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=l))),this.__index__>=0};tn.prototype.pretest=function(t){return this.re.pretest.test(t)};tn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};tn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(py(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(py(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};tn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,py(this,0)):null};tn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),lp(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,lp(this),this)};tn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};tn.prototype.onCompile=function(){};var $A=tn;var pz=/^xn--/,hz=/[^\0-\x7F]/,mz=/[\x2E\u3002\uFF0E\uFF61]/g,gz={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},hy=35,ur=Math.floor,my=String.fromCharCode;function Uo(e){throw new RangeError(gz[e])}function bz(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function qA(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(mz,".");let o=e.split("."),i=bz(o,t).join(".");return r+i}function VA(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),xz=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},HA=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},WA=function(e,t,n){let r=0;for(e=n?ur(e/700):e>>1,e+=ur(e/t);e>hy*26>>1;r+=36)e=ur(e/hy);return ur(r+(hy+1)*e/(e+38))},jA=function(e){let t=[],n=e.length,r=0,o=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let l=0;l=128&&Uo("not-basic"),t.push(e.charCodeAt(l));for(let l=s>0?s+1:0;l=n&&Uo("invalid-input");let f=xz(e.charCodeAt(l++));f>=36&&Uo("invalid-input"),f>ur((2147483647-r)/c)&&Uo("overflow"),r+=f*c;let p=d<=i?1:d>=i+26?26:d-i;if(fur(2147483647/h)&&Uo("overflow"),c*=h}let u=t.length+1;i=WA(r-a,u,a==0),ur(r/u)>2147483647-o&&Uo("overflow"),o+=ur(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},KA=function(e){let t=[];e=VA(e);let n=e.length,r=128,o=0,i=72;for(let a of e)a<128&&t.push(my(a));let s=t.length,l=s;for(s&&t.push("-");l=r&&cur((2147483647-o)/u)&&Uo("overflow"),o+=(a-r)*u,r=a;for(let c of e)if(c2147483647&&Uo("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=i?1:f>=i+26?26:f-i;if(d=0))try{t.hostname=gy.toASCII(t.hostname)}catch{}return Kf(Zs(t))}function Az(e){let t=Za(e,!0);if(t.hostname&&(!t.protocol||ZA.indexOf(t.protocol)>=0))try{t.hostname=gy.toUnicode(t.hostname)}catch{}return Ja(Zs(t),Ja.defaultChars+"%")}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);t||np(e)||(t=e||{},e="default"),this.inline=new PA,this.block=new OA,this.core=new kA,this.renderer=new mA,this.linkify=new $A,this.validateLink=Cz,this.normalizeLink=Tz,this.normalizeLinkText=Az,this.utils=wb,this.helpers=Qs({},Tb),this.options={},this.configure(e),t&&this.set(t)}kn.prototype.set=function(e){return Qs(this.options,e),this};kn.prototype.configure=function(e){let t=this;if(np(e)){let n=e;if(e=wz[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};kn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};kn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};kn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};kn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};kn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};kn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};kn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var rl=kn;var Nz=new vo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function Mz(e,t){if(e.isText&&t.isText&&ce.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var xy=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:ce.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks),s;o&&(s=Mz(o,i))?r[r.length-1]=s:r.push(i)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{s.openNode(i,tu(o,l,a,u)),s.addText(XA(l.content)),s.closeNode()}:(n[r+"_open"]=(s,l,a,u)=>s.openNode(i,tu(o,l,a,u)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=e.nodeType(o.node);n[r]=(s,l,a,u)=>s.addNode(i,tu(o,l,a,u))}else if(o.mark){let i=e.marks[o.mark];by(o,r)?n[r]=(s,l,a,u)=>{s.openMark(i.create(tu(o,l,a,u))),s.addText(XA(l.content)),s.closeMark(i)}:(n[r+"_open"]=(s,l,a,u)=>s.openMark(i.create(tu(o,l,a,u))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)by(o,r)?n[r]=yy:(n[r+"_open"]=yy,n[r+"_close"]=yy);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var vy=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=Oz(t,r)}parse(t,n={}){let r=new xy(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function QA(e,t){for(;++t({tight:QA(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:QA(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),Rz={open:"",close:"",mixable:!0},ky=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new nu(this.nodes,this.marks,n);return r.renderContent(t),r.out}},zn=new ky({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` +`;break;default:}return r};el.prototype.render=function(e,t,n){let r="",o=this.rules;for(let i=0,s=e.length;i=0&&(r=this.attrs[n][1]),r};tl.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var Vr=tl;function m3(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}m3.prototype.Token=Vr;var g3=m3;var kF=/\r\n?|\n/g,EF=/\0/g;function Mb(e){let t;t=e.src.replace(kF,` +`),t=t.replace(EF,"\uFFFD"),e.src=t}function Ob(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Rb(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function _F(e){return/^<\/a\s*>/i.test(e)}function Db(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;s--){let l=o[s];if(l.type==="link_close"){for(s--;o[s].level!==l.level&&o[s].type!=="link_open";)s--;continue}if(l.type==="html_inline"&&(wF(l.content)&&i>0&&i--,_F(l.content)&&i++),!(i>0)&&l.type==="text"&&e.md.linkify.test(l.content)){let a=l.content,u=e.md.linkify.match(a),c=[],d=l.level,f=0;u.length>0&&u[0].index===0&&s>0&&o[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let k=new e.Token("text","",0);k.content=a.slice(f,m),k.level=d,c.push(k)}let y=new e.Token("link_open","a",1);y.attrs=[["href",g]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let x=new e.Token("text","",0);x.content=b,x.level=d,c.push(x);let v=new e.Token("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(CF,AF)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function MF(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&b3.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Ib(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(SF.test(e.tokens[t].content)&&NF(e.tokens[t].children),b3.test(e.tokens[t].content)&&MF(e.tokens[t].children))}var OF=/['"]/,y3=/['"]/g,x3="\u2019";function ip(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function RF(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,i.type!=="text")continue;let l=i.content,a=0,u=l.length;e:for(;a=0)h=l.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let g=32;if(a=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=m),!d&&!f){p&&(i.content=ip(i.content,c.index,x3));continue}if(f)for(n=r.length-1;n>=0;n--){let v=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!OF.test(e.tokens[t].content)||RF(e.tokens[t].children,e)}function Pb(e){let t,n,r=e.tokens,o=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};ar.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};ar.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!ue(this.src.charCodeAt(--t)))return t+1;return t};ar.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};ar.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let i=new Array(n-t);for(let s=0,l=t;lr?i[s]=new Array(a-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};ar.prototype.Token=Vr;var k3=ar;var DF=65536;function zb(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function E3(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),i=!1,s=0,l="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;let s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;let l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!ue(l)||s===45&&ue(l))return!1;for(;i=4)return!1;u=E3(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),g=[t,0];h.map=g;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let m=e.push("tr_open","tr",1);m.map=[t,t+1];for(let v=0;v=4||(u=E3(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),x+=d-u.length,x>DF))break;if(o===t+2){let E=e.push("tbody_open","tbody",1);E.map=y=[t+2,0]}let k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let E=0;E=4){r++,o=r;continue}break}e.line=o;let i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+` +`,i.map=[t,e.line],!0}function Hb(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;let s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let l=o;o=e.skipChars(o,s);let a=o-l;if(a<3)return!1;let u=e.src.slice(l,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o=4)&&(o=e.skipChars(o,s),!(o-l=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let l=[],a=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=i)break;if(e.src.charCodeAt(o++)===62&&!x){let k=e.sCount[h]+1,E,w;e.src.charCodeAt(o)===32?(o++,k++,w=!1,E=!0):e.src.charCodeAt(o)===9?(E=!0,(e.bsCount[h]+k)%4===3?(o++,k++,w=!1):w=!0):E=!1;let _=k;for(l.push(e.bMarks[h]),e.bMarks[h]=o;o=i,a.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(E?1:0),u.push(e.sCount[h]),e.sCount[h]=_-k,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let v=!1;for(let k=0,E=d.length;k";let m=[t,0];b.map=m,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=f,m[1]=e.line;for(let x=0;x=4)return!1;let i=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let l=1;for(;i=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]=e.blkIndent&&(c=!0);let d,f,p;if((p=_3(e,a))>=0){if(d=!0,s=e.bMarks[a]+e.tShift[a],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=w3(e,a))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[a])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),g=e.tokens.length;d?(l=e.push("ordered_list_open","ol",1),f!==1&&(l.attrs=[["start",f]])):l=e.push("bullet_list_open","ul",1);let b=[a,0];l.map=b,l.markup=String.fromCharCode(h);let m=!1,y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";a=o?w=1:w=k-v,w>4&&(w=1);let _=v+w;l=e.push("list_item_open","li",1),l.markup=String.fromCharCode(h);let A=[a,0];l.map=A,d&&(l.info=e.src.slice(s,p-1));let T=e.tight,B=e.tShift[a],G=e.sCount[a],te=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[a]=E-e.bMarks[a],e.sCount[a]=k,E>=o&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n,!0),(!e.tight||m)&&(u=!1),m=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=te,e.tShift[a]=B,e.sCount[a]=G,e.tight=T,l=e.push("list_item_close","li",-1),l.markup=String.fromCharCode(h),a=e.line,A[1]=a,a>=n||e.sCount[a]=4)break;let $=!1;for(let C=0,S=y.length;C=4||e.src.charCodeAt(o)!==91)return!1;function l(y){let x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let v=!1;if(e.sCount[y]-e.blkIndent>3&&(v=!0),e.sCount[y]<0&&(v=!0),!v){let w=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let A=!1;for(let T=0,B=w.length;T"u"&&(e.env.references={}),typeof e.env.references[m]>"u"&&(e.env.references[m]={title:b,href:d}),e.line=s),!0):!1}var S3=["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"];var LF="[a-zA-Z_:][a-zA-Z0-9:._-]*",PF="[^\"'=<>`\\x00-\\x20]+",BF="'[^']*'",FF='"[^"]*"',zF="(?:"+PF+"|"+BF+"|"+FF+")",UF="(?:\\s+"+LF+"(?:\\s*=\\s*"+zF+")?)",C3="<[A-Za-z][A-Za-z0-9\\-]*"+UF+"*\\s*\\/?>",T3="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",$F="",HF="<[?][\\s\\S]*?[?]>",VF="]*>",qF="",A3=new RegExp("^(?:"+C3+"|"+T3+"|"+$F+"|"+HF+"|"+VF+"|"+qF+")"),N3=new RegExp("^(?:"+C3+"|"+T3+")");var nl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(N3.source+"\\s*$"),/^$/,!1]];function Kb(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),l=0;for(;l=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let l=1;for(s=e.src.charCodeAt(++o);s===35&&o6||oo&&ue(e.src.charCodeAt(a-1))&&(i=a),e.line=t+1;let u=e.push("heading_open","h"+String(l),1);u.markup="########".slice(0,l),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,i).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(l),-1);return d.markup="########".slice(0,l),!0}function Yb(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let i=0,s,l=t+1;for(;l3)continue;if(e.sCount[l]>=e.blkIndent){let p=e.bMarks[l]+e.tShift[l],h=e.eMarks[l];if(p=h))){i=s===61?1:2;break}}if(e.sCount[l]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[i]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[s]=i){e.line=n;break}let a=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Qa.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,i=e;for(;i0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(jF);if(!o)return!1;let i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let l=s.url;if(l.length<=i.length)return!1;l=l.replace(/\*+$/,"");let a=e.md.normalizeLink(l);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=l.length-i.length,!0}function Qb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){ey[e.charCodeAt(0)]=1});function ty(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&l<=57343&&(i+=e.src[n+1],n++)}let s="\\"+i;if(!t){let l=e.push("text_special","",0);o<256&&ey[o]!==0?l.content=i:l.content=s,l.markup=s,l.info="escape"}return e.pos=n+1,!0}function ny(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let i=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,l=String.fromCharCode(o.marker),a=e.tokens[o.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?l+l:l,a.content="";let u=e.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?l+l:l,u.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function JF(e){let t=e.tokens_meta,n=e.tokens_meta.length;D3(e,e.delimiters);for(let r=0;r=d)return!1;if(a=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",a=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(a,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[Di(r)],!i)return e.pos=c,!1;s=i.href,l=i.title}if(!t){e.pos=f,e.posMax=p;let g=e.push("link_open","a",1),b=[["href",s]];g.attrs=b,l&&b.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function sy(e,t){let n,r,o,i,s,l,a,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;for(u=i,l=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),l.ok&&(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?i=l.pos:c=""),u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?o=e.src.slice(u,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[Di(o)],!s)return e.pos=d,!1;c=s.href,a=s.title}if(!t){r=e.src.slice(p,h);let g=[];e.md.inline.parse(r,e.md,e.env,g);let b=e.push("image","img",0),m=[["src",c],["alt",""]];b.attrs=m,b.children=g,b.content=r,a&&m.push(["title",a])}return e.pos=i,e.posMax=f,!0}var ZF=/^([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])?)*)$/,XF=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ly(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let i=e.src.slice(r+1,n);if(XF.test(i)){let s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(ZF.test(i)){let s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){let l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";let a=e.push("text","",0);a.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function QF(e){return/^\s]/i.test(e)}function ez(e){return/^<\/a\s*>/i.test(e)}function tz(e){let t=e|32;return t>=97&&t<=122}function ay(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!tz(o))return!1;let i=e.src.slice(r).match(A3);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=i[0],QF(s.content)&&e.linkLevel++,ez(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var nz=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,rz=/^&([a-z][a-z0-9]{1,31});/i;function uy(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(nz);if(i){if(!t){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),l=e.push("text_special","",0);l.content=op(s)?Xa(s):Xa(65533),l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(rz);if(i){let s=zo(i[0]);if(s!==i[0]){if(!t){let l=e.push("text_special","",0);l.content=s,l.markup=i[0],l.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function I3(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,i=[];for(let s=0;sa;u-=i[u]+1){let d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,l.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function cy(e){let t=e.tokens_meta,n=e.tokens_meta.length;I3(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};eu.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};eu.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let i=this.ruler2.getRules(""),s=i.length;for(let l=0;l|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function hy(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function up(e){return Object.prototype.toString.call(e)}function oz(e){return up(e)==="[object String]"}function iz(e){return up(e)==="[object Object]"}function sz(e){return up(e)==="[object RegExp]"}function B3(e){return up(e)==="[object Function]"}function lz(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var z3={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function az(e){return Object.keys(e||{}).reduce(function(t,n){return t||z3.hasOwnProperty(n)},!1)}var uz={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},cz="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",dz="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function fz(e){e.__index__=-1,e.__text_cache__=""}function pz(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function F3(){return function(e,t){t.normalize(e)}}function ap(e){let t=e.re=P3(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(cz),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function i(l,a){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+a)}Object.keys(e.__schemas__).forEach(function(l){let a=e.__schemas__[l];if(a===null)return;let u={validate:null,link:null};if(e.__compiled__[l]=u,iz(a)){sz(a.validate)?u.validate=pz(a.validate):B3(a.validate)?u.validate=a.validate:i(l,a),B3(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=F3();return}if(oz(a)){o.push(l);return}i(l,a)}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:F3()};let s=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(lz).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),fz(e)}function hz(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function my(e,t){let n=new hz(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function tn(e,t){if(!(this instanceof tn))return new tn(e,t);t||az(e)&&(t=e,e={}),this.__opts__=hy({},z3,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=hy({},uz,e),this.__compiled__={},this.__tlds__=dz,this.__tlds_replaced__=!1,this.re={},ap(this)}tn.prototype.add=function(t,n){return this.__schemas__[t]=n,ap(this),this};tn.prototype.set=function(t){return this.__opts__=hy(this.__opts__,t),this};tn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,i,s,l,a,u,c;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(n=a.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],a.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=l))),this.__index__>=0};tn.prototype.pretest=function(t){return this.re.pretest.test(t)};tn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};tn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(my(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(my(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};tn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,my(this,0)):null};tn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),ap(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ap(this),this)};tn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};tn.prototype.onCompile=function(){};var U3=tn;var mz=/^xn--/,gz=/[^\0-\x7F]/,bz=/[\x2E\u3002\uFF0E\uFF61]/g,yz={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},gy=35,ur=Math.floor,by=String.fromCharCode;function Uo(e){throw new RangeError(yz[e])}function xz(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function H3(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(bz,".");let o=e.split("."),i=xz(o,t).join(".");return r+i}function V3(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),kz=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},$3=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},q3=function(e,t,n){let r=0;for(e=n?ur(e/700):e>>1,e+=ur(e/t);e>gy*26>>1;r+=36)e=ur(e/gy);return ur(r+(gy+1)*e/(e+38))},W3=function(e){let t=[],n=e.length,r=0,o=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let l=0;l=128&&Uo("not-basic"),t.push(e.charCodeAt(l));for(let l=s>0?s+1:0;l=n&&Uo("invalid-input");let f=kz(e.charCodeAt(l++));f>=36&&Uo("invalid-input"),f>ur((2147483647-r)/c)&&Uo("overflow"),r+=f*c;let p=d<=i?1:d>=i+26?26:d-i;if(fur(2147483647/h)&&Uo("overflow"),c*=h}let u=t.length+1;i=q3(r-a,u,a==0),ur(r/u)>2147483647-o&&Uo("overflow"),o+=ur(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},j3=function(e){let t=[];e=V3(e);let n=e.length,r=128,o=0,i=72;for(let a of e)a<128&&t.push(by(a));let s=t.length,l=s;for(s&&t.push("-");l=r&&cur((2147483647-o)/u)&&Uo("overflow"),o+=(a-r)*u,r=a;for(let c of e)if(c2147483647&&Uo("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=i?1:f>=i+26?26:f-i;if(d=0))try{t.hostname=yy.toASCII(t.hostname)}catch{}return Gf(Zs(t))}function Mz(e){let t=Za(e,!0);if(t.hostname&&(!t.protocol||J3.indexOf(t.protocol)>=0))try{t.hostname=yy.toUnicode(t.hostname)}catch{}return Ja(Zs(t),Ja.defaultChars+"%")}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);t||rp(e)||(t=e||{},e="default"),this.inline=new L3,this.block=new M3,this.core=new v3,this.renderer=new h3,this.linkify=new U3,this.validateLink=Az,this.normalizeLink=Nz,this.normalizeLinkText=Mz,this.utils=Sb,this.helpers=Qs({},Nb),this.options={},this.configure(e),t&&this.set(t)}kn.prototype.set=function(e){return Qs(this.options,e),this};kn.prototype.configure=function(e){let t=this;if(rp(e)){let n=e;if(e=Sz[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};kn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};kn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};kn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};kn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};kn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};kn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};kn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var rl=kn;var Oz=new vo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function Rz(e,t){if(e.isText&&t.isText&&ce.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var ky=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:ce.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks),s;o&&(s=Rz(o,i))?r[r.length-1]=s:r.push(i)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{s.openNode(i,tu(o,l,a,u)),s.addText(Z3(l.content)),s.closeNode()}:(n[r+"_open"]=(s,l,a,u)=>s.openNode(i,tu(o,l,a,u)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=e.nodeType(o.node);n[r]=(s,l,a,u)=>s.addNode(i,tu(o,l,a,u))}else if(o.mark){let i=e.marks[o.mark];xy(o,r)?n[r]=(s,l,a,u)=>{s.openMark(i.create(tu(o,l,a,u))),s.addText(Z3(l.content)),s.closeMark(i)}:(n[r+"_open"]=(s,l,a,u)=>s.openMark(i.create(tu(o,l,a,u))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)xy(o,r)?n[r]=vy:(n[r+"_open"]=vy,n[r+"_close"]=vy);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var Ey=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=Dz(t,r)}parse(t,n={}){let r=new ky(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function X3(e,t){for(;++t({tight:X3(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:X3(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),Iz={open:"",close:"",mixable:!0},wy=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new nu(this.nodes,this.marks,n);return r.renderContent(t),r.out}},zn=new wy({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` `),e.text(t.textContent,!1),e.write(` `),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,i=>{let s=String(n+i);return e.repeat(" ",r-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return eN(n.child(r),-1)},close(e,t,n,r){return eN(n.child(r-1),1)},escape:!1}});function eN(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let i=o>0&&t>0?" `":"`";for(let s=0;s0&&t<0&&(i+=" "),i}function Dz(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var nu=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` +`);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,r){return e.inAutolink=Lz(t,n,r),e.inAutolink?"<":"["},close(e,t,n,r){let{inAutolink:o}=e;return e.inAutolink=void 0,o?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return Q3(n.child(r),-1)},close(e,t,n,r){return Q3(n.child(r-1),1)},escape:!1}});function Q3(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let i=o>0&&t>0?" `":"`";for(let s=0;s0&&t<0&&(i+=" "),i}function Lz(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var nu=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` `),t>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let o=1;othis.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,l,a)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(a+1==t.childCount)return!1;let b=t.child(a+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=g?s.withText(g):null,s||(u=r))}if(s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&(a==t.childCount-1||!m.isInSet(t.child(a+1).marks))})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(s.text);g&&(o=g,s=b?s.withText(b):null,s||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;mg?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(i),i(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((s,l,a)=>{a&&o&&this.flushClose(1),this.wrapBlock(n,r(a),t,()=>this.render(s,t,a))}),this.inTightList=i}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?Wz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,up=(e,t,n)=>(jz(e,typeof t!="symbol"?t+"":t,n),n),Kz=re.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;let l=r.getAttributes(s);return o.updateAttributes(s,{tight:t??!(l!=null&&l.tight)})}return e.options.listTypes.some(s=>i(s))}}}}}),sN=rl();function cN(e,t){return sN.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new sN.inline.State(e,null,null,[]).scanDelims(t,!0)}function dN(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function Gz(e,t,n,r){let o=n,i=e;for(;on&&!cN(i,o).can_close;)i=dN(i,t,o,-1),o--;return{text:i,from:n,to:o}}function Jz(e,t,n,r){let o={text:e,from:n,to:r};return o=Gz(o.text,t,o.from,o.to),o=Yz(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function Ty(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Zz(e){return e?.replace(//g,">")}function Xz(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function Qz(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var dp=Q.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(e7(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function e7(e,t){let n=e.type.schema,r=$s(N.from(e),n);return e.isBlock&&(t instanceof N||t.type.name===n.topNodeType.name)?t7(r):r}function t7(e){let n=Ty(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` +`)}render(t,n,r){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,r,o)=>this.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,l,a)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(g=>{if(a+1==t.childCount)return!1;let b=t.child(a+1);return g.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",s&&s.isText&&u.some(g=>{let b=this.getMark(g.type.name);return b&&b.expelEnclosingWhitespace&&!g.isInSet(r)})){let[g,b,m]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=m?s.withText(m):null,s||(u=r))}if(s&&s.isText&&u.some(g=>{let b=this.getMark(g.type.name);return b&&b.expelEnclosingWhitespace&&(a==t.childCount-1||!g.isInSet(t.child(a+1).marks))})){let[g,b,m]=/^(.*?)(\s*)$/m.exec(s.text);m&&(o=m,s=b?s.withText(b):null,s||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let g=0;gm?u=u.slice(0,m).concat(b).concat(u.slice(m,g)).concat(u.slice(g+1,p)):m>g&&(u=u.slice(0,g).concat(u.slice(g+1,m)).concat(b).concat(u.slice(m,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(i),i(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((s,l,a)=>{a&&o&&this.flushClose(1),this.wrapBlock(n,r(a),t,()=>this.render(s,t,a))}),this.inTightList=i}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?Kz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cp=(e,t,n)=>(Gz(e,typeof t!="symbol"?t+"":t,n),n),Yz=re.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;let l=r.getAttributes(s);return o.updateAttributes(s,{tight:t??!(l!=null&&l.tight)})}return e.options.listTypes.some(s=>i(s))}}}}}),iN=rl();function uN(e,t){return iN.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new iN.inline.State(e,null,null,[]).scanDelims(t,!0)}function cN(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function Jz(e,t,n,r){let o=n,i=e;for(;on&&!uN(i,o).can_close;)i=cN(i,t,o,-1),o--;return{text:i,from:n,to:o}}function Xz(e,t,n,r){let o={text:e,from:n,to:r};return o=Jz(o.text,t,o.from,o.to),o=Zz(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function Ny(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Qz(e){return e?.replace(//g,">")}function e7(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function t7(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var fp=Q.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(n7(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function n7(e,t){let n=e.type.schema,r=$s(N.from(e),n);return e.isBlock&&(t instanceof N||t.type.name===n.topNodeType.name)?r7(r):r}function r7(e){let n=Ny(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` ${n.innerHTML} `:` -`,n.outerHTML}var n7=Q.create({name:"blockquote"}),r7=n7.extend({addStorage(){return{markdown:{serialize:zn.nodes.blockquote,parse:{}}}}}),o7=Q.create({name:"bulletList"}),pN=o7.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),i7=Q.create({name:"codeBlock"}),s7=i7.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` -`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),l7=Q.create({name:"hardBreak"}),hN=l7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var y7=g7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,i=String(o+t.childCount-1).length,s=e.repeat(" ",i+2),a=b7(t,n,r)%2?") ":". ";e.renderList(t,s,u=>{let c=String(o+u);return e.repeat(" ",i-c.length)+c+a})},parse:{}}}}}),x7=Q.create({name:"paragraph"}),v7=x7.extend({addStorage(){return{markdown:{serialize:zn.nodes.paragraph,parse:{}}}}});function wy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var k7=Q.create({name:"table"}),E7=k7.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!w7(t)){dp.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,i)=>{if(e.write("| "),r.forEach((s,l,a)=>{a&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!i){let s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function aN(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function w7(e){let t=wy(e),n=t[0],r=t.slice(1);return!(wy(n).some(o=>o.type.name!=="tableHeader"||aN(o)||o.childCount>1)||r.some(o=>wy(o).some(i=>i.type.name==="tableHeader"||aN(i)||i.childCount>1)))}var _7=Q.create({name:"taskItem"}),S7=_7.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),C7=Q.create({name:"taskList"}),T7=C7.extend({addStorage(){return{markdown:{serialize:pN.storage.markdown.serialize,parse:{setup(e){e.use(uN.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),A7=Q.create({name:"text"}),N7=A7.extend({addStorage(){return{markdown:{serialize(e,t){e.text(Zz(t.text))},parse:{}}}}}),M7=Ge.create({name:"bold"}),O7=M7.extend({addStorage(){return{markdown:{serialize:zn.marks.strong,parse:{}}}}}),R7=Ge.create({name:"code"}),D7=R7.extend({addStorage(){return{markdown:{serialize:zn.marks.code,parse:{}}}}}),I7=Ge.create({name:"italic"}),L7=I7.extend({addStorage(){return{markdown:{serialize:zn.marks.em,parse:{}}}}}),P7=Ge.create({name:"link"}),B7=P7.extend({addStorage(){return{markdown:{serialize:zn.marks.link,parse:{}}}}}),F7=Ge.create({name:"strike"}),z7=F7.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),U7=[r7,pN,s7,hN,u7,d7,dp,p7,m7,y7,v7,E7,S7,T7,N7,O7,D7,fN,L7,B7,z7];function cp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=U7.find(i=>i.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var Sy=class{constructor(t){up(this,"editor",null),this.editor=t}serialize(t){let n=new _y(this.nodes,this.marks,{hardBreakNodeName:hN.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(dp)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(fN)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=cp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=cp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},Cy=class{constructor(t,n){up(this,"editor",null),up(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=t,this.md=this.withPatchedRenderer(rl({html:r,linkify:o,breaks:i}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=cp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});let r=this.md.render(t),o=Ty(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=cp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&Xz(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,l;let a=t.firstElementChild,{nextElementSibling:u}=a,c=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",d=u?"":(s=(l=n.match(/\s+$/))===null||l===void 0?void 0:l[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){a.innerHTML=`${a.innerHTML}${d}`;return}Qz(a),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` +`,n.outerHTML}var o7=Q.create({name:"blockquote"}),i7=o7.extend({addStorage(){return{markdown:{serialize:zn.nodes.blockquote,parse:{}}}}}),s7=Q.create({name:"bulletList"}),fN=s7.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),l7=Q.create({name:"codeBlock"}),a7=l7.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` +`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),u7=Q.create({name:"hardBreak"}),pN=u7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var v7=y7.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,i=String(o+t.childCount-1).length,s=e.repeat(" ",i+2),a=x7(t,n,r)%2?") ":". ";e.renderList(t,s,u=>{let c=String(o+u);return e.repeat(" ",i-c.length)+c+a})},parse:{}}}}}),k7=Q.create({name:"paragraph"}),E7=k7.extend({addStorage(){return{markdown:{serialize:zn.nodes.paragraph,parse:{}}}}});function Sy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var w7=Q.create({name:"table"}),_7=w7.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!S7(t)){fp.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,i)=>{if(e.write("| "),r.forEach((s,l,a)=>{a&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!i){let s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function lN(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function S7(e){let t=Sy(e),n=t[0],r=t.slice(1);return!(Sy(n).some(o=>o.type.name!=="tableHeader"||lN(o)||o.childCount>1)||r.some(o=>Sy(o).some(i=>i.type.name==="tableHeader"||lN(i)||i.childCount>1)))}var C7=Q.create({name:"taskItem"}),T7=C7.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),A7=Q.create({name:"taskList"}),N7=A7.extend({addStorage(){return{markdown:{serialize:fN.storage.markdown.serialize,parse:{setup(e){e.use(aN.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),M7=Q.create({name:"text"}),O7=M7.extend({addStorage(){return{markdown:{serialize(e,t){e.text(Qz(t.text))},parse:{}}}}}),R7=Ge.create({name:"bold"}),D7=R7.extend({addStorage(){return{markdown:{serialize:zn.marks.strong,parse:{}}}}}),I7=Ge.create({name:"code"}),L7=I7.extend({addStorage(){return{markdown:{serialize:zn.marks.code,parse:{}}}}}),P7=Ge.create({name:"italic"}),B7=P7.extend({addStorage(){return{markdown:{serialize:zn.marks.em,parse:{}}}}}),F7=Ge.create({name:"link"}),z7=F7.extend({addStorage(){return{markdown:{serialize:zn.marks.link,parse:{}}}}}),U7=Ge.create({name:"strike"}),$7=U7.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),H7=[i7,fN,a7,pN,d7,p7,fp,m7,b7,v7,E7,_7,T7,N7,O7,D7,L7,dN,B7,z7,$7];function dp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=H7.find(i=>i.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var Ty=class{constructor(t){cp(this,"editor",null),this.editor=t}serialize(t){let n=new Cy(this.nodes,this.marks,{hardBreakNodeName:pN.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(fp)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(dN)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=dp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=dp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},Ay=class{constructor(t,n){cp(this,"editor",null),cp(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=t,this.md=this.withPatchedRenderer(rl({html:r,linkify:o,breaks:i}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=dp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});let r=this.md.render(t),o=Ny(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=dp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&e7(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,l;let a=t.firstElementChild,{nextElementSibling:u}=a,c=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",d=u?"":(s=(l=n.match(/\s+$/))===null||l===void 0?void 0:l[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){a.innerHTML=`${a.innerHTML}${d}`;return}t7(a),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` `?o:o[o.length-1]===` -`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},$7=re.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new q({key:new Z("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return fn.fromSchema(this.editor.schema).parseSlice(Ty(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),mN=re.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=Kg.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new Cy(this.editor,this.options),serializer:new Sy(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[Kz.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),$7.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var zi=H(Re());var Ay=["top","right","bottom","left"],gN=["start","end"],Ny=Ay.reduce((e,t)=>e.concat(t,t+"-"+gN[0],t+"-"+gN[1]),[]),En=Math.min,dt=Math.max,iu=Math.round;var Un=e=>({x:e,y:e}),H7={left:"right",right:"left",bottom:"top",top:"bottom"},q7={start:"end",end:"start"};function fp(e,t,n){return dt(e,En(t,n))}function cr(e,t){return typeof e=="function"?e(t):e}function nn(e){return e.split("-")[0]}function wn(e){return e.split("-")[1]}function My(e){return e==="x"?"y":"x"}function pp(e){return e==="y"?"height":"width"}var V7=new Set(["top","bottom"]);function $n(e){return V7.has(nn(e))?"y":"x"}function hp(e){return My($n(e))}function Oy(e,t,n){n===void 0&&(n=!1);let r=wn(e),o=hp(e),i=pp(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ou(s)),[s,ou(s)]}function xN(e){let t=ou(e);return[ru(e),t,ru(t)]}function ru(e){return e.replace(/start|end/g,t=>q7[t])}var bN=["left","right"],yN=["right","left"],W7=["top","bottom"],j7=["bottom","top"];function K7(e,t,n){switch(e){case"top":case"bottom":return n?t?yN:bN:t?bN:yN;case"left":case"right":return t?W7:j7;default:return[]}}function vN(e,t,n,r){let o=wn(e),i=K7(nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ru)))),i}function ou(e){return e.replace(/left|right|bottom|top/g,t=>H7[t])}function G7(e){return{top:0,right:0,bottom:0,left:0,...e}}function mp(e){return typeof e!="number"?G7(e):{top:e,right:e,bottom:e,left:e}}function Vr(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function kN(e,t,n){let{reference:r,floating:o}=e,i=$n(t),s=hp(t),l=pp(s),a=nn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2,p;switch(a){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wn(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}var _N=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=kN(u,r,a),f=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:c=0}=cr(e,t)||{};if(u==null)return{};let d=mp(c),f={x:n,y:r},p=hp(o),h=pp(p),m=await s.getDimensions(u),b=p==="y",g=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",v=i.reference[h]+i.reference[p]-f[p]-i.floating[h],k=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),w=E?E[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(E)))&&(w=l.floating[x]||i.floating[h]);let _=v/2-k/2,A=w/2-m[h]/2-1,T=En(d[g],A),B=En(d[y],A),G=T,te=w-m[h]-B,$=w/2-m[h]/2+_,C=fp(G,$,te),S=!a.arrow&&wn(o)!=null&&$!==C&&i.reference[h]/2-($wn(o)===e),...n.filter(o=>wn(o)!==e)]:n.filter(o=>nn(o)===o)).filter(o=>e?wn(o)===e||(t?ru(o)!==o:!1):!0)}var CN=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:i,middlewareData:s,placement:l,platform:a,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=Ny,autoAlignment:p=!0,...h}=cr(e,t),m=d!==void 0||f===Ny?Y7(d||null,p,f):f,b=await Li(t,h),g=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[g];if(y==null)return{};let x=Oy(y,i,await(a.isRTL==null?void 0:a.isRTL(u.floating)));if(l!==y)return{reset:{placement:m[0]}};let v=[b[nn(y)],b[x[0]],b[x[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:v}],E=m[g+1];if(E)return{data:{index:g+1,overflows:k},reset:{placement:E}};let w=k.map(T=>{let B=wn(T.placement);return[T.placement,B&&c?T.overflows.slice(0,2).reduce((G,te)=>G+te,0):T.overflows[0],T.overflows]}).sort((T,B)=>T[1]-B[1]),A=((o=w.filter(T=>T[2].slice(0,wn(T[0])?2:3).every(B=>B<=0))[0])==null?void 0:o[0])||w[0][0];return A!==l?{data:{index:g+1,overflows:k},reset:{placement:A}}:{}}}},TN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=cr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nn(o),y=$n(l),x=nn(l)===l,v=await(a.isRTL==null?void 0:a.isRTL(u.floating)),k=f||(x||!m?[ou(l)]:xN(l)),E=h!=="none";!f&&E&&k.push(...vN(l,m,h,v));let w=[l,...k],_=await Li(t,b),A=[],T=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&A.push(_[g]),d){let $=Oy(o,s,v);A.push(_[$[0]],_[$[1]])}if(T=[...T,{placement:o,overflows:A}],!A.every($=>$<=0)){var B,G;let $=(((B=i.flip)==null?void 0:B.index)||0)+1,C=w[$];if(C&&(!(d==="alignment"?y!==$n(C):!1)||T.every(I=>$n(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:$,overflows:T},reset:{placement:C}};let S=(G=T.filter(M=>M.overflows[0]<=0).sort((M,I)=>M.overflows[1]-I.overflows[1])[0])==null?void 0:G.placement;if(!S)switch(p){case"bestFit":{var te;let M=(te=T.filter(I=>{if(E){let Y=$n(I.placement);return Y===y||Y==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(Y=>Y>0).reduce((Y,ie)=>Y+ie,0)]).sort((I,Y)=>I[1]-Y[1])[0])==null?void 0:te[0];M&&(S=M);break}case"initialPlacement":S=l;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function EN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wN(e){return Ay.some(t=>e[t]>=0)}var AN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=cr(e,t);switch(r){case"referenceHidden":{let i=await Li(t,{...o,elementContext:"reference"}),s=EN(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:wN(s)}}}case"escaped":{let i=await Li(t,{...o,altBoundary:!0}),s=EN(i,n.floating);return{data:{escapedOffsets:s,escaped:wN(s)}}}default:return{}}}}};function NN(e){let t=En(...e.map(i=>i.left)),n=En(...e.map(i=>i.top)),r=dt(...e.map(i=>i.right)),o=dt(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function J7(e){let t=e.slice().sort((o,i)=>o.y-i.y),n=[],r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>Vr(NN(o)))}var MN=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:l=2,x:a,y:u}=cr(e,t),c=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),d=J7(c),f=Vr(NN(c)),p=mp(l);function h(){if(d.length===2&&d[0].left>d[1].right&&a!=null&&u!=null)return d.find(b=>a>b.left-p.left&&ab.top-p.top&&u=2){if($n(n)==="y"){let T=d[0],B=d[d.length-1],G=nn(n)==="top",te=T.top,$=B.bottom,C=G?T.left:B.left,S=G?T.right:B.right,M=S-C,I=$-te;return{top:te,bottom:$,left:C,right:S,width:M,height:I,x:C,y:te}}let b=nn(n)==="left",g=dt(...d.map(T=>T.right)),y=En(...d.map(T=>T.left)),x=d.filter(T=>b?T.left===y:T.right===g),v=x[0].top,k=x[x.length-1].bottom,E=y,w=g,_=w-E,A=k-v;return{top:v,bottom:k,left:E,right:w,width:_,height:A,x:E,y:v}}return f}let m=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},Z7=new Set(["left","top"]);async function X7(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=nn(n),l=wn(n),a=$n(n)==="y",u=Z7.has(s)?-1:1,c=i&&a?-1:1,d=cr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var ON=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:l}=t,a=await X7(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},RN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...a}=cr(e,t),u={x:n,y:r},c=await Li(t,a),d=$n(nn(o)),f=My(d),p=u[f],h=u[d];if(i){let b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[b],x=p-c[g];p=fp(y,p,x)}if(s){let b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+c[b],x=h-c[g];h=fp(y,h,x)}let m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}};var DN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=cr(e,t),c=await Li(t,u),d=nn(o),f=wn(o),p=$n(o)==="y",{width:h,height:m}=i.floating,b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");let y=m-c.top-c.bottom,x=h-c.left-c.right,v=En(m-c[b],y),k=En(h-c[g],x),E=!t.middlewareData.shift,w=v,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=y),E&&!f){let T=dt(c.left,0),B=dt(c.right,0),G=dt(c.top,0),te=dt(c.bottom,0);p?_=h-2*(T!==0||B!==0?T+B:dt(c.left,c.right)):w=m-2*(G!==0||te!==0?G+te:dt(c.top,c.bottom))}await a({...t,availableWidth:_,availableHeight:w});let A=await s.getDimensions(l.floating);return h!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function bp(){return typeof window<"u"}function Pi(e){return LN(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dr(e){var t;return(t=(LN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LN(e){return bp()?e instanceof Node||e instanceof Vt(e).Node:!1}function _n(e){return bp()?e instanceof Element||e instanceof Vt(e).Element:!1}function Hn(e){return bp()?e instanceof HTMLElement||e instanceof Vt(e).HTMLElement:!1}function IN(e){return!bp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}var Q7=new Set(["inline","contents"]);function ol(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Q7.has(o)}var eU=new Set(["table","td","th"]);function PN(e){return eU.has(Pi(e))}var tU=[":popover-open",":modal"];function su(e){return tU.some(t=>{try{return e.matches(t)}catch{return!1}})}var nU=["transform","translate","scale","rotate","perspective"],rU=["transform","translate","scale","rotate","perspective","filter"],oU=["paint","layout","strict","content"];function yp(e){let t=xp(),n=_n(e)?Sn(e):e;return nU.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rU.some(r=>(n.willChange||"").includes(r))||oU.some(r=>(n.contain||"").includes(r))}function BN(e){let t=Wr(e);for(;Hn(t)&&!Bi(t);){if(yp(t))return t;if(su(t))return null;t=Wr(t)}return null}function xp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var iU=new Set(["html","body","#document"]);function Bi(e){return iU.has(Pi(e))}function Sn(e){return Vt(e).getComputedStyle(e)}function lu(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wr(e){if(Pi(e)==="html")return e;let t=e.assignedSlot||e.parentNode||IN(e)&&e.host||dr(e);return IN(t)?t.host:t}function FN(e){let t=Wr(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hn(t)&&ol(t)?t:FN(t)}function gp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=FN(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Vt(o);if(i){let l=vp(s);return t.concat(s,s.visualViewport||[],ol(o)?o:[],l&&n?gp(l):[])}return t.concat(o,gp(o,[],n))}function vp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HN(e){let t=Sn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Hn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=iu(n)!==i||iu(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function qN(e){return _n(e)?e:e.contextElement}function il(e){let t=qN(e);if(!Hn(t))return Un(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=HN(t),s=(i?iu(n.width):n.width)/r,l=(i?iu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var sU=Un(0);function VN(e){let t=Vt(e);return!xp()||!t.visualViewport?sU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function au(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=qN(e),s=Un(1);t&&(r?_n(r)&&(s=il(r)):s=il(e));let l=lU(i,n,r)?VN(i):Un(0),a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){let f=Vt(i),p=r&&_n(r)?Vt(r):r,h=f,m=vp(h);for(;m&&r&&p!==h;){let b=il(m),g=m.getBoundingClientRect(),y=Sn(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,v=g.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,u*=b.y,c*=b.x,d*=b.y,a+=x,u+=v,h=Vt(m),m=vp(h)}}return Vr({width:c,height:d,x:a,y:u})}function kp(e,t){let n=lu(e).scrollLeft;return t?t.left+n:au(dr(e)).left+n}function WN(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-kp(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function aU(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=dr(r),l=t?su(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=Un(1),c=Un(0),d=Hn(r);if((d||!d&&!i)&&((Pi(r)!=="body"||ol(s))&&(a=lu(r)),Hn(r))){let p=au(r);u=il(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!i?WN(s,a):Un(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}}function uU(e){return Array.from(e.getClientRects())}function cU(e){let t=dr(e),n=lu(e),r=e.ownerDocument.body,o=dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+kp(e),l=-n.scrollTop;return Sn(r).direction==="rtl"&&(s+=dt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}var zN=25;function dU(e,t){let n=Vt(e),r=dr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;let c=xp();(!c||c&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}let u=kp(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=zN&&(i-=h)}else u<=zN&&(i+=u);return{width:i,height:s,x:l,y:a}}var fU=new Set(["absolute","fixed"]);function pU(e,t){let n=au(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Hn(e)?il(e):Un(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function UN(e,t,n){let r;if(t==="viewport")r=dU(e,n);else if(t==="document")r=cU(dr(e));else if(_n(t))r=pU(t,n);else{let o=VN(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vr(r)}function jN(e,t){let n=Wr(e);return n===t||!_n(n)||Bi(n)?!1:Sn(n).position==="fixed"||jN(n,t)}function hU(e,t){let n=t.get(e);if(n)return n;let r=gp(e,[],!1).filter(l=>_n(l)&&Pi(l)!=="body"),o=null,i=Sn(e).position==="fixed",s=i?Wr(e):e;for(;_n(s)&&!Bi(s);){let l=Sn(s),a=yp(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&fU.has(o.position)||ol(s)&&!a&&jN(e,s))?r=r.filter(c=>c!==s):o=l,s=Wr(s)}return t.set(e,r),r}function mU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?su(t)?[]:hU(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{let d=UN(t,c,o);return u.top=dt(d.top,u.top),u.right=En(d.right,u.right),u.bottom=En(d.bottom,u.bottom),u.left=dt(d.left,u.left),u},UN(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function gU(e){let{width:t,height:n}=HN(e);return{width:t,height:n}}function bU(e,t,n){let r=Hn(t),o=dr(t),i=n==="fixed",s=au(e,!0,i,t),l={scrollLeft:0,scrollTop:0},a=Un(0);function u(){a.x=kp(o)}if(r||!r&&!i)if((Pi(t)!=="body"||ol(o))&&(l=lu(t)),r){let p=au(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();let c=o&&!r&&!i?WN(o,l):Un(0),d=s.left+l.scrollLeft-a.x-c.x,f=s.top+l.scrollTop-a.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function Ry(e){return Sn(e).position==="static"}function $N(e,t){if(!Hn(e)||Sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dr(e)===n&&(n=n.ownerDocument.body),n}function KN(e,t){let n=Vt(e);if(su(e))return n;if(!Hn(e)){let o=Wr(e);for(;o&&!Bi(o);){if(_n(o)&&!Ry(o))return o;o=Wr(o)}return n}let r=$N(e,t);for(;r&&PN(r)&&Ry(r);)r=$N(r,t);return r&&Bi(r)&&Ry(r)&&!yp(r)?n:r||BN(e)||n}var yU=async function(e){let t=this.getOffsetParent||KN,n=this.getDimensions,r=await n(e.floating);return{reference:bU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xU(e){return Sn(e).direction==="rtl"}var vU={convertOffsetParentRelativeRectToViewportRelativeRect:aU,getDocumentElement:dr,getClippingRect:mU,getOffsetParent:KN,getElementRects:yU,getClientRects:uU,getDimensions:gU,getScale:il,isElement:_n,isRTL:xU};var Ep=ON,wp=CN,_p=RN,Sp=TN,Cp=DN,Tp=AN,Ap=SN,Np=MN;var Mp=(e,t,n)=>{let r=new Map,o={platform:vU,...n},i={...o.platform,_c:r};return _N(e,t,{...o,platform:i})};function kU(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-o,l=r-n,a=o,u=n;return new DOMRect(a,u,s,l)}var EU=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:i,appendTo:s,getReferencedVirtualElement:l,options:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:m}=d,{empty:b}=m,g=!h.textBetween(f,p).length&&_d(d.selection),y=this.element.contains(document.activeElement);return!(!(c.hasFocus()||y)||b||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=s,this.scrollTarget=(u=a?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...a},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Sp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(_p(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(Ep(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Ap(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Cp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(wp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Tp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Np(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=Rd(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof z){let i=this.view.nodeDOM(t.from),s=i.dataset.nodeViewWrapper?i:i.querySelector("[data-node-view-wrapper]");s&&(i=s),i&&(o={getBoundingClientRect:()=>i.getBoundingClientRect(),getClientRects:()=>[i.getBoundingClientRect()]})}if(t instanceof me){let{$anchorCell:i,$headCell:s}=t,l=i?i.pos:s.pos,a=s?s.pos:i.pos,u=this.view.nodeDOM(l),c=this.view.nodeDOM(a);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():kU(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&Mp(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),i=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,i,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:i,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Dy=e=>new q({key:typeof e.pluginKey=="string"?new Z(e.pluginKey):e.pluginKey,view:t=>new EU({view:t,...e})}),HX=re.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Dy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Fi=H(Re(),1),GN=H(ks(),1),YN=H(de(),1);var wU=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:i}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:s,state:l})=>{let{selection:a}=l,{$anchor:u,empty:c}=a,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(s,l,a,u)=>{let{composing:c}=s;if(c||!l&&!a)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&((l=this.element.parentNode)!=null&&l.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return qg(e,{textSerializers:Nd(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Sp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(_p(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(Ep(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Ap(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Cp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(wp(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Tp(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Np(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:i,to:s})}updatePosition(){let{selection:e}=this.editor.state,t=Rd(this.view,e.from,e.to);Mp({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:i})=>{this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Iy=e=>new q({key:typeof e.pluginKey=="string"?new Z(e.pluginKey):e.pluginKey,view:t=>new wU({view:t,...e})}),YX=re.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Iy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var sl=H(Re(),1),ZN=H(ks(),1),XN=H(de(),1),JN=Fi.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:i=null,getReferencedVirtualElement:s,options:l,children:a,...u},c)=>{let d=(0,Fi.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=Fd(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:i,getReferencedVirtualElement:s,options:l},m=(0,Fi.useRef)(h);return m.current=h,(0,Fi.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let g=Dy({...m.current,editor:p,element:b});p.registerPlugin(g);let y=m.current.pluginKey;return()=>{p.unregisterPlugin(y),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,GN.createPortal)((0,YN.jsx)("div",{...u,children:a}),d.current)}),nQ=sl.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:i,...s},l)=>{let a=(0,sl.useRef)(document.createElement("div"));typeof l=="function"?l(a.current):l&&(l.current=a.current);let{editor:u}=Fd();return(0,sl.useEffect)(()=>{let c=a.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=Iy({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,ZN.createPortal)((0,XN.jsx)("div",{...s,children:i}),a.current)});var QN=document.createElement("style");QN.textContent=`/* Floating toolbar container */ +`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},V7=re.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new V({key:new Z("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return fn.fromSchema(this.editor.schema).parseSlice(Ny(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),hN=re.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=Gg.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new Ay(this.editor,this.options),serializer:new Ty(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[Yz.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),V7.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var zi=H(Re());var My=["top","right","bottom","left"],mN=["start","end"],Oy=My.reduce((e,t)=>e.concat(t,t+"-"+mN[0],t+"-"+mN[1]),[]),En=Math.min,dt=Math.max,iu=Math.round;var Un=e=>({x:e,y:e}),q7={left:"right",right:"left",bottom:"top",top:"bottom"},W7={start:"end",end:"start"};function pp(e,t,n){return dt(e,En(t,n))}function cr(e,t){return typeof e=="function"?e(t):e}function nn(e){return e.split("-")[0]}function wn(e){return e.split("-")[1]}function Ry(e){return e==="x"?"y":"x"}function hp(e){return e==="y"?"height":"width"}var j7=new Set(["top","bottom"]);function $n(e){return j7.has(nn(e))?"y":"x"}function mp(e){return Ry($n(e))}function Dy(e,t,n){n===void 0&&(n=!1);let r=wn(e),o=mp(e),i=hp(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ou(s)),[s,ou(s)]}function yN(e){let t=ou(e);return[ru(e),t,ru(t)]}function ru(e){return e.replace(/start|end/g,t=>W7[t])}var gN=["left","right"],bN=["right","left"],K7=["top","bottom"],G7=["bottom","top"];function Y7(e,t,n){switch(e){case"top":case"bottom":return n?t?bN:gN:t?gN:bN;case"left":case"right":return t?K7:G7;default:return[]}}function xN(e,t,n,r){let o=wn(e),i=Y7(nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ru)))),i}function ou(e){return e.replace(/left|right|bottom|top/g,t=>q7[t])}function J7(e){return{top:0,right:0,bottom:0,left:0,...e}}function gp(e){return typeof e!="number"?J7(e):{top:e,right:e,bottom:e,left:e}}function qr(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function vN(e,t,n){let{reference:r,floating:o}=e,i=$n(t),s=mp(t),l=hp(s),a=nn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2,p;switch(a){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wn(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}var wN=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=vN(u,r,a),f=r,p={},h=0;for(let g=0;g({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:c=0}=cr(e,t)||{};if(u==null)return{};let d=gp(c),f={x:n,y:r},p=mp(o),h=hp(p),g=await s.getDimensions(u),b=p==="y",m=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",v=i.reference[h]+i.reference[p]-f[p]-i.floating[h],k=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),w=E?E[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(E)))&&(w=l.floating[x]||i.floating[h]);let _=v/2-k/2,A=w/2-g[h]/2-1,T=En(d[m],A),B=En(d[y],A),G=T,te=w-g[h]-B,$=w/2-g[h]/2+_,C=pp(G,$,te),S=!a.arrow&&wn(o)!=null&&$!==C&&i.reference[h]/2-($wn(o)===e),...n.filter(o=>wn(o)!==e)]:n.filter(o=>nn(o)===o)).filter(o=>e?wn(o)===e||(t?ru(o)!==o:!1):!0)}var SN=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:i,middlewareData:s,placement:l,platform:a,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=Oy,autoAlignment:p=!0,...h}=cr(e,t),g=d!==void 0||f===Oy?Z7(d||null,p,f):f,b=await Li(t,h),m=((n=s.autoPlacement)==null?void 0:n.index)||0,y=g[m];if(y==null)return{};let x=Dy(y,i,await(a.isRTL==null?void 0:a.isRTL(u.floating)));if(l!==y)return{reset:{placement:g[0]}};let v=[b[nn(y)],b[x[0]],b[x[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:v}],E=g[m+1];if(E)return{data:{index:m+1,overflows:k},reset:{placement:E}};let w=k.map(T=>{let B=wn(T.placement);return[T.placement,B&&c?T.overflows.slice(0,2).reduce((G,te)=>G+te,0):T.overflows[0],T.overflows]}).sort((T,B)=>T[1]-B[1]),A=((o=w.filter(T=>T[2].slice(0,wn(T[0])?2:3).every(B=>B<=0))[0])==null?void 0:o[0])||w[0][0];return A!==l?{data:{index:m+1,overflows:k},reset:{placement:A}}:{}}}},CN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=cr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let m=nn(o),y=$n(l),x=nn(l)===l,v=await(a.isRTL==null?void 0:a.isRTL(u.floating)),k=f||(x||!g?[ou(l)]:yN(l)),E=h!=="none";!f&&E&&k.push(...xN(l,g,h,v));let w=[l,...k],_=await Li(t,b),A=[],T=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&A.push(_[m]),d){let $=Dy(o,s,v);A.push(_[$[0]],_[$[1]])}if(T=[...T,{placement:o,overflows:A}],!A.every($=>$<=0)){var B,G;let $=(((B=i.flip)==null?void 0:B.index)||0)+1,C=w[$];if(C&&(!(d==="alignment"?y!==$n(C):!1)||T.every(I=>$n(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:$,overflows:T},reset:{placement:C}};let S=(G=T.filter(M=>M.overflows[0]<=0).sort((M,I)=>M.overflows[1]-I.overflows[1])[0])==null?void 0:G.placement;if(!S)switch(p){case"bestFit":{var te;let M=(te=T.filter(I=>{if(E){let Y=$n(I.placement);return Y===y||Y==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(Y=>Y>0).reduce((Y,ie)=>Y+ie,0)]).sort((I,Y)=>I[1]-Y[1])[0])==null?void 0:te[0];M&&(S=M);break}case"initialPlacement":S=l;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function kN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function EN(e){return My.some(t=>e[t]>=0)}var TN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=cr(e,t);switch(r){case"referenceHidden":{let i=await Li(t,{...o,elementContext:"reference"}),s=kN(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:EN(s)}}}case"escaped":{let i=await Li(t,{...o,altBoundary:!0}),s=kN(i,n.floating);return{data:{escapedOffsets:s,escaped:EN(s)}}}default:return{}}}}};function AN(e){let t=En(...e.map(i=>i.left)),n=En(...e.map(i=>i.top)),r=dt(...e.map(i=>i.right)),o=dt(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function X7(e){let t=e.slice().sort((o,i)=>o.y-i.y),n=[],r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>qr(AN(o)))}var NN=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:l=2,x:a,y:u}=cr(e,t),c=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),d=X7(c),f=qr(AN(c)),p=gp(l);function h(){if(d.length===2&&d[0].left>d[1].right&&a!=null&&u!=null)return d.find(b=>a>b.left-p.left&&ab.top-p.top&&u=2){if($n(n)==="y"){let T=d[0],B=d[d.length-1],G=nn(n)==="top",te=T.top,$=B.bottom,C=G?T.left:B.left,S=G?T.right:B.right,M=S-C,I=$-te;return{top:te,bottom:$,left:C,right:S,width:M,height:I,x:C,y:te}}let b=nn(n)==="left",m=dt(...d.map(T=>T.right)),y=En(...d.map(T=>T.left)),x=d.filter(T=>b?T.left===y:T.right===m),v=x[0].top,k=x[x.length-1].bottom,E=y,w=m,_=w-E,A=k-v;return{top:v,bottom:k,left:E,right:w,width:_,height:A,x:E,y:v}}return f}let g=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});return o.reference.x!==g.reference.x||o.reference.y!==g.reference.y||o.reference.width!==g.reference.width||o.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},Q7=new Set(["left","top"]);async function eU(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=nn(n),l=wn(n),a=$n(n)==="y",u=Q7.has(s)?-1:1,c=i&&a?-1:1,d=cr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var MN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:l}=t,a=await eU(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},ON=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:m,y}=b;return{x:m,y}}},...a}=cr(e,t),u={x:n,y:r},c=await Li(t,a),d=$n(nn(o)),f=Ry(d),p=u[f],h=u[d];if(i){let b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=p+c[b],x=p-c[m];p=pp(y,p,x)}if(s){let b=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=h+c[b],x=h-c[m];h=pp(y,h,x)}let g=l.fn({...t,[f]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:s}}}}}};var RN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=cr(e,t),c=await Li(t,u),d=nn(o),f=wn(o),p=$n(o)==="y",{width:h,height:g}=i.floating,b,m;d==="top"||d==="bottom"?(b=d,m=f===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(m=d,b=f==="end"?"top":"bottom");let y=g-c.top-c.bottom,x=h-c.left-c.right,v=En(g-c[b],y),k=En(h-c[m],x),E=!t.middlewareData.shift,w=v,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=y),E&&!f){let T=dt(c.left,0),B=dt(c.right,0),G=dt(c.top,0),te=dt(c.bottom,0);p?_=h-2*(T!==0||B!==0?T+B:dt(c.left,c.right)):w=g-2*(G!==0||te!==0?G+te:dt(c.top,c.bottom))}await a({...t,availableWidth:_,availableHeight:w});let A=await s.getDimensions(l.floating);return h!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function yp(){return typeof window<"u"}function Pi(e){return IN(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dr(e){var t;return(t=(IN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function IN(e){return yp()?e instanceof Node||e instanceof qt(e).Node:!1}function _n(e){return yp()?e instanceof Element||e instanceof qt(e).Element:!1}function Hn(e){return yp()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function DN(e){return!yp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}var tU=new Set(["inline","contents"]);function ol(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tU.has(o)}var nU=new Set(["table","td","th"]);function LN(e){return nU.has(Pi(e))}var rU=[":popover-open",":modal"];function su(e){return rU.some(t=>{try{return e.matches(t)}catch{return!1}})}var oU=["transform","translate","scale","rotate","perspective"],iU=["transform","translate","scale","rotate","perspective","filter"],sU=["paint","layout","strict","content"];function xp(e){let t=vp(),n=_n(e)?Sn(e):e;return oU.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||iU.some(r=>(n.willChange||"").includes(r))||sU.some(r=>(n.contain||"").includes(r))}function PN(e){let t=Wr(e);for(;Hn(t)&&!Bi(t);){if(xp(t))return t;if(su(t))return null;t=Wr(t)}return null}function vp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var lU=new Set(["html","body","#document"]);function Bi(e){return lU.has(Pi(e))}function Sn(e){return qt(e).getComputedStyle(e)}function lu(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wr(e){if(Pi(e)==="html")return e;let t=e.assignedSlot||e.parentNode||DN(e)&&e.host||dr(e);return DN(t)?t.host:t}function BN(e){let t=Wr(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hn(t)&&ol(t)?t:BN(t)}function bp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=BN(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=qt(o);if(i){let l=kp(s);return t.concat(s,s.visualViewport||[],ol(o)?o:[],l&&n?bp(l):[])}return t.concat(o,bp(o,[],n))}function kp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $N(e){let t=Sn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Hn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=iu(n)!==i||iu(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function HN(e){return _n(e)?e:e.contextElement}function il(e){let t=HN(e);if(!Hn(t))return Un(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$N(t),s=(i?iu(n.width):n.width)/r,l=(i?iu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var aU=Un(0);function VN(e){let t=qt(e);return!vp()||!t.visualViewport?aU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function au(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=HN(e),s=Un(1);t&&(r?_n(r)&&(s=il(r)):s=il(e));let l=uU(i,n,r)?VN(i):Un(0),a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){let f=qt(i),p=r&&_n(r)?qt(r):r,h=f,g=kp(h);for(;g&&r&&p!==h;){let b=il(g),m=g.getBoundingClientRect(),y=Sn(g),x=m.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,v=m.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,u*=b.y,c*=b.x,d*=b.y,a+=x,u+=v,h=qt(g),g=kp(h)}}return qr({width:c,height:d,x:a,y:u})}function Ep(e,t){let n=lu(e).scrollLeft;return t?t.left+n:au(dr(e)).left+n}function qN(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ep(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function cU(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=dr(r),l=t?su(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=Un(1),c=Un(0),d=Hn(r);if((d||!d&&!i)&&((Pi(r)!=="body"||ol(s))&&(a=lu(r)),Hn(r))){let p=au(r);u=il(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!i?qN(s,a):Un(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}}function dU(e){return Array.from(e.getClientRects())}function fU(e){let t=dr(e),n=lu(e),r=e.ownerDocument.body,o=dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+Ep(e),l=-n.scrollTop;return Sn(r).direction==="rtl"&&(s+=dt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}var FN=25;function pU(e,t){let n=qt(e),r=dr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;let c=vp();(!c||c&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}let u=Ep(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=FN&&(i-=h)}else u<=FN&&(i+=u);return{width:i,height:s,x:l,y:a}}var hU=new Set(["absolute","fixed"]);function mU(e,t){let n=au(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Hn(e)?il(e):Un(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function zN(e,t,n){let r;if(t==="viewport")r=pU(e,n);else if(t==="document")r=fU(dr(e));else if(_n(t))r=mU(t,n);else{let o=VN(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qr(r)}function WN(e,t){let n=Wr(e);return n===t||!_n(n)||Bi(n)?!1:Sn(n).position==="fixed"||WN(n,t)}function gU(e,t){let n=t.get(e);if(n)return n;let r=bp(e,[],!1).filter(l=>_n(l)&&Pi(l)!=="body"),o=null,i=Sn(e).position==="fixed",s=i?Wr(e):e;for(;_n(s)&&!Bi(s);){let l=Sn(s),a=xp(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&hU.has(o.position)||ol(s)&&!a&&WN(e,s))?r=r.filter(c=>c!==s):o=l,s=Wr(s)}return t.set(e,r),r}function bU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?su(t)?[]:gU(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{let d=zN(t,c,o);return u.top=dt(d.top,u.top),u.right=En(d.right,u.right),u.bottom=En(d.bottom,u.bottom),u.left=dt(d.left,u.left),u},zN(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function yU(e){let{width:t,height:n}=$N(e);return{width:t,height:n}}function xU(e,t,n){let r=Hn(t),o=dr(t),i=n==="fixed",s=au(e,!0,i,t),l={scrollLeft:0,scrollTop:0},a=Un(0);function u(){a.x=Ep(o)}if(r||!r&&!i)if((Pi(t)!=="body"||ol(o))&&(l=lu(t)),r){let p=au(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();let c=o&&!r&&!i?qN(o,l):Un(0),d=s.left+l.scrollLeft-a.x-c.x,f=s.top+l.scrollTop-a.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function Iy(e){return Sn(e).position==="static"}function UN(e,t){if(!Hn(e)||Sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dr(e)===n&&(n=n.ownerDocument.body),n}function jN(e,t){let n=qt(e);if(su(e))return n;if(!Hn(e)){let o=Wr(e);for(;o&&!Bi(o);){if(_n(o)&&!Iy(o))return o;o=Wr(o)}return n}let r=UN(e,t);for(;r&&LN(r)&&Iy(r);)r=UN(r,t);return r&&Bi(r)&&Iy(r)&&!xp(r)?n:r||PN(e)||n}var vU=async function(e){let t=this.getOffsetParent||jN,n=this.getDimensions,r=await n(e.floating);return{reference:xU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kU(e){return Sn(e).direction==="rtl"}var EU={convertOffsetParentRelativeRectToViewportRelativeRect:cU,getDocumentElement:dr,getClippingRect:bU,getOffsetParent:jN,getElementRects:vU,getClientRects:dU,getDimensions:yU,getScale:il,isElement:_n,isRTL:kU};var wp=MN,_p=SN,Sp=ON,Cp=CN,Tp=RN,Ap=TN,Np=_N,Mp=NN;var Op=(e,t,n)=>{let r=new Map,o={platform:EU,...n},i={...o.platform,_c:r};return wN(e,t,{...o,platform:i})};function wU(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-o,l=r-n,a=o,u=n;return new DOMRect(a,u,s,l)}var _U=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:i,appendTo:s,getReferencedVirtualElement:l,options:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:g}=d,{empty:b}=g,m=!h.textBetween(f,p).length&&_d(d.selection),y=this.element.contains(document.activeElement);return!(!(c.hasFocus()||y)||b||m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=s,this.scrollTarget=(u=a?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...a},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Cp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(Sp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(wp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Np(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Tp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(_p(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Ap(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Mp(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=Rd(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof z){let i=this.view.nodeDOM(t.from),s=i.dataset.nodeViewWrapper?i:i.querySelector("[data-node-view-wrapper]");s&&(i=s),i&&(o={getBoundingClientRect:()=>i.getBoundingClientRect(),getClientRects:()=>[i.getBoundingClientRect()]})}if(t instanceof me){let{$anchorCell:i,$headCell:s}=t,l=i?i.pos:s.pos,a=s?s.pos:i.pos,u=this.view.nodeDOM(l),c=this.view.nodeDOM(a);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():wU(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&Op(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),i=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,i,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:i,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Ly=e=>new V({key:typeof e.pluginKey=="string"?new Z(e.pluginKey):e.pluginKey,view:t=>new _U({view:t,...e})}),qX=re.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Ly({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Fi=H(Re(),1),KN=H(ks(),1),GN=H(de(),1);var SU=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:i}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:s,state:l})=>{let{selection:a}=l,{$anchor:u,empty:c}=a,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(s,l,a,u)=>{let{composing:c}=s;if(c||!l&&!a)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&((l=this.element.parentNode)!=null&&l.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return qg(e,{textSerializers:Nd(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Cp(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(Sp(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(wp(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Np(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Tp(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(_p(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Ap(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Mp(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(a=>a.$from.pos)),s=Math.max(...o.map(a=>a.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:i,to:s})}updatePosition(){let{selection:e}=this.editor.state,t=Rd(this.view,e.from,e.to);Op({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:i})=>{this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Py=e=>new V({key:typeof e.pluginKey=="string"?new Z(e.pluginKey):e.pluginKey,view:t=>new SU({view:t,...e})}),ZX=re.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Py({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var sl=H(Re(),1),JN=H(ks(),1),ZN=H(de(),1),YN=Fi.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:i=null,getReferencedVirtualElement:s,options:l,children:a,...u},c)=>{let d=(0,Fi.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=zd(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:i,getReferencedVirtualElement:s,options:l},g=(0,Fi.useRef)(h);return g.current=h,(0,Fi.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let m=Ly({...g.current,editor:p,element:b});p.registerPlugin(m);let y=g.current.pluginKey;return()=>{p.unregisterPlugin(y),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,KN.createPortal)((0,GN.jsx)("div",{...u,children:a}),d.current)}),oQ=sl.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:i,...s},l)=>{let a=(0,sl.useRef)(document.createElement("div"));typeof l=="function"?l(a.current):l&&(l.current=a.current);let{editor:u}=zd();return(0,sl.useEffect)(()=>{let c=a.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=Py({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,JN.createPortal)((0,ZN.jsx)("div",{...s,children:i}),a.current)});var XN=document.createElement("style");XN.textContent=`/* Floating toolbar container */ .toolbar_FloatingToolbar { display: flex; align-items: center; @@ -483,7 +483,7 @@ ${n.innerHTML} .linkButton_FloatingToolbar:active { background-color: var(--vscode-toolbar-activeBackground, #4a4a4a); } -`;document.head.appendChild(QN);var Pe={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var X=H(de()),Ly=({editor:e})=>{let[t,n]=(0,zi.useState)(!1),[r,o]=(0,zi.useState)(""),i=(0,zi.useRef)(null),{isBold:s,isItalic:l,isStrike:a,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=Xg({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,zi.useEffect)(()=>{if(t&&i.current){let b=e.getAttributes("link").href||"";o(b),i.current.focus(),i.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},m=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,X.jsx)(JN,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:g})=>!(g.selection.empty||b.isActive("codeBlock")),children:(0,X.jsx)("div",{className:Pe.toolbar,children:t?(0,X.jsxs)("form",{onSubmit:p,className:Pe.linkForm,children:[(0,X.jsx)("input",{ref:i,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Pe.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,X.jsx)("button",{type:"submit",className:Pe.linkButton,title:"Apply",children:(0,X.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,X.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,X.jsx)("button",{type:"button",onClick:m,className:Pe.linkButton,title:"Remove link",children:(0,X.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,X.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,X.jsx)("button",{type:"button",onClick:h,className:Pe.linkButton,title:"Cancel",children:(0,X.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,X.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Pe.button} ${s?Pe.active:""}`,title:"Bold (Cmd+B)",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,X.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,X.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Pe.button} ${l?Pe.active:""}`,title:"Italic (Cmd+I)",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,X.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,X.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Pe.button} ${a?Pe.active:""}`,title:"Strikethrough",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,X.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,X.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,X.jsx)("div",{className:Pe.divider}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Pe.button} ${u?Pe.active:""}`,title:"Inline Code",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,X.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Pe.button} ${c?Pe.active:""}`,title:"Link (Cmd+K)",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,X.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,X.jsx)("div",{className:Pe.divider}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Pe.button} ${d?Pe.active:""}`,title:"Code Block",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,X.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,X.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Pe.button} ${f?Pe.active:""}`,title:"Quote",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,X.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Lt=H(Re());function _U(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:l}=e,a=r&&!o,u=eS(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=o?"":u,p=a?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=l.nodeBefore)==null?void 0:t.isText)&&l.nodeBefore.text;if(!h)return null;let m=l.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let g=b.input.slice(Math.max(0,b.index-1),b.index),y=new RegExp(`^[${i?.join("")}\0]?$`).test(g);if(i!==null&&!y)return null;let x=m+b.index,v=x+b[0].length;return a&&c.test(h.slice(v-1,v+1))&&(b[0]+=" ",v+=1),x=l.pos?{range:{from:x,to:v},query:b[0].slice(n.length),text:b[0]}:null}var SU=new Z("suggestion");function CU({pluginKey:e=SU,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:l="span",decorationClass:a="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:m=_U}){let b,g=p?.(),y=()=>{let E=t.state.selection.$anchor.pos,w=t.view.coordsAtPos(E),{top:_,right:A,bottom:T,left:B}=w;try{return new DOMRect(B,_,A-B,T-_)}catch{return null}},x=(E,w)=>w?()=>{let _=e.getState(t.state),A=_?.decorationId,T=E.dom.querySelector(`[data-decoration-id="${A}"]`);return T?.getBoundingClientRect()||null}:y;function v(E,w){var _;try{let T=e.getState(E.state),B=T?.decorationId?E.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`):null,G={editor:t,range:T?.range||{from:0,to:0},query:T?.query||null,text:T?.text||null,items:[],command:te=>d({editor:t,range:T?.range||{from:0,to:0},props:te}),decorationNode:B,clientRect:x(E,B)};(_=g?.onExit)==null||_.call(g,G)}catch{}let A=E.state.tr.setMeta(w,{exit:!0});E.dispatch(A)}let k=new q({key:e,view(){return{update:async(E,w)=>{var _,A,T,B,G,te,$;let C=(_=this.key)==null?void 0:_.getState(w),S=(A=this.key)==null?void 0:A.getState(E.state),M=C.active&&S.active&&C.range.from!==S.range.from,I=!C.active&&S.active,Y=C.active&&!S.active,ie=!I&&!Y&&C.query!==S.query,pe=I||M&&ie,ge=ie||M,ft=Y||M&&ie;if(!pe&&!ge&&!ft)return;let Be=ft&&!pe?C:S,pt=E.dom.querySelector(`[data-decoration-id="${Be.decorationId}"]`);b={editor:t,range:Be.range,query:Be.query,text:Be.text,items:[],command:Yr=>d({editor:t,range:Be.range,props:Yr}),decorationNode:pt,clientRect:x(E,pt)},pe&&((T=g?.onBeforeStart)==null||T.call(g,b)),ge&&((B=g?.onBeforeUpdate)==null||B.call(g,b)),(ge||pe)&&(b.items=await f({editor:t,query:Be.query})),ft&&((G=g?.onExit)==null||G.call(g,b)),ge&&((te=g?.onUpdate)==null||te.call(g,b)),pe&&(($=g?.onStart)==null||$.call(g,b))},destroy:()=>{var E;b&&((E=g?.onExit)==null||E.call(g,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(E,w,_,A){let{isEditable:T}=t,{composing:B}=t.view,{selection:G}=E,{empty:te,from:$}=G,C={...w},S=E.getMeta(e);if(S&&S.exit)return C.active=!1,C.decorationId=null,C.range={from:0,to:0},C.query=null,C.text=null,C;if(C.composing=B,T&&(te||t.view.composing)){($w.range.to)&&!B&&!w.composing&&(C.active=!1);let M=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:G.$from}),I=`id_${Math.floor(Math.random()*4294967295)}`;M&&h({editor:t,state:A,range:M.range,isActive:w.active})?(C.active=!0,C.decorationId=w.decorationId?w.decorationId:I,C.range=M.range,C.query=M.query,C.text=M.text):C.active=!1}else C.active=!1;return C.active||(C.decorationId=null,C.range={from:0,to:0},C.query=null,C.text=null),C}},props:{handleKeyDown(E,w){var _,A,T,B;let{active:G,range:te}=k.getState(E.state);if(!G)return!1;if(w.key==="Escape"||w.key==="Esc"){let C=k.getState(E.state),S=(_=b?.decorationNode)!=null?_:null,M=S??(C?.decorationId?E.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null);if(((A=g?.onKeyDown)==null?void 0:A.call(g,{view:E,event:w,range:C.range}))||!1)return!0;let Y={editor:t,range:C.range,query:C.query,text:C.text,items:[],command:ie=>d({editor:t,range:C.range,props:ie}),decorationNode:M,clientRect:M?()=>M.getBoundingClientRect()||null:null};return(T=g?.onExit)==null||T.call(g,Y),v(E,e),!0}return((B=g?.onKeyDown)==null?void 0:B.call(g,{view:E,event:w,range:te}))||!1},decorations(E){let{active:w,range:_,decorationId:A,query:T}=k.getState(E);if(!w)return null;let B=!T?.length,G=[a];return B&&G.push(c),xe.create(E.doc,[Oe.inline(_.from,_.to,{nodeName:l,class:G.join(" "),"data-decoration-id":A,"data-decoration-content":u})])}}});return k}var eM=CU;var tM=document.createElement("style");tM.textContent=`/* Command list container */ +`;document.head.appendChild(XN);var Pe={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var X=H(de()),By=({editor:e})=>{let[t,n]=(0,zi.useState)(!1),[r,o]=(0,zi.useState)(""),i=(0,zi.useRef)(null),{isBold:s,isItalic:l,isStrike:a,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=e1({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,zi.useEffect)(()=>{if(t&&i.current){let b=e.getAttributes("link").href||"";o(b),i.current.focus(),i.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},g=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,X.jsx)(YN,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:m})=>!(m.selection.empty||b.isActive("codeBlock")),children:(0,X.jsx)("div",{className:Pe.toolbar,children:t?(0,X.jsxs)("form",{onSubmit:p,className:Pe.linkForm,children:[(0,X.jsx)("input",{ref:i,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Pe.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,X.jsx)("button",{type:"submit",className:Pe.linkButton,title:"Apply",children:(0,X.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,X.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,X.jsx)("button",{type:"button",onClick:g,className:Pe.linkButton,title:"Remove link",children:(0,X.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,X.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,X.jsx)("button",{type:"button",onClick:h,className:Pe.linkButton,title:"Cancel",children:(0,X.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,X.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Pe.button} ${s?Pe.active:""}`,title:"Bold (Cmd+B)",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,X.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,X.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Pe.button} ${l?Pe.active:""}`,title:"Italic (Cmd+I)",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,X.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,X.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Pe.button} ${a?Pe.active:""}`,title:"Strikethrough",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,X.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,X.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,X.jsx)("div",{className:Pe.divider}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Pe.button} ${u?Pe.active:""}`,title:"Inline Code",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,X.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Pe.button} ${c?Pe.active:""}`,title:"Link (Cmd+K)",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,X.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,X.jsx)("div",{className:Pe.divider}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Pe.button} ${d?Pe.active:""}`,title:"Code Block",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,X.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,X.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,X.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Pe.button} ${f?Pe.active:""}`,title:"Quote",children:(0,X.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,X.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Lt=H(Re());function CU(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:l}=e,a=r&&!o,u=nS(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=o?"":u,p=a?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=l.nodeBefore)==null?void 0:t.isText)&&l.nodeBefore.text;if(!h)return null;let g=l.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let m=b.input.slice(Math.max(0,b.index-1),b.index),y=new RegExp(`^[${i?.join("")}\0]?$`).test(m);if(i!==null&&!y)return null;let x=g+b.index,v=x+b[0].length;return a&&c.test(h.slice(v-1,v+1))&&(b[0]+=" ",v+=1),x=l.pos?{range:{from:x,to:v},query:b[0].slice(n.length),text:b[0]}:null}var TU=new Z("suggestion");function AU({pluginKey:e=TU,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:l="span",decorationClass:a="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:g=CU}){let b,m=p?.(),y=()=>{let E=t.state.selection.$anchor.pos,w=t.view.coordsAtPos(E),{top:_,right:A,bottom:T,left:B}=w;try{return new DOMRect(B,_,A-B,T-_)}catch{return null}},x=(E,w)=>w?()=>{let _=e.getState(t.state),A=_?.decorationId,T=E.dom.querySelector(`[data-decoration-id="${A}"]`);return T?.getBoundingClientRect()||null}:y;function v(E,w){var _;try{let T=e.getState(E.state),B=T?.decorationId?E.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`):null,G={editor:t,range:T?.range||{from:0,to:0},query:T?.query||null,text:T?.text||null,items:[],command:te=>d({editor:t,range:T?.range||{from:0,to:0},props:te}),decorationNode:B,clientRect:x(E,B)};(_=m?.onExit)==null||_.call(m,G)}catch{}let A=E.state.tr.setMeta(w,{exit:!0});E.dispatch(A)}let k=new V({key:e,view(){return{update:async(E,w)=>{var _,A,T,B,G,te,$;let C=(_=this.key)==null?void 0:_.getState(w),S=(A=this.key)==null?void 0:A.getState(E.state),M=C.active&&S.active&&C.range.from!==S.range.from,I=!C.active&&S.active,Y=C.active&&!S.active,ie=!I&&!Y&&C.query!==S.query,pe=I||M&&ie,ge=ie||M,ft=Y||M&&ie;if(!pe&&!ge&&!ft)return;let Be=ft&&!pe?C:S,pt=E.dom.querySelector(`[data-decoration-id="${Be.decorationId}"]`);b={editor:t,range:Be.range,query:Be.query,text:Be.text,items:[],command:Yr=>d({editor:t,range:Be.range,props:Yr}),decorationNode:pt,clientRect:x(E,pt)},pe&&((T=m?.onBeforeStart)==null||T.call(m,b)),ge&&((B=m?.onBeforeUpdate)==null||B.call(m,b)),(ge||pe)&&(b.items=await f({editor:t,query:Be.query})),ft&&((G=m?.onExit)==null||G.call(m,b)),ge&&((te=m?.onUpdate)==null||te.call(m,b)),pe&&(($=m?.onStart)==null||$.call(m,b))},destroy:()=>{var E;b&&((E=m?.onExit)==null||E.call(m,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(E,w,_,A){let{isEditable:T}=t,{composing:B}=t.view,{selection:G}=E,{empty:te,from:$}=G,C={...w},S=E.getMeta(e);if(S&&S.exit)return C.active=!1,C.decorationId=null,C.range={from:0,to:0},C.query=null,C.text=null,C;if(C.composing=B,T&&(te||t.view.composing)){($w.range.to)&&!B&&!w.composing&&(C.active=!1);let M=g({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:G.$from}),I=`id_${Math.floor(Math.random()*4294967295)}`;M&&h({editor:t,state:A,range:M.range,isActive:w.active})?(C.active=!0,C.decorationId=w.decorationId?w.decorationId:I,C.range=M.range,C.query=M.query,C.text=M.text):C.active=!1}else C.active=!1;return C.active||(C.decorationId=null,C.range={from:0,to:0},C.query=null,C.text=null),C}},props:{handleKeyDown(E,w){var _,A,T,B;let{active:G,range:te}=k.getState(E.state);if(!G)return!1;if(w.key==="Escape"||w.key==="Esc"){let C=k.getState(E.state),S=(_=b?.decorationNode)!=null?_:null,M=S??(C?.decorationId?E.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null);if(((A=m?.onKeyDown)==null?void 0:A.call(m,{view:E,event:w,range:C.range}))||!1)return!0;let Y={editor:t,range:C.range,query:C.query,text:C.text,items:[],command:ie=>d({editor:t,range:C.range,props:ie}),decorationNode:M,clientRect:M?()=>M.getBoundingClientRect()||null:null};return(T=m?.onExit)==null||T.call(m,Y),v(E,e),!0}return((B=m?.onKeyDown)==null?void 0:B.call(m,{view:E,event:w,range:te}))||!1},decorations(E){let{active:w,range:_,decorationId:A,query:T}=k.getState(E);if(!w)return null;let B=!T?.length,G=[a];return B&&G.push(c),xe.create(E.doc,[Oe.inline(_.from,_.to,{nodeName:l,class:G.join(" "),"data-decoration-id":A,"data-decoration-content":u})])}}});return k}var QN=AU;var eM=document.createElement("style");eM.textContent=`/* Command list container */ .commandList_SlashCommands { display: flex; flex-direction: column; @@ -607,7 +607,7 @@ ${n.innerHTML} -`;document.head.appendChild(tM);var fr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var V=H(de()),TU=[{title:"Heading 1",description:"Large section heading",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M4 12h8"}),(0,V.jsx)("path",{d:"M4 18V6"}),(0,V.jsx)("path",{d:"M12 18V6"}),(0,V.jsx)("path",{d:"M17 10v8"}),(0,V.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M4 12h8"}),(0,V.jsx)("path",{d:"M4 18V6"}),(0,V.jsx)("path",{d:"M12 18V6"}),(0,V.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M4 12h8"}),(0,V.jsx)("path",{d:"M4 18V6"}),(0,V.jsx)("path",{d:"M12 18V6"}),(0,V.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,V.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,V.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,V.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,V.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,V.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,V.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,V.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,V.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,V.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,V.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,V.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,V.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,V.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,V.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,V.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,V.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,V.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,V.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,V.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,V.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,V.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,V.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,V.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,V.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,V.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],nM=(0,Lt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,i]=(0,Lt.useState)(0),s=(0,Lt.useRef)(null),[l,a]=(0,Lt.useState)({top:0,left:0});(0,Lt.useEffect)(()=>{i(0)},[e]),(0,Lt.useEffect)(()=>{if(n){let c=n();c&&a({top:c.bottom+4,left:c.left})}},[n]),(0,Lt.useEffect)(()=>{let c=s.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Lt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Lt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(i(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,V.jsx)("div",{className:fr.commandList,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:(0,V.jsx)("div",{className:fr.noResults,children:"No commands found"})}):(0,V.jsx)("div",{className:fr.commandList,ref:s,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:e.map((c,d)=>(0,V.jsxs)("button",{type:"button",className:`${fr.commandItem} ${d===o?fr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>i(d),children:[(0,V.jsx)("div",{className:fr.commandIcon,children:c.icon}),(0,V.jsxs)("div",{className:fr.commandContent,children:[(0,V.jsx)("div",{className:fr.commandTitle,children:c.title}),(0,V.jsx)("div",{className:fr.commandDescription,children:c.description})]})]},c.title))})});nM.displayName="CommandList";var AU=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new Qg(nM,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},NU={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>TU.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:AU,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},Py=re.create({name:"slashCommands",addOptions(){return{suggestion:NU}},addProseMirrorPlugins(){return[eM({editor:this.editor,...this.options.suggestion})]}});var Up=H(Re());var rM=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var jr=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};jr.prototype.normal={};jr.prototype.property={};jr.prototype.space=void 0;function By(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new jr(n,r,t)}function uu(e){return e.toLowerCase()}var rt=class{constructor(t,n){this.attribute=n,this.property=t}};rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;var cu={};cl(cu,{boolean:()=>oe,booleanish:()=>He,commaOrSpaceSeparated:()=>Wt,commaSeparated:()=>$o,number:()=>O,overloadedBoolean:()=>Op,spaceSeparated:()=>ve});var MU=0,oe=Ui(),He=Ui(),Op=Ui(),O=Ui(),ve=Ui(),$o=Ui(),Wt=Ui();function Ui(){return 2**++MU}var Fy=Object.keys(cu),$i=class extends rt{constructor(t,n,r,o){let i=-1;if(super(t,n),oM(this,"space",o),typeof r=="number")for(;++i4&&n.slice(0,4)==="data"&&RU.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(lM,IU);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!lM.test(i)){let s=i.replace(OU,DU);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=$i}return new o(r,t)}function DU(e){return"-"+e.toLowerCase()}function IU(e){return e.charAt(1).toUpperCase()}var aM=By([zy,iM,Uy,$y,Hy],"html"),Ip=By([zy,sM,Uy,$y,Hy],"svg");var uM={}.hasOwnProperty;function cM(e,t){let n=t||{};function r(o,...i){let s=r.invalid,l=r.handlers;if(o&&uM.call(o,e)){let a=String(o[e]);s=uM.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var LU=/["&'<>`]/g,PU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BU=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,FU=/[|\\{}()[\]^$+*?.]/g,dM=new WeakMap;function fM(e,t){if(e=e.replace(t.subset?zU(t.subset):LU,r),t.subset||t.escapeOnly)return e;return e.replace(PU,n).replace(BU,r);function n(o,i,s){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(o,i,s){return t.format(o.charCodeAt(0),s.charCodeAt(i+1),t)}}function zU(e){let t=dM.get(e);return t||(t=UU(e),dM.set(e,t)),t}function UU(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var gM=["cent","copy","divide","gt","lt","not","para","times"];var bM={}.hasOwnProperty,Vy={},Pp;for(Pp in Lp)bM.call(Lp,Pp)&&(Vy[Lp[Pp]]=Pp);var qU=/[^\dA-Za-z]/;function yM(e,t,n,r){let o=String.fromCharCode(e);if(bM.call(Vy,o)){let i=Vy[o],s="&"+i;return n&&mM.includes(i)&&!gM.includes(i)&&(!r||t&&t!==61&&qU.test(String.fromCharCode(t)))?s:s+";"}return""}function xM(e,t,n){let r=pM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=yM(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i=hM(e,t,n.omitOptionalSemicolons);i.length|^->||--!>|"],jU=["<",">"];function vM(e,t,n,r){return r.settings.bogusComments?"":"";function o(i){return Kr(i,Object.assign({},r.settings.characterReferences,{subset:jU}))}}function kM(e,t,n,r){return""}function Wy(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function EM(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function wM(e){return e.join(" ").trim()}var KU=/[ \t\n\f\r]/g;function Hi(e){return typeof e=="object"?e.type==="text"?_M(e.value):!1:_M(e)}function _M(e){return e.replace(KU,"")===""}var Ve=SM(1),jy=SM(-1),GU=[];function SM(e){return t;function t(n,r,o){let i=n?n.children:GU,s=(r||0)+e,l=i[s];if(!o)for(;l&&Hi(l);)s+=e,l=i[s];return l}}var YU={}.hasOwnProperty;function Bp(e){return t;function t(n,r,o){return YU.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var du=Bp({body:ZU,caption:Ky,colgroup:Ky,dd:t$,dt:e$,head:Ky,html:JU,li:QU,optgroup:n$,option:r$,p:XU,rp:CM,rt:CM,tbody:i$,td:TM,tfoot:s$,th:TM,thead:o$,tr:l$});function Ky(e,t,n){let r=Ve(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Hi(r.value.charAt(0)))}function JU(e,t,n){let r=Ve(n,t);return!r||r.type!=="comment"}function ZU(e,t,n){let r=Ve(n,t);return!r||r.type!=="comment"}function XU(e,t,n){let r=Ve(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function QU(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&r.tagName==="li"}function e$(e,t,n){let r=Ve(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function t$(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function CM(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function n$(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function r$(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function o$(e,t,n){let r=Ve(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function i$(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function s$(e,t,n){return!Ve(n,t)}function l$(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function TM(e,t,n){let r=Ve(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var AM=Bp({body:c$,colgroup:d$,head:u$,html:a$,tbody:f$});function a$(e){let t=Ve(e,-1);return!t||t.type!=="comment"}function u$(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function c$(e){let t=Ve(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Hi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function d$(e,t,n){let r=jy(n,t),o=Ve(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&du(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function f$(e,t,n){let r=jy(n,t),o=Ve(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&du(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var Fp={name:[[` +`;document.head.appendChild(eM);var fr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var q=H(de()),NU=[{title:"Heading 1",description:"Large section heading",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M4 12h8"}),(0,q.jsx)("path",{d:"M4 18V6"}),(0,q.jsx)("path",{d:"M12 18V6"}),(0,q.jsx)("path",{d:"M17 10v8"}),(0,q.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M4 12h8"}),(0,q.jsx)("path",{d:"M4 18V6"}),(0,q.jsx)("path",{d:"M12 18V6"}),(0,q.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M4 12h8"}),(0,q.jsx)("path",{d:"M4 18V6"}),(0,q.jsx)("path",{d:"M12 18V6"}),(0,q.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,q.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,q.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,q.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,q.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,q.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,q.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,q.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,q.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,q.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,q.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,q.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,q.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,q.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,q.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,q.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,q.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,q.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,q.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,q.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,q.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,q.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,q.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,q.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,q.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],tM=(0,Lt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,i]=(0,Lt.useState)(0),s=(0,Lt.useRef)(null),[l,a]=(0,Lt.useState)({top:0,left:0});(0,Lt.useEffect)(()=>{i(0)},[e]),(0,Lt.useEffect)(()=>{if(n){let c=n();c&&a({top:c.bottom+4,left:c.left})}},[n]),(0,Lt.useEffect)(()=>{let c=s.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Lt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Lt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(i(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,q.jsx)("div",{className:fr.commandList,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:(0,q.jsx)("div",{className:fr.noResults,children:"No commands found"})}):(0,q.jsx)("div",{className:fr.commandList,ref:s,style:{position:"fixed",top:`${l.top}px`,left:`${l.left}px`},children:e.map((c,d)=>(0,q.jsxs)("button",{type:"button",className:`${fr.commandItem} ${d===o?fr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>i(d),children:[(0,q.jsx)("div",{className:fr.commandIcon,children:c.icon}),(0,q.jsxs)("div",{className:fr.commandContent,children:[(0,q.jsx)("div",{className:fr.commandTitle,children:c.title}),(0,q.jsx)("div",{className:fr.commandDescription,children:c.description})]})]},c.title))})});tM.displayName="CommandList";var MU=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new t1(tM,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},OU={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>NU.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:MU,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},Fy=re.create({name:"slashCommands",addOptions(){return{suggestion:OU}},addProseMirrorPlugins(){return[QN({editor:this.editor,...this.options.suggestion})]}});var $p=H(Re());var nM=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var jr=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};jr.prototype.normal={};jr.prototype.property={};jr.prototype.space=void 0;function zy(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new jr(n,r,t)}function uu(e){return e.toLowerCase()}var rt=class{constructor(t,n){this.attribute=n,this.property=t}};rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;var cu={};cl(cu,{boolean:()=>oe,booleanish:()=>He,commaOrSpaceSeparated:()=>Wt,commaSeparated:()=>$o,number:()=>O,overloadedBoolean:()=>Rp,spaceSeparated:()=>ve});var RU=0,oe=Ui(),He=Ui(),Rp=Ui(),O=Ui(),ve=Ui(),$o=Ui(),Wt=Ui();function Ui(){return 2**++RU}var Uy=Object.keys(cu),$i=class extends rt{constructor(t,n,r,o){let i=-1;if(super(t,n),rM(this,"space",o),typeof r=="number")for(;++i4&&n.slice(0,4)==="data"&&IU.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(sM,PU);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!sM.test(i)){let s=i.replace(DU,LU);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=$i}return new o(r,t)}function LU(e){return"-"+e.toLowerCase()}function PU(e){return e.charAt(1).toUpperCase()}var lM=zy([$y,oM,Hy,Vy,qy],"html"),Lp=zy([$y,iM,Hy,Vy,qy],"svg");var aM={}.hasOwnProperty;function uM(e,t){let n=t||{};function r(o,...i){let s=r.invalid,l=r.handlers;if(o&&aM.call(o,e)){let a=String(o[e]);s=aM.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var BU=/["&'<>`]/g,FU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,zU=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,UU=/[|\\{}()[\]^$+*?.]/g,cM=new WeakMap;function dM(e,t){if(e=e.replace(t.subset?$U(t.subset):BU,r),t.subset||t.escapeOnly)return e;return e.replace(FU,n).replace(zU,r);function n(o,i,s){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(o,i,s){return t.format(o.charCodeAt(0),s.charCodeAt(i+1),t)}}function $U(e){let t=cM.get(e);return t||(t=HU(e),cM.set(e,t)),t}function HU(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var mM=["cent","copy","divide","gt","lt","not","para","times"];var gM={}.hasOwnProperty,jy={},Bp;for(Bp in Pp)gM.call(Pp,Bp)&&(jy[Pp[Bp]]=Bp);var WU=/[^\dA-Za-z]/;function bM(e,t,n,r){let o=String.fromCharCode(e);if(gM.call(jy,o)){let i=jy[o],s="&"+i;return n&&hM.includes(i)&&!mM.includes(i)&&(!r||t&&t!==61&&WU.test(String.fromCharCode(t)))?s:s+";"}return""}function yM(e,t,n){let r=fM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=bM(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i=pM(e,t,n.omitOptionalSemicolons);i.length|^->||--!>|"],GU=["<",">"];function xM(e,t,n,r){return r.settings.bogusComments?"":"";function o(i){return Kr(i,Object.assign({},r.settings.characterReferences,{subset:GU}))}}function vM(e,t,n,r){return""}function Ky(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function kM(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function EM(e){return e.join(" ").trim()}var YU=/[ \t\n\f\r]/g;function Hi(e){return typeof e=="object"?e.type==="text"?wM(e.value):!1:wM(e)}function wM(e){return e.replace(YU,"")===""}var qe=_M(1),Gy=_M(-1),JU=[];function _M(e){return t;function t(n,r,o){let i=n?n.children:JU,s=(r||0)+e,l=i[s];if(!o)for(;l&&Hi(l);)s+=e,l=i[s];return l}}var ZU={}.hasOwnProperty;function Fp(e){return t;function t(n,r,o){return ZU.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var du=Fp({body:QU,caption:Yy,colgroup:Yy,dd:r$,dt:n$,head:Yy,html:XU,li:t$,optgroup:o$,option:i$,p:e$,rp:SM,rt:SM,tbody:l$,td:CM,tfoot:a$,th:CM,thead:s$,tr:u$});function Yy(e,t,n){let r=qe(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Hi(r.value.charAt(0)))}function XU(e,t,n){let r=qe(n,t);return!r||r.type!=="comment"}function QU(e,t,n){let r=qe(n,t);return!r||r.type!=="comment"}function e$(e,t,n){let r=qe(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function t$(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&r.tagName==="li"}function n$(e,t,n){let r=qe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function r$(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function SM(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function o$(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function i$(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function s$(e,t,n){let r=qe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function l$(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function a$(e,t,n){return!qe(n,t)}function u$(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function CM(e,t,n){let r=qe(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var TM=Fp({body:f$,colgroup:p$,head:d$,html:c$,tbody:h$});function c$(e){let t=qe(e,-1);return!t||t.type!=="comment"}function d$(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function f$(e){let t=qe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Hi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function p$(e,t,n){let r=Gy(n,t),o=qe(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&du(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function h$(e,t,n){let r=Gy(n,t),o=qe(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&du(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var zp={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -615,7 +615,7 @@ ${n.innerHTML} \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function NM(e,t,n,r){let o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags,s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[],a;o.space==="html"&&e.tagName==="svg"&&(r.schema=Ip);let u=p$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(s=!1),(u||!i||!AM(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(c),!s&&(!i||!du(e,t,n))&&l.push(""),l.join("")}function p$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let i=h$(e,o,t[o]);i&&n.push(i)}}for(;++rWy(n,e.alternative)&&(s=e.alternative),l=s+Kr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Fp.single:Fp.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}var m$=["<","&"];function zp(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Kr(e.value,Object.assign({},r.settings.characterReferences,{subset:m$}))}function MM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:zp(e,t,n,r)}function OM(e,t,n,r){return r.all(e)}var RM=cM("type",{invalid:g$,unknown:b$,handlers:{comment:vM,doctype:kM,element:NM,raw:MM,root:OM,text:zp}});function g$(e){throw new Error("Expected node, not `"+e+"`")}function b$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var y$={},x$={},v$=[];function Gy(e,t){let n=t||y$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:k$,all:E$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||rM,characterReferences:n.characterReferences||x$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Ip:aM,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function k$(e,t,n){return RM(e,t,n,this)}function E$(e){let t=[],n=e&&e.children||v$,r=-1;for(;++r\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function AM(e,t,n,r){let o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags,s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[],a;o.space==="html"&&e.tagName==="svg"&&(r.schema=Lp);let u=m$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(s=!1),(u||!i||!TM(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(c),!s&&(!i||!du(e,t,n))&&l.push(""),l.join("")}function m$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let i=g$(e,o,t[o]);i&&n.push(i)}}for(;++rKy(n,e.alternative)&&(s=e.alternative),l=s+Kr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?zp.single:zp.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}var b$=["<","&"];function Up(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Kr(e.value,Object.assign({},r.settings.characterReferences,{subset:b$}))}function NM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Up(e,t,n,r)}function MM(e,t,n,r){return r.all(e)}var OM=uM("type",{invalid:y$,unknown:x$,handlers:{comment:xM,doctype:vM,element:AM,raw:NM,root:MM,text:Up}});function y$(e){throw new Error("Expected node, not `"+e+"`")}function x$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var v$={},k$={},E$=[];function Jy(e,t){let n=t||v$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:w$,all:_$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||nM,characterReferences:n.characterReferences||k$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Lp:lM,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function w$(e,t,n){return OM(e,t,n,this)}function _$(e){let t=[],n=e&&e.children||E$,r=-1;for(;++r{let n=e.attrs.language||"text",r=e.textContent,o=(0,Up.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let s=_$[n.toLowerCase()]||n.toLowerCase();if(!IM.registered(s))return r.replace(//g,">");let l=IM.highlight(s,r);return Gy(l)}catch{return r.replace(//g,">")}},[r,n]),i=(0,Up.useCallback)(s=>{t({language:s.target.value})},[t]);return(0,Tn.jsxs)(LS,{className:Ho.codeBlockWrapper,children:[(0,Tn.jsx)("div",{className:Ho.codeBlockHeader,contentEditable:!1,children:(0,Tn.jsx)("select",{value:n,onChange:i,className:Ho.languageSelect,children:w$.map(s=>(0,Tn.jsx)("option",{value:s.value,children:s.label},s.value))})}),(0,Tn.jsxs)("div",{className:Ho.codeBlockContainer,children:[(0,Tn.jsx)("pre",{className:Ho.codeBlockBackdrop,"aria-hidden":"true",children:(0,Tn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,Tn.jsx)("pre",{className:Ho.codeBlockPre,children:(0,Tn.jsx)("code",{className:Ho.codeBlockCode,children:(0,Tn.jsx)(RS,{})})})]})]})};var PM=document.createElement("style");PM.textContent=`/* Container */ +`;document.head.appendChild(RM);var Ho={codeBlockWrapper:"codeBlockWrapper_CodeBlockComponent",codeBlockHeader:"codeBlockHeader_CodeBlockComponent",languageSelect:"languageSelect_CodeBlockComponent",w3:"w3_CodeBlockComponent",org:"org_CodeBlockComponent",codeBlockContainer:"codeBlockContainer_CodeBlockComponent",codeBlockBackdrop:"codeBlockBackdrop_CodeBlockComponent",codeBlockPre:"codeBlockPre_CodeBlockComponent",codeBlockCode:"codeBlockCode_CodeBlockComponent"};var Tn=H(de()),DM=Ya(Ga),S$=[{value:"text",label:"Plain Text"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"jsx",label:"JSX"},{value:"tsx",label:"TSX"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"c",label:"C"},{value:"cpp",label:"C++"},{value:"csharp",label:"C#"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"ruby",label:"Ruby"},{value:"php",label:"PHP"},{value:"swift",label:"Swift"},{value:"kotlin",label:"Kotlin"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"scss",label:"SCSS"},{value:"json",label:"JSON"},{value:"yaml",label:"YAML"},{value:"xml",label:"XML"},{value:"markdown",label:"Markdown"},{value:"sql",label:"SQL"},{value:"graphql",label:"GraphQL"},{value:"bash",label:"Bash"},{value:"shell",label:"Shell"},{value:"powershell",label:"PowerShell"},{value:"dockerfile",label:"Dockerfile"}],C$={js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",py:"python",rb:"ruby",sh:"bash",shell:"bash",yml:"yaml",md:"markdown","c++":"cpp","c#":"csharp"},IM=({node:e,updateAttributes:t})=>{let n=e.attrs.language||"text",r=e.textContent,o=(0,$p.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let s=C$[n.toLowerCase()]||n.toLowerCase();if(!DM.registered(s))return r.replace(//g,">");let l=DM.highlight(s,r);return Jy(l)}catch{return r.replace(//g,">")}},[r,n]),i=(0,$p.useCallback)(s=>{t({language:s.target.value})},[t]);return(0,Tn.jsxs)(IS,{className:Ho.codeBlockWrapper,children:[(0,Tn.jsx)("div",{className:Ho.codeBlockHeader,contentEditable:!1,children:(0,Tn.jsx)("select",{value:n,onChange:i,className:Ho.languageSelect,children:S$.map(s=>(0,Tn.jsx)("option",{value:s.value,children:s.label},s.value))})}),(0,Tn.jsxs)("div",{className:Ho.codeBlockContainer,children:[(0,Tn.jsx)("pre",{className:Ho.codeBlockBackdrop,"aria-hidden":"true",children:(0,Tn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,Tn.jsx)("pre",{className:Ho.codeBlockPre,children:(0,Tn.jsx)("code",{className:Ho.codeBlockCode,children:(0,Tn.jsx)(OS,{})})})]})]})};var LM=document.createElement("style");LM.textContent=`/* Container */ .container_MarkdownEditor { position: relative; border: 1px solid var(--vscode-input-border, #3c3c3c); @@ -1010,7 +1010,7 @@ ${n.innerHTML} -`;document.head.appendChild(PM);var pr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var Gr=H(de()),S$=Ya(Ga),$p=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:i=!1})=>{let s=(0,ll.useRef)(!1),l=(0,ll.useRef)(e),a=CS({extensions:[zC.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),qT.extend({addNodeView(){return US(LM)}}).configure({lowlight:S$,defaultLanguage:"text"}),dC.configure({openOnClick:!1,HTMLAttributes:{class:pr.link}}),UC.configure({placeholder:n,emptyEditorClass:pr.isEmpty}),$C,HC.configure({nested:!0}),nb.configure({resizable:!1}),tb,Q1,eb,mN.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),Py],content:e,editable:!i,autofocus:o?"end":!1,editorProps:{attributes:{class:pr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(s.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";l.current=d,t(d)}});return(0,ll.useEffect)(()=>{a&&e!==l.current&&(s.current=!0,a.commands.setContent(e),l.current=e,setTimeout(()=>{s.current=!1},0))},[a,e]),(0,ll.useEffect)(()=>{a&&a.setEditable(!i)},[a,i]),a?(0,Gr.jsxs)("div",{className:`${pr.container} ${i?pr.disabled:""}`,children:[(0,Gr.jsx)(Ly,{editor:a}),(0,Gr.jsx)(ES,{editor:a,className:pr.editorContent}),(0,Gr.jsxs)("div",{className:pr.hint,children:["Type ",(0,Gr.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,Gr.jsx)("div",{className:pr.container,style:{minHeight:r},children:(0,Gr.jsx)("div",{className:pr.loading,children:"Loading editor..."})})};var BM=document.createElement("style");BM.textContent=`.form_TicketForm { +`;document.head.appendChild(LM);var pr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var Gr=H(de()),T$=Ya(Ga),Hp=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:i=!1})=>{let s=(0,ll.useRef)(!1),l=(0,ll.useRef)(e),a=SS({extensions:[FC.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),HT.extend({addNodeView(){return zS(IM)}}).configure({lowlight:T$,defaultLanguage:"text"}),cC.configure({openOnClick:!1,HTMLAttributes:{class:pr.link}}),zC.configure({placeholder:n,emptyEditorClass:pr.isEmpty}),UC,$C.configure({nested:!0}),ob.configure({resizable:!1}),rb,tb,nb,hN.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),Fy],content:e,editable:!i,autofocus:o?"end":!1,editorProps:{attributes:{class:pr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(s.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";l.current=d,t(d)}});return(0,ll.useEffect)(()=>{a&&e!==l.current&&(s.current=!0,a.commands.setContent(e),l.current=e,setTimeout(()=>{s.current=!1},0))},[a,e]),(0,ll.useEffect)(()=>{a&&a.setEditable(!i)},[a,i]),a?(0,Gr.jsxs)("div",{className:`${pr.container} ${i?pr.disabled:""}`,children:[(0,Gr.jsx)(By,{editor:a}),(0,Gr.jsx)(kS,{editor:a,className:pr.editorContent}),(0,Gr.jsxs)("div",{className:pr.hint,children:["Type ",(0,Gr.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,Gr.jsx)("div",{className:pr.container,style:{minHeight:r},children:(0,Gr.jsx)("div",{className:pr.loading,children:"Loading editor..."})})};var PM=document.createElement("style");PM.textContent=`.form_TicketForm { display: flex; flex-direction: column; gap: 20px; @@ -1090,7 +1090,7 @@ ${n.innerHTML} gap: 12px; } -`;document.head.appendChild(BM);var ke={form:"form_TicketForm",field:"field_TicketForm",label:"label_TicketForm",required:"required_TicketForm",templateInfo:"templateInfo_TicketForm",templateDescription:"templateDescription_TicketForm",labelsContainer:"labelsContainer_TicketForm",labelTag:"labelTag_TicketForm",labelTagSelected:"labelTagSelected_TicketForm",labelDot:"labelDot_TicketForm",actions:"actions_TicketForm"};var J=H(de()),FM=({teams:e,templates:t,workflowStates:n,labels:r,projects:o,users:i,onTeamChange:s,onSubmit:l,isSubmitting:a,draftData:u})=>{let[c,d]=(0,jt.useState)(""),[f,p]=(0,jt.useState)(""),[h,m]=(0,jt.useState)(""),[b,g]=(0,jt.useState)(""),[y,x]=(0,jt.useState)(void 0),[v,k]=(0,jt.useState)(void 0),[E,w]=(0,jt.useState)(void 0),[_,A]=(0,jt.useState)([]),[T,B]=(0,jt.useState)(void 0);(0,jt.useEffect)(()=>{if(u){if(u.title&&m(u.title),u.description&&g(u.description),u.priority){let S={urgent:1,high:2,medium:3,low:4,1:1,2:2,3:3,4:4}[u.priority.toLowerCase()];S&&x(S)}if(u.teamId&&(d(u.teamId),s(u.teamId)),u.labels&&r.length>0){let C=r.filter(S=>u.labels?.some(M=>S.name.toLowerCase()===M.toLowerCase())).map(S=>S.id);C.length>0&&A(C)}}},[u]),(0,jt.useEffect)(()=>{if(e.length===1&&!c){let C=e[0].id;d(C),s(C)}},[e]),(0,jt.useEffect)(()=>{if(f){let C=t.find(S=>S.id===f);if(C?.templateData){let S=C.templateData;S.title&&m(S.title),S.description&&g(S.description),S.priority!==void 0&&x(S.priority),S.labelIds&&A(S.labelIds),S.projectId&&w(S.projectId),S.stateId&&B(S.stateId)}}},[f,t]);let G=C=>{let S=C.target.value;d(S),p(""),s(S)},te=C=>{C.preventDefault(),!(!c||!h.trim())&&l({teamId:c,title:h.trim(),description:b.trim()||void 0,priority:y,assigneeId:v,projectId:E,labelIds:_.length>0?_:void 0,stateId:T})},$=C=>{A(S=>S.includes(C)?S.filter(M=>M!==C):[...S,C])};return(0,J.jsxs)("form",{onSubmit:te,className:ke.form,children:[(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsxs)("label",{className:ke.label,children:["Team ",(0,J.jsx)("span",{className:ke.required,children:"*"})]}),(0,J.jsxs)(xo,{value:c,onChange:G,disabled:e.length===0,children:[(0,J.jsx)("option",{value:"",children:"Select a team..."}),e.map(C=>(0,J.jsxs)("option",{value:C.id,children:[C.name," (",C.key,")"]},C.id))]})]}),c&&t.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Template (Optional)"}),(0,J.jsxs)(xo,{value:f,onChange:C=>p(C.target.value),children:[(0,J.jsx)("option",{value:"",children:"No template"}),t.map(C=>(0,J.jsx)("option",{value:C.id,children:C.name},C.id))]}),f&&(0,J.jsx)("div",{className:ke.templateInfo,children:t.find(C=>C.id===f)?.description&&(0,J.jsx)("p",{className:ke.templateDescription,children:t.find(C=>C.id===f)?.description})})]}),c&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsxs)("label",{className:ke.label,children:["Title ",(0,J.jsx)("span",{className:ke.required,children:"*"})]}),(0,J.jsx)(m0,{value:h,onChange:C=>m(C.target.value),placeholder:"Enter ticket title...",required:!0})]}),(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Description"}),(0,J.jsx)($p,{value:b,onChange:g,placeholder:"Add a description... (supports Markdown)",minHeight:150})]}),(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Priority"}),(0,J.jsxs)(xo,{value:y?.toString()||"",onChange:C=>x(C.target.value?parseInt(C.target.value,10):void 0),children:[(0,J.jsx)("option",{value:"",children:"No Priority"}),(0,J.jsx)("option",{value:"1",children:"\u{1F534} Urgent"}),(0,J.jsx)("option",{value:"2",children:"\u{1F7E0} High"}),(0,J.jsx)("option",{value:"3",children:"\u{1F7E1} Medium"}),(0,J.jsx)("option",{value:"4",children:"\u{1F7E2} Low"})]})]}),n.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Status"}),(0,J.jsxs)(xo,{value:T||"",onChange:C=>B(C.target.value||void 0),children:[(0,J.jsx)("option",{value:"",children:"Default status"}),n.map(C=>(0,J.jsx)("option",{value:C.id,children:C.name},C.id))]})]}),i.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Assignee"}),(0,J.jsxs)(xo,{value:v||"",onChange:C=>k(C.target.value||void 0),children:[(0,J.jsx)("option",{value:"",children:"Unassigned"}),i.map(C=>(0,J.jsxs)("option",{value:C.id,children:[C.name," (",C.email,")"]},C.id))]})]}),o.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Project"}),(0,J.jsxs)(xo,{value:E||"",onChange:C=>w(C.target.value||void 0),children:[(0,J.jsx)("option",{value:"",children:"No project"}),o.map(C=>(0,J.jsx)("option",{value:C.id,children:C.name},C.id))]})]}),r.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Labels"}),(0,J.jsx)("div",{className:ke.labelsContainer,children:r.map(C=>(0,J.jsxs)("button",{type:"button",className:`${ke.labelTag} ${_.includes(C.id)?ke.labelTagSelected:""}`,onClick:()=>$(C.id),style:{borderColor:_.includes(C.id)?C.color:"transparent"},children:[(0,J.jsx)("span",{className:ke.labelDot,style:{backgroundColor:C.color}}),C.name]},C.id))})]}),(0,J.jsx)("div",{className:ke.actions,children:(0,J.jsx)(h0,{type:"submit",disabled:a||!h.trim(),children:a?"Creating...":"Create Ticket"})})]})]})};var zM=document.createElement("style");zM.textContent=`.container_App { +`;document.head.appendChild(PM);var ke={form:"form_TicketForm",field:"field_TicketForm",label:"label_TicketForm",required:"required_TicketForm",templateInfo:"templateInfo_TicketForm",templateDescription:"templateDescription_TicketForm",labelsContainer:"labelsContainer_TicketForm",labelTag:"labelTag_TicketForm",labelTagSelected:"labelTagSelected_TicketForm",labelDot:"labelDot_TicketForm",actions:"actions_TicketForm"};var J=H(de()),BM=({teams:e,templates:t,workflowStates:n,labels:r,projects:o,users:i,onTeamChange:s,onSubmit:l,isSubmitting:a,draftData:u})=>{let[c,d]=(0,jt.useState)(""),[f,p]=(0,jt.useState)(""),[h,g]=(0,jt.useState)(""),[b,m]=(0,jt.useState)(""),[y,x]=(0,jt.useState)(void 0),[v,k]=(0,jt.useState)(void 0),[E,w]=(0,jt.useState)(void 0),[_,A]=(0,jt.useState)([]),[T,B]=(0,jt.useState)(void 0);(0,jt.useEffect)(()=>{if(u){if(u.title&&g(u.title),u.description&&m(u.description),u.priority){let S={urgent:1,high:2,medium:3,low:4,1:1,2:2,3:3,4:4}[u.priority.toLowerCase()];S&&x(S)}if(u.teamId&&(d(u.teamId),s(u.teamId)),u.labels&&r.length>0){let C=r.filter(S=>u.labels?.some(M=>S.name.toLowerCase()===M.toLowerCase())).map(S=>S.id);C.length>0&&A(C)}}},[u]),(0,jt.useEffect)(()=>{if(e.length===1&&!c){let C=e[0].id;d(C),s(C)}},[e]),(0,jt.useEffect)(()=>{if(f){let C=t.find(S=>S.id===f);if(C?.templateData){let S=C.templateData;S.title&&g(S.title),S.description&&m(S.description),S.priority!==void 0&&x(S.priority),S.labelIds&&A(S.labelIds),S.projectId&&w(S.projectId),S.stateId&&B(S.stateId)}}},[f,t]);let G=C=>{let S=C.target.value;d(S),p(""),s(S)},te=C=>{C.preventDefault(),!(!c||!h.trim())&&l({teamId:c,title:h.trim(),description:b.trim()||void 0,priority:y,assigneeId:v,projectId:E,labelIds:_.length>0?_:void 0,stateId:T})},$=C=>{A(S=>S.includes(C)?S.filter(M=>M!==C):[...S,C])};return(0,J.jsxs)("form",{onSubmit:te,className:ke.form,children:[(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsxs)("label",{className:ke.label,children:["Team ",(0,J.jsx)("span",{className:ke.required,children:"*"})]}),(0,J.jsxs)(xo,{value:c,onChange:G,disabled:e.length===0,children:[(0,J.jsx)("option",{value:"",children:"Select a team..."}),e.map(C=>(0,J.jsxs)("option",{value:C.id,children:[C.name," (",C.key,")"]},C.id))]})]}),c&&t.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Template (Optional)"}),(0,J.jsxs)(xo,{value:f,onChange:C=>p(C.target.value),children:[(0,J.jsx)("option",{value:"",children:"No template"}),t.map(C=>(0,J.jsx)("option",{value:C.id,children:C.name},C.id))]}),f&&(0,J.jsx)("div",{className:ke.templateInfo,children:t.find(C=>C.id===f)?.description&&(0,J.jsx)("p",{className:ke.templateDescription,children:t.find(C=>C.id===f)?.description})})]}),c&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsxs)("label",{className:ke.label,children:["Title ",(0,J.jsx)("span",{className:ke.required,children:"*"})]}),(0,J.jsx)(g0,{value:h,onChange:C=>g(C.target.value),placeholder:"Enter ticket title...",required:!0})]}),(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Description"}),(0,J.jsx)(Hp,{value:b,onChange:m,placeholder:"Add a description... (supports Markdown)",minHeight:150})]}),(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Priority"}),(0,J.jsxs)(xo,{value:y?.toString()||"",onChange:C=>x(C.target.value?parseInt(C.target.value,10):void 0),children:[(0,J.jsx)("option",{value:"",children:"No Priority"}),(0,J.jsx)("option",{value:"1",children:"\u25CF Urgent"}),(0,J.jsx)("option",{value:"2",children:"\u25CF High"}),(0,J.jsx)("option",{value:"3",children:"\u25CF Medium"}),(0,J.jsx)("option",{value:"4",children:"\u25CF Low"})]})]}),n.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Status"}),(0,J.jsxs)(xo,{value:T||"",onChange:C=>B(C.target.value||void 0),children:[(0,J.jsx)("option",{value:"",children:"Default status"}),n.map(C=>(0,J.jsx)("option",{value:C.id,children:C.name},C.id))]})]}),i.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Assignee"}),(0,J.jsxs)(xo,{value:v||"",onChange:C=>k(C.target.value||void 0),children:[(0,J.jsx)("option",{value:"",children:"Unassigned"}),i.map(C=>(0,J.jsxs)("option",{value:C.id,children:[C.name," (",C.email,")"]},C.id))]})]}),o.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Project"}),(0,J.jsxs)(xo,{value:E||"",onChange:C=>w(C.target.value||void 0),children:[(0,J.jsx)("option",{value:"",children:"No project"}),o.map(C=>(0,J.jsx)("option",{value:C.id,children:C.name},C.id))]})]}),r.length>0&&(0,J.jsxs)("div",{className:ke.field,children:[(0,J.jsx)("label",{className:ke.label,children:"Labels"}),(0,J.jsx)("div",{className:ke.labelsContainer,children:r.map(C=>(0,J.jsxs)("button",{type:"button",className:`${ke.labelTag} ${_.includes(C.id)?ke.labelTagSelected:""}`,onClick:()=>$(C.id),style:{borderColor:_.includes(C.id)?C.color:"transparent"},children:[(0,J.jsx)("span",{className:ke.labelDot,style:{backgroundColor:C.color}}),C.name]},C.id))})]}),(0,J.jsx)("div",{className:ke.actions,children:(0,J.jsx)(m0,{type:"submit",disabled:a||!h.trim(),children:a?"Creating...":"Create Ticket"})})]})]})};var FM=document.createElement("style");FM.textContent=`.container_App { padding: 20px; max-width: 800px; margin: 0 auto; @@ -1109,7 +1109,7 @@ ${n.innerHTML} color: var(--vscode-foreground); } -`;document.head.appendChild(zM);var Yy={container:"container_App",header:"header_App"};var al=H(de());function C$(){let{postMessage:e,onMessage:t}=ME(),[n,r]=(0,An.useState)([]),[o,i]=(0,An.useState)([]),[s,l]=(0,An.useState)([]),[a,u]=(0,An.useState)([]),[c,d]=(0,An.useState)([]),[f,p]=(0,An.useState)([]),[h,m]=(0,An.useState)(!1),[b,g]=(0,An.useState)(void 0);(0,An.useEffect)(()=>{e({command:"loadTeams"})},[]),(0,An.useEffect)(()=>t(v=>{switch(v.command){case"teamsLoaded":r(v.teams||[]);break;case"templatesLoaded":i(v.templates||[]);break;case"teamDataLoaded":l(v.workflowStates||[]),u(v.labels||[]),d(v.projects||[]);break;case"usersLoaded":p(v.users||[]);break;case"issueCreated":m(!1);break;case"issueCreationFailed":m(!1);break;case"populateDraft":v.data&&g(v.data);break}}),[t]);let y=v=>{e({command:"loadTemplates",teamId:v}),e({command:"loadTeamData",teamId:v}),e({command:"loadUsers",teamId:v})},x=v=>{m(!0),e({command:"createIssue",input:v})};return(0,al.jsxs)("div",{className:Yy.container,children:[(0,al.jsx)("div",{className:Yy.header,children:(0,al.jsx)("h1",{children:"Create New Ticket"})}),(0,al.jsx)(FM,{teams:n,templates:o,workflowStates:s,labels:a,projects:c,users:f,onTeamChange:y,onSubmit:x,isSubmitting:h,draftData:b})]})}var UM=C$;var qM=H(de()),$M=document.getElementById("root");$M&&(0,HM.createRoot)($M).render((0,qM.jsx)(UM,{}));})(); +`;document.head.appendChild(FM);var Zy={container:"container_App",header:"header_App"};var al=H(de());function A$(){let{postMessage:e,onMessage:t}=RE(),[n,r]=(0,An.useState)([]),[o,i]=(0,An.useState)([]),[s,l]=(0,An.useState)([]),[a,u]=(0,An.useState)([]),[c,d]=(0,An.useState)([]),[f,p]=(0,An.useState)([]),[h,g]=(0,An.useState)(!1),[b,m]=(0,An.useState)(void 0);(0,An.useEffect)(()=>{e({command:"loadTeams"})},[]),(0,An.useEffect)(()=>t(v=>{switch(v.command){case"teamsLoaded":r(v.teams||[]);break;case"templatesLoaded":i(v.templates||[]);break;case"teamDataLoaded":l(v.workflowStates||[]),u(v.labels||[]),d(v.projects||[]);break;case"usersLoaded":p(v.users||[]);break;case"issueCreated":g(!1);break;case"issueCreationFailed":g(!1);break;case"populateDraft":v.data&&m(v.data);break}}),[t]);let y=v=>{e({command:"loadTemplates",teamId:v}),e({command:"loadTeamData",teamId:v}),e({command:"loadUsers",teamId:v})},x=v=>{g(!0),e({command:"createIssue",input:v})};return(0,al.jsxs)("div",{className:Zy.container,children:[(0,al.jsx)("div",{className:Zy.header,children:(0,al.jsx)("h1",{children:"Create New Ticket"})}),(0,al.jsx)(BM,{teams:n,templates:o,workflowStates:s,labels:a,projects:c,users:f,onTeamChange:y,onSubmit:x,isSubmitting:h,draftData:b})]})}var zM=A$;var HM=H(de()),UM=document.getElementById("root");UM&&(0,$M.createRoot)(UM).render((0,HM.jsx)(zM,{}));})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/webview-ui/build/linear-standup-builder.js b/webview-ui/build/linear-standup-builder.js index 7706f61..f2a4eb8 100644 --- a/webview-ui/build/linear-standup-builder.js +++ b/webview-ui/build/linear-standup-builder.js @@ -262,7 +262,7 @@ ${y} `);w.trim()&&(e.customNestedParser?b=e.customNestedParser(w):b=n.blockTokens(w))}let k=e.createToken(h,b);a.push(k)}if(a.length!==0)return{items:a,raw:c}}function ll(t,e,n,r){if(!t||!Array.isArray(t.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=t.content,l=e.renderChildren([i]),a=[`${o}${l}`];return s&&s.length>0&&s.forEach(c=>{let u=e.renderChildren([c]);if(u){let d=u.split(` `).map(f=>f?e.indent(f):"").join(` `);a.push(d)}}),a.join(` -`)}function CO(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,a)=>{let c=i.mapping.map(a),u=i.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=t.type.create({...t.attrs,...n});i.removeMark(c,u,t.type),i.addMark(c,u,p)}}),i.docChanged&&e.view.dispatch(i)}var oe=class uw extends Xh{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new uw(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function nn(t){return new rO({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{let i=le(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=e,l=r[r.length-1],a=r[0],c=n.to;if(l){let u=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(Fc(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(y=>y===t.type&&y!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+u,d),c=n.from+u+l.length,s.addMark(n.from+u,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}var jc=z(De(),1),FO=z(ec(),1);var Gc=z(De(),1),$O=z(hw(),1),vw=z(X(),1),al=z(De(),1),KO=z(X(),1),kw=z(De(),1),Ew=z(X(),1);var ww=z(De(),1),nm=z(De(),1),Sw=z(Qa(),1),xw=z(X(),1),YO=z(X(),1);var rm=z(De(),1),JO=z(X(),1),DO=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},LO=({contentComponent:t})=>{let e=(0,bw.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return(0,or.jsx)(or.Fragment,{children:Object.values(e)})};function PO(){let t=new Set,e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:yw.default.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){let r={...e};delete r[n],e=r,t.forEach(o=>o())}}}var BO=class extends Hr.default.Component{constructor(t){var e;super(t),this.editorContentRef=Hr.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(t.view.dom),t.setOptions({element:e}),t.contentComponent=PO(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;let e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.firstChild))return;let n=document.createElement("div");n.append(e.view.dom),e.setOptions({element:n})}catch{}}}render(){let{editor:t,innerRef:e,...n}=this.props;return(0,or.jsxs)(or.Fragment,{children:[(0,or.jsx)("div",{ref:DO(e,this.editorContentRef),...n}),t?.contentComponent&&(0,or.jsx)(LO,{contentComponent:t.contentComponent})]})}},zO=(0,Hr.forwardRef)((t,e)=>{let n=Hr.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Hr.default.createElement(BO,{key:n,innerRef:e,...t})}),Cz=Hr.default.memo(zO);var UO=typeof window>"u",_z=UO||!!(typeof window<"u"&&window.next);var HO=(0,Kc.createContext)({editor:null}),Nz=HO.Consumer;var VO=(0,al.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var WO=()=>(0,al.useContext)(VO);var Tz=kw.default.forwardRef((t,e)=>{let{onDragStart:n}=WO(),r=t.as||"div";return(0,Ew.jsx)(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function mw(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function gw(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function jO(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function GO(t){if(mw(t)||gw(t))return!0;if(jO(t)){let e=t.type;if(e)return mw(e)||gw(e)}return!1}function qO(){try{if(nm.version)return parseInt(nm.version.split(".")[0],10)>=19}catch{}return!1}var Cw=class{constructor(t,{editor:e,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,Sw.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var t;let e=this.component,n=this.props,r=this.editor,o=qO(),i=GO(e),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=l=>{this.ref=l}),this.reactElement=(0,xw.jsx)(e,{...s}),(t=r?.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;let e=this.editor;(t=e?.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}},Mz=ww.default.createContext({markViewContentRef:()=>{}});var Ii=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);let{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]};var QO=/^\s*>\s$/,_w=oe.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Ii("blockquote",{...J(this.options.HTMLAttributes,t),children:Ii("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";let n=">",r=[];return t.content.forEach(o=>{let l=e.renderChildren([o]).split(` +`)}function CO(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,a)=>{let c=i.mapping.map(a),u=i.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=t.type.create({...t.attrs,...n});i.removeMark(c,u,t.type),i.addMark(c,u,p)}}),i.docChanged&&e.view.dispatch(i)}var oe=class uw extends Xh{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new uw(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function nn(t){return new rO({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{let i=le(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=e,l=r[r.length-1],a=r[0],c=n.to;if(l){let u=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(Fc(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(y=>y===t.type&&y!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+u,d),c=n.from+u+l.length,s.addMark(n.from+u,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}var jc=z(De(),1),FO=z(ec(),1);var Gc=z(De(),1),$O=z(hw(),1),vw=z(X(),1),al=z(De(),1),KO=z(X(),1),kw=z(De(),1),Ew=z(X(),1);var ww=z(De(),1),nm=z(De(),1),Sw=z(Qa(),1),xw=z(X(),1),YO=z(X(),1);var rm=z(De(),1),JO=z(X(),1),DO=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},LO=({contentComponent:t})=>{let e=(0,bw.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return(0,or.jsx)(or.Fragment,{children:Object.values(e)})};function PO(){let t=new Set,e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:yw.default.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){let r={...e};delete r[n],e=r,t.forEach(o=>o())}}}var BO=class extends Hr.default.Component{constructor(t){var e;super(t),this.editorContentRef=Hr.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;let e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;let n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=PO(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;let e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;let n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){let{editor:t,innerRef:e,...n}=this.props;return(0,or.jsxs)(or.Fragment,{children:[(0,or.jsx)("div",{ref:DO(e,this.editorContentRef),...n}),t?.contentComponent&&(0,or.jsx)(LO,{contentComponent:t.contentComponent})]})}},zO=(0,Hr.forwardRef)((t,e)=>{let n=Hr.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Hr.default.createElement(BO,{key:n,innerRef:e,...t})}),Cz=Hr.default.memo(zO);var UO=typeof window>"u",_z=UO||!!(typeof window<"u"&&window.next);var HO=(0,Kc.createContext)({editor:null}),Nz=HO.Consumer;var VO=(0,al.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var WO=()=>(0,al.useContext)(VO);var Tz=kw.default.forwardRef((t,e)=>{let{onDragStart:n}=WO(),r=t.as||"div";return(0,Ew.jsx)(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function mw(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function gw(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function jO(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function GO(t){if(mw(t)||gw(t))return!0;if(jO(t)){let e=t.type;if(e)return mw(e)||gw(e)}return!1}function qO(){try{if(nm.version)return parseInt(nm.version.split(".")[0],10)>=19}catch{}return!1}var Cw=class{constructor(t,{editor:e,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,Sw.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var t;let e=this.component,n=this.props,r=this.editor,o=qO(),i=GO(e),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=l=>{this.ref=l}),this.reactElement=(0,xw.jsx)(e,{...s}),(t=r?.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;let e=this.editor;(t=e?.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}},Mz=ww.default.createContext({markViewContentRef:()=>{}});var Ii=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);let{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]};var QO=/^\s*>\s$/,_w=oe.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Ii("blockquote",{...J(this.options.HTMLAttributes,t),children:Ii("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";let n=">",r=[];return t.content.forEach(o=>{let l=e.renderChildren([o]).split(` `).map(a=>a.trim()===""?n:`${n} ${a}`);r.push(l.join(` `))}),r.join(` ${n} diff --git a/webview-ui/build/linear-ticket-panel.js b/webview-ui/build/linear-ticket-panel.js index be8ed81..96f0e47 100644 --- a/webview-ui/build/linear-ticket-panel.js +++ b/webview-ui/build/linear-ticket-panel.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var lO=Object.create;var Rh=Object.defineProperty;var uO=Object.getOwnPropertyDescriptor;var cO=Object.getOwnPropertyNames;var dO=Object.getPrototypeOf,fO=Object.prototype.hasOwnProperty;var $t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qa=(e,t)=>{for(var n in t)Rh(e,n,{get:t[n],enumerable:!0})},pO=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cO(t))!fO.call(e,o)&&o!==n&&Rh(e,o,{get:()=>t[o],enumerable:!(r=uO(t,o))||r.enumerable});return e};var R=(e,t,n)=>(n=e!=null?lO(dO(e)):{},pO(t||!e||!e.__esModule?Rh(n,"default",{value:e,enumerable:!0}):n,e));var jv=$t(ce=>{"use strict";var Va=Symbol.for("react.element"),hO=Symbol.for("react.portal"),mO=Symbol.for("react.fragment"),gO=Symbol.for("react.strict_mode"),bO=Symbol.for("react.profiler"),yO=Symbol.for("react.provider"),vO=Symbol.for("react.context"),xO=Symbol.for("react.forward_ref"),kO=Symbol.for("react.suspense"),wO=Symbol.for("react.memo"),EO=Symbol.for("react.lazy"),Lv=Symbol.iterator;function _O(e){return e===null||typeof e!="object"?null:(e=Lv&&e[Lv]||e["@@iterator"],typeof e=="function"?e:null)}var Fv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zv=Object.assign,Uv={};function ws(e,t,n){this.props=e,this.context=t,this.refs=Uv,this.updater=n||Fv}ws.prototype.isReactComponent={};ws.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ws.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hv(){}Hv.prototype=ws.prototype;function Dh(e,t,n){this.props=e,this.context=t,this.refs=Uv,this.updater=n||Fv}var Ih=Dh.prototype=new Hv;Ih.constructor=Dh;zv(Ih,ws.prototype);Ih.isPureReactComponent=!0;var Pv=Array.isArray,$v=Object.prototype.hasOwnProperty,Lh={current:null},qv={key:!0,ref:!0,__self:!0,__source:!0};function Vv(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)$v.call(t,r)&&!qv.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1{"use strict";Kv.exports=jv()});var rx=$t(Me=>{"use strict";function Uh(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rQu(a,n))lQu(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(lQu(u,n))e[r]=u,e[l]=n,r=l;else break e}}return t}function Qu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Gv=performance,Me.unstable_now=function(){return Gv.now()}):(Bh=Date,Yv=Bh.now(),Me.unstable_now=function(){return Bh.now()-Yv});var Gv,Bh,Yv,ar=[],wo=[],AO=1,kn=null,At=3,nc=!1,gi=!1,ja=!1,Xv=typeof setTimeout=="function"?setTimeout:null,Qv=typeof clearTimeout=="function"?clearTimeout:null,Jv=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Hh(e){for(var t=jn(wo);t!==null;){if(t.callback===null)tc(wo);else if(t.startTime<=e)tc(wo),t.sortIndex=t.expirationTime,Uh(ar,t);else break;t=jn(wo)}}function $h(e){if(ja=!1,Hh(e),!gi)if(jn(ar)!==null)gi=!0,Vh(qh);else{var t=jn(wo);t!==null&&Wh($h,t.startTime-e)}}function qh(e,t){gi=!1,ja&&(ja=!1,Qv(Ka),Ka=-1),nc=!0;var n=At;try{for(Hh(t),kn=jn(ar);kn!==null&&(!(kn.expirationTime>t)||e&&!nx());){var r=kn.callback;if(typeof r=="function"){kn.callback=null,At=kn.priorityLevel;var o=r(kn.expirationTime<=t);t=Me.unstable_now(),typeof o=="function"?kn.callback=o:kn===jn(ar)&&tc(ar),Hh(t)}else tc(ar);kn=jn(ar)}if(kn!==null)var i=!0;else{var s=jn(wo);s!==null&&Wh($h,s.startTime-t),i=!1}return i}finally{kn=null,At=n,nc=!1}}var rc=!1,ec=null,Ka=-1,ex=5,tx=-1;function nx(){return!(Me.unstable_now()-txe||125r?(e.sortIndex=n,Uh(wo,e),jn(ar)===null&&e===jn(wo)&&(ja?(Qv(Ka),Ka=-1):ja=!0,Wh($h,n-r))):(e.sortIndex=o,Uh(ar,e),gi||nc||(gi=!0,Vh(qh))),e};Me.unstable_shouldYield=nx;Me.unstable_wrapCallback=function(e){var t=At;return function(){var n=At;At=t;try{return e.apply(this,arguments)}finally{At=n}}}});var ix=$t((oq,ox)=>{"use strict";ox.exports=rx()});var uE=$t(mn=>{"use strict";var MO=ge(),pn=ix();function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hm=Object.prototype.hasOwnProperty,RO=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,sx={},ax={};function OO(e){return hm.call(ax,e)?!0:hm.call(sx,e)?!1:RO.test(e)?ax[e]=!0:(sx[e]=!0,!1)}function DO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function IO(e,t,n,r){if(t===null||typeof t>"u"||DO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var xt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xt[e]=new jt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xt[t]=new jt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xt[e]=new jt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xt[e]=new jt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xt[e]=new jt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xt[e]=new jt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xt[e]=new jt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xt[e]=new jt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xt[e]=new jt(e,5,!1,e.toLowerCase(),null,!1,!1)});var i0=/[\-:]([a-z])/g;function s0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(i0,s0);xt[t]=new jt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(i0,s0);xt[t]=new jt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(i0,s0);xt[t]=new jt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xt[e]=new jt(e,1,!1,e.toLowerCase(),null,!1,!1)});xt.xlinkHref=new jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xt[e]=new jt(e,1,!1,e.toLowerCase(),null,!0,!0)});function a0(e,t,n,r){var o=xt.hasOwnProperty(t)?xt[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` -`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Kh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nl(e):""}function LO(e){switch(e.tag){case 5:return nl(e.type);case 16:return nl("Lazy");case 13:return nl("Suspense");case 19:return nl("SuspenseList");case 0:case 2:case 15:return e=Gh(e.type,!1),e;case 11:return e=Gh(e.type.render,!1),e;case 1:return e=Gh(e.type,!0),e;default:return""}}function ym(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Cs:return"Fragment";case Ss:return"Portal";case mm:return"Profiler";case l0:return"StrictMode";case gm:return"Suspense";case bm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hk:return(e.displayName||"Context")+".Consumer";case pk:return(e._context.displayName||"Context")+".Provider";case u0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c0:return t=e.displayName||null,t!==null?t:ym(e.type)||"Memo";case _o:t=e._payload,e=e._init;try{return ym(e(t))}catch{}}return null}function PO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ym(t);case 8:return t===l0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function BO(e){var t=gk(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ic(e){e._valueTracker||(e._valueTracker=BO(e))}function bk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gk(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vm(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ux(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Fo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function yk(e,t){t=t.checked,t!=null&&a0(e,"checked",t,!1)}function xm(e,t){yk(e,t);var n=Fo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?km(e,t.type,n):t.hasOwnProperty("defaultValue")&&km(e,t.type,Fo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function km(e,t,n){(t!=="number"||Dc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rl=Array.isArray;function Bs(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=sc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},FO=["Webkit","ms","Moz","O"];Object.keys(sl).forEach(function(e){FO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sl[t]=sl[e]})});function wk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sl.hasOwnProperty(e)&&sl[e]?(""+t).trim():t+"px"}function Ek(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=wk(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var zO=qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _m(e,t){if(t){if(zO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Sm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cm=null;function d0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tm=null,Fs=null,zs=null;function px(e){if(e=Il(e)){if(typeof Tm!="function")throw Error(I(280));var t=e.stateNode;t&&(t=ad(t),Tm(e.stateNode,e.type,t))}}function _k(e){Fs?zs?zs.push(e):zs=[e]:Fs=e}function Sk(){if(Fs){var e=Fs,t=zs;if(zs=Fs=null,px(e),t)for(e=0;e>>=0,e===0?32:31-(JO(e)/ZO|0)|0}var ac=64,lc=4194304;function ol(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=ol(a):(i&=s,i!==0&&(r=ol(i)))}else s=n&~o,s!==0?r=ol(s):i!==0&&(r=ol(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ol(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zn(t),e[t]=n}function tD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ll),wx=" ",Ex=!1;function Wk(e,t){switch(e){case"keyup":return AD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ts=!1;function RD(e,t){switch(e){case"compositionend":return jk(t);case"keypress":return t.which!==32?null:(Ex=!0,wx);case"textInput":return e=t.data,e===wx&&Ex?null:e;default:return null}}function OD(e,t){if(Ts)return e==="compositionend"||!v0&&Wk(e,t)?(e=qk(),_c=g0=No=null,Ts=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cx(n)}}function Jk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zk(){for(var e=window,t=Dc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dc(e.document)}return t}function x0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function HD(e){var t=Zk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Jk(n.ownerDocument.documentElement,n)){if(r!==null&&x0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Tx(n,i);var s=Tx(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ns=null,Dm=null,cl=null,Im=!1;function Nx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Im||Ns==null||Ns!==Dc(r)||(r=Ns,"selectionStart"in r&&x0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cl&&wl(cl,r)||(cl=r,r=Uc(Dm,"onSelect"),0Rs||(e.current=Um[Rs],Um[Rs]=null,Rs--)}function Re(e,t){Rs++,Um[Rs]=e.current,e.current=t}var zo={},Dt=Ho(zo),tn=Ho(!1),_i=zo;function Vs(e,t){var n=e.type.contextTypes;if(!n)return zo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function nn(e){return e=e.childContextTypes,e!=null}function $c(){De(tn),De(Dt)}function Bx(e,t,n){if(Dt.current!==zo)throw Error(I(168));Re(Dt,t),Re(tn,n)}function sw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,PO(e)||"Unknown",o));return qe({},n,r)}function qc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zo,_i=Dt.current,Re(Dt,e),Re(tn,tn.current),!0}function Fx(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=sw(e,t,_i),r.__reactInternalMemoizedMergedChildContext=e,De(tn),De(Dt),Re(Dt,e)):De(tn),Re(tn,n)}var Fr=null,ld=!1,im=!1;function aw(e){Fr===null?Fr=[e]:Fr.push(e)}function ZD(e){ld=!0,aw(e)}function $o(){if(!im&&Fr!==null){im=!0;var e=0,t=Ee;try{var n=Fr;for(Ee=1;e>=s,o-=s,zr=1<<32-Zn(t)+o|n<_?(T=E,E=null):T=E.sibling;var C=f(g,E,v[_],x);if(C===null){E===null&&(E=T);break}e&&E&&C.alternate===null&&t(g,E),y=i(C,y,_),w===null?k=C:w.sibling=C,w=C,E=T}if(_===v.length)return n(g,E),Fe&&bi(g,_),k;if(E===null){for(;__?(T=E,E=null):T=E.sibling;var H=f(g,E,C.value,x);if(H===null){E===null&&(E=T);break}e&&E&&H.alternate===null&&t(g,E),y=i(H,y,_),w===null?k=H:w.sibling=H,w=H,E=T}if(C.done)return n(g,E),Fe&&bi(g,_),k;if(E===null){for(;!C.done;_++,C=v.next())C=d(g,C.value,x),C!==null&&(y=i(C,y,_),w===null?k=C:w.sibling=C,w=C);return Fe&&bi(g,_),k}for(E=r(g,E);!C.done;_++,C=v.next())C=p(E,g,_,C.value,x),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?_:C.key),y=i(C,y,_),w===null?k=C:w.sibling=C,w=C);return e&&E.forEach(function(K){return t(g,K)}),Fe&&bi(g,_),k}function b(g,y,v,x){if(typeof v=="object"&&v!==null&&v.type===Cs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case oc:e:{for(var k=v.key,w=y;w!==null;){if(w.key===k){if(k=v.type,k===Cs){if(w.tag===7){n(g,w.sibling),y=o(w,v.props.children),y.return=g,g=y;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===_o&&Hx(k)===w.type){n(g,w.sibling),y=o(w,v.props),y.ref=Xa(g,w,v),y.return=g,g=y;break e}n(g,w);break}else t(g,w);w=w.sibling}v.type===Cs?(y=Ei(v.props.children,g.mode,x,v.key),y.return=g,g=y):(x=Oc(v.type,v.key,v.props,null,g.mode,x),x.ref=Xa(g,y,v),x.return=g,g=x)}return s(g);case Ss:e:{for(w=v.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=o(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=pm(v,g.mode,x),y.return=g,g=y}return s(g);case _o:return w=v._init,b(g,y,w(v._payload),x)}if(rl(v))return h(g,y,v,x);if(Ga(v))return m(g,y,v,x);vc(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,v),y.return=g,g=y):(n(g,y),y=fm(v,g.mode,x),y.return=g,g=y),s(g)):n(g,y)}return b}var js=dw(!0),fw=dw(!1),jc=Ho(null),Kc=null,Is=null,_0=null;function S0(){_0=Is=Kc=null}function C0(e){var t=jc.current;De(jc),e._currentValue=t}function qm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hs(e,t){Kc=e,_0=Is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(en=!0),e.firstContext=null)}function Cn(e){var t=e._currentValue;if(_0!==e)if(e={context:e,memoizedValue:t,next:null},Is===null){if(Kc===null)throw Error(I(308));Is=e,Kc.dependencies={lanes:0,firstContext:e}}else Is=Is.next=e;return t}var xi=null;function T0(e){xi===null?xi=[e]:xi.push(e)}function pw(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,T0(t)):(n.next=o.next,o.next=n),t.interleaved=n,Vr(e,r)}function Vr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var So=!1;function N0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(me&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Vr(e,n)}return o=r.interleaved,o===null?(t.next=t,T0(r)):(t.next=o.next,o.next=t),r.interleaved=t,Vr(e,n)}function Cc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,p0(e,n)}}function $x(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gc(e,t,n,r){var o=e.updateQueue;So=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=qe({},d,f);break e;case 2:So=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Ti|=s,e.lanes=s,e.memoizedState=d}}function qx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=am.transition;am.transition={};try{e(!1),t()}finally{Ee=n,am.transition=r}}function Rw(){return Tn().memoizedState}function tI(e,t,n){var r=Po(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ow(e))Dw(t,n);else if(n=pw(e,t,n,r),n!==null){var o=Wt();Xn(n,e,r,o),Iw(n,t,r)}}function nI(e,t,n){var r=Po(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ow(e))Dw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,s)){var l=t.interleaved;l===null?(o.next=o,T0(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=pw(e,t,o,r),n!==null&&(o=Wt(),Xn(n,e,r,o),Iw(n,t,r))}}function Ow(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Dw(e,t){dl=Jc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Iw(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,p0(e,n)}}var Zc={readContext:Cn,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useInsertionEffect:Mt,useLayoutEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useMutableSource:Mt,useSyncExternalStore:Mt,useId:Mt,unstable_isNewReconciler:!1},rI={readContext:Cn,useCallback:function(e,t){return ur().memoizedState=[e,t===void 0?null:t],e},useContext:Cn,useEffect:Wx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nc(4194308,4,Cw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nc(4,2,e,t)},useMemo:function(e,t){var n=ur();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ur();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tI.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=ur();return e={current:e},t.memoizedState=e},useState:Vx,useDebugValue:P0,useDeferredValue:function(e){return ur().memoizedState=e},useTransition:function(){var e=Vx(!1),t=e[0];return e=eI.bind(null,e[1]),ur().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$e,o=ur();if(Fe){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),dt===null)throw Error(I(349));(Ci&30)!==0||yw(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Wx(xw.bind(null,r,i,e),[e]),r.flags|=2048,Ml(9,vw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ur(),t=dt.identifierPrefix;if(Fe){var n=Ur,r=zr;n=(r&~(1<<32-Zn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[cr]=t,e[Sl]=r,Vw(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sm(n,r),n){case"dialog":Oe("cancel",e),Oe("close",e),o=r;break;case"iframe":case"object":case"embed":Oe("load",e),o=r;break;case"video":case"audio":for(o=0;oYs&&(t.flags|=128,r=!0,Qa(i,!1),t.lanes=4194304)}else{if(!r)if(e=Yc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Fe)return Rt(t),null}else 2*et()-i.renderingStartTime>Ys&&n!==1073741824&&(t.flags|=128,r=!0,Qa(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=et(),t.sibling=null,n=He.current,Re(He,r?n&1|2:n&1),t):(Rt(t),null);case 22:case 23:return $0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(cn&1073741824)!==0&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function dI(e,t){switch(w0(t),t.tag){case 1:return nn(t.type)&&$c(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ks(),De(tn),De(Dt),R0(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return M0(t),null;case 13:if(De(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Ws()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(He),null;case 4:return Ks(),null;case 10:return C0(t.type._context),null;case 22:case 23:return $0(),null;case 24:return null;default:return null}}var kc=!1,Ot=!1,fI=typeof WeakSet=="function"?WeakSet:Set,$=null;function Ls(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(e,t,r)}else n.current=null}function Zm(e,t,n){try{n()}catch(r){Ge(e,t,r)}}var nk=!1;function pI(e,t){if(Lm=Fc,e=Zk(),x0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pm={focusedElem:e,selectionRange:n},Fc=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Gn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){Ge(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return h=nk,nk=!1,h}function fl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Zm(t,n,i)}o=o.next}while(o!==r)}}function dd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Kw(e){var t=e.alternate;t!==null&&(e.alternate=null,Kw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cr],delete t[Sl],delete t[zm],delete t[YD],delete t[JD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gw(e){return e.tag===5||e.tag===3||e.tag===4}function rk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Hc));else if(r!==4&&(e=e.child,e!==null))for(Qm(e,t,n),e=e.sibling;e!==null;)Qm(e,t,n),e=e.sibling}function e0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(e0(e,t,n),e=e.sibling;e!==null;)e0(e,t,n),e=e.sibling}var yt=null,Yn=!1;function Eo(e,t,n){for(n=n.child;n!==null;)Yw(e,t,n),n=n.sibling}function Yw(e,t,n){if(dr&&typeof dr.onCommitFiberUnmount=="function")try{dr.onCommitFiberUnmount(rd,n)}catch{}switch(n.tag){case 5:Ot||Ls(n,t);case 6:var r=yt,o=Yn;yt=null,Eo(e,t,n),yt=r,Yn=o,yt!==null&&(Yn?(e=yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yt.removeChild(n.stateNode));break;case 18:yt!==null&&(Yn?(e=yt,n=n.stateNode,e.nodeType===8?om(e.parentNode,n):e.nodeType===1&&om(e,n),xl(e)):om(yt,n.stateNode));break;case 4:r=yt,o=Yn,yt=n.stateNode.containerInfo,Yn=!0,Eo(e,t,n),yt=r,Yn=o;break;case 0:case 11:case 14:case 15:if(!Ot&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Zm(n,t,s),o=o.next}while(o!==r)}Eo(e,t,n);break;case 1:if(!Ot&&(Ls(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ge(n,t,a)}Eo(e,t,n);break;case 21:Eo(e,t,n);break;case 22:n.mode&1?(Ot=(r=Ot)||n.memoizedState!==null,Eo(e,t,n),Ot=r):Eo(e,t,n);break;default:Eo(e,t,n)}}function ok(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new fI),t.forEach(function(r){var o=wI.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*mI(r/1960))-r,10e?16:e,Ao===null)var r=!1;else{if(e=Ao,Ao=null,ed=0,(me&6)!==0)throw Error(I(331));var o=me;for(me|=4,$=e.current;$!==null;){var i=$,s=i.child;if(($.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;let()-U0?wi(e,0):z0|=n),rn(e,t)}function rE(e,t){t===0&&((e.mode&1)===0?t=1:(t=lc,lc<<=1,(lc&130023424)===0&&(lc=4194304)));var n=Wt();e=Vr(e,t),e!==null&&(Ol(e,t,n),rn(e,n))}function kI(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rE(e,n)}function wI(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),rE(e,n)}var oE;oE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tn.current)en=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return en=!1,uI(e,t,n);en=(e.flags&131072)!==0}else en=!1,Fe&&(t.flags&1048576)!==0&&lw(t,Wc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ac(e,t),e=t.pendingProps;var o=Vs(t,Dt.current);Hs(t,n),o=D0(null,t,r,e,o,n);var i=I0();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nn(r)?(i=!0,qc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,N0(t),o.updater=cd,t.stateNode=o,o._reactInternals=t,Wm(t,r,e,n),t=Km(null,t,r,!0,i,n)):(t.tag=0,Fe&&i&&k0(t),Vt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ac(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=_I(r),e=Gn(r,e),o){case 0:t=jm(null,t,r,e,n);break e;case 1:t=Qx(null,t,r,e,n);break e;case 11:t=Zx(null,t,r,e,n);break e;case 14:t=Xx(null,t,r,Gn(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gn(r,o),jm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gn(r,o),Qx(e,t,r,o,n);case 3:e:{if(Hw(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,hw(e,t),Gc(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Gs(Error(I(423)),t),t=ek(e,t,r,n,o);break e}else if(r!==o){o=Gs(Error(I(424)),t),t=ek(e,t,r,n,o);break e}else for(dn=Do(t.stateNode.containerInfo.firstChild),fn=t,Fe=!0,Jn=null,n=fw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ws(),r===o){t=Wr(e,t,n);break e}Vt(e,t,r,n)}t=t.child}return t;case 5:return mw(t),e===null&&$m(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Bm(r,o)?s=null:i!==null&&Bm(r,i)&&(t.flags|=32),Uw(e,t),Vt(e,t,s,n),t.child;case 6:return e===null&&$m(t),null;case 13:return $w(e,t,n);case 4:return A0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=js(t,null,r,n):Vt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gn(r,o),Zx(e,t,r,o,n);case 7:return Vt(e,t,t.pendingProps,n),t.child;case 8:return Vt(e,t,t.pendingProps.children,n),t.child;case 12:return Vt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Re(jc,r._currentValue),r._currentValue=s,i!==null)if(Qn(i.value,s)){if(i.children===o.children&&!tn.current){t=Wr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Hr(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),qm(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(I(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),qm(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Vt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hs(t,n),o=Cn(o),r=r(o),t.flags|=1,Vt(e,t,r,n),t.child;case 14:return r=t.type,o=Gn(r,t.pendingProps),o=Gn(r.type,o),Xx(e,t,r,o,n);case 15:return Fw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gn(r,o),Ac(e,t),t.tag=1,nn(r)?(e=!0,qc(t)):e=!1,Hs(t,n),Lw(t,r,o),Wm(t,r,o,n),Km(null,t,r,!0,e,n);case 19:return qw(e,t,n);case 22:return zw(e,t,n)}throw Error(I(156,t.tag))};function iE(e,t){return Ok(e,t)}function EI(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,t,n,r){return new EI(e,t,n,r)}function V0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _I(e){if(typeof e=="function")return V0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===u0)return 11;if(e===c0)return 14}return 2}function Bo(e,t){var n=e.alternate;return n===null?(n=_n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Oc(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")V0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Cs:return Ei(n.children,o,i,t);case l0:s=8,o|=8;break;case mm:return e=_n(12,n,t,o|2),e.elementType=mm,e.lanes=i,e;case gm:return e=_n(13,n,t,o),e.elementType=gm,e.lanes=i,e;case bm:return e=_n(19,n,t,o),e.elementType=bm,e.lanes=i,e;case mk:return pd(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pk:s=10;break e;case hk:s=9;break e;case u0:s=11;break e;case c0:s=14;break e;case _o:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=_n(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ei(e,t,n,r){return e=_n(7,e,r,t),e.lanes=n,e}function pd(e,t,n,r){return e=_n(22,e,r,t),e.elementType=mk,e.lanes=n,e.stateNode={isHidden:!1},e}function fm(e,t,n){return e=_n(6,e,null,t),e.lanes=n,e}function pm(e,t,n){return t=_n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SI(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jh(0),this.expirationTimes=Jh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jh(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function W0(e,t,n,r,o,i,s,a,l){return e=new SI(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=_n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},N0(i),e}function CI(e,t,n){var r=3{"use strict";function cE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cE)}catch{}}cE(),dE.exports=uE()});var pE=$t(Y0=>{"use strict";var fE=Xs();Y0.createRoot=fE.createRoot,Y0.hydrateRoot=fE.hydrateRoot;var aq});var yE=$t(vd=>{"use strict";var RI=ge(),OI=Symbol.for("react.element"),DI=Symbol.for("react.fragment"),II=Object.prototype.hasOwnProperty,LI=RI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,PI={key:!0,ref:!0,__self:!0,__source:!0};function bE(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)II.call(t,r)&&!PI.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:OI,type:e,key:i,ref:s,props:o,_owner:LI.current}}vd.Fragment=DI;vd.jsx=bE;vd.jsxs=bE});var j=$t((fq,vE)=>{"use strict";vE.exports=yE()});var TE=$t(CE=>{"use strict";var na=ge();function BI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FI=typeof Object.is=="function"?Object.is:BI,zI=na.useState,UI=na.useEffect,HI=na.useLayoutEffect,$I=na.useDebugValue;function qI(e,t){var n=t(),r=zI({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return HI(function(){o.value=n,o.getSnapshot=t,Q0(o)&&i({inst:o})},[e,n,t]),UI(function(){return Q0(o)&&i({inst:o}),e(function(){Q0(o)&&i({inst:o})})},[e]),$I(n),n}function Q0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!FI(e,n)}catch{return!0}}function VI(e,t){return t()}var WI=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?VI:qI;CE.useSyncExternalStore=na.useSyncExternalStore!==void 0?na.useSyncExternalStore:WI});var xd=$t((Aq,NE)=>{"use strict";NE.exports=TE()});var XS=$t(ZS=>{"use strict";var yf=ge(),GP=xd();function YP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JP=typeof Object.is=="function"?Object.is:YP,ZP=GP.useSyncExternalStore,XP=yf.useRef,QP=yf.useEffect,e5=yf.useMemo,t5=yf.useDebugValue;ZS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=XP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=e5(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,JP(c,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(c=p,h):(c=p,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=ZP(e,i[0],i[1]);return QP(function(){s.hasValue=!0,s.value=a},[a]),t5(a),a}});var eC=$t((VW,QS)=>{"use strict";QS.exports=XS()});var wN=$t((WG,kN)=>{function uN(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&uN(n)}),e}var hp=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function cN(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ai(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var x9="
",rN=e=>!!e.scope,k9=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},H1=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=cN(t)}openNode(t){if(!rN(t))return;let n=k9(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){rN(t)&&(this.buffer+=x9)}value(){return this.buffer}span(t){this.buffer+=``}},oN=(e={})=>{let t={children:[]};return Object.assign(t,e),t},$1=class e{constructor(){this.rootNode=oN(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=oN({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},q1=class extends $1{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new H1(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function _u(e){return e?typeof e=="string"?e:e.source:null}function dN(e){return ns("(?=",e,")")}function w9(e){return ns("(?:",e,")*")}function E9(e){return ns("(?:",e,")?")}function ns(...e){return e.map(n=>_u(n)).join("")}function _9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function W1(...e){return"("+(_9(e).capture?"":"?:")+e.map(r=>_u(r)).join("|")+")"}function fN(e){return new RegExp(e.toString()+"|").exec("").length-1}function S9(e,t){let n=e&&e.exec(t);return n&&n.index===0}var C9=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function j1(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,i=_u(r),s="";for(;i.length>0;){let a=C9.exec(i);if(!a){s+=i;break}s+=i.substring(0,a.index),i=i.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+o):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}var T9=/\b\B/,pN="[a-zA-Z]\\w*",K1="[a-zA-Z_]\\w*",hN="\\b\\d+(\\.\\d+)?",mN="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",gN="\\b(0b[01]+)",N9="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",A9=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=ns(t,/.*\b/,e.binary,/\b.*/)),ai({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Su={begin:"\\\\[\\s\\S]",relevance:0},M9={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Su]},R9={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Su]},O9={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},gp=function(e,t,n={}){let r=ai({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=W1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ns(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},D9=gp("//","$"),I9=gp("/\\*","\\*/"),L9=gp("#","$"),P9={scope:"number",begin:hN,relevance:0},B9={scope:"number",begin:mN,relevance:0},F9={scope:"number",begin:gN,relevance:0},z9={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Su,{begin:/\[/,end:/\]/,relevance:0,contains:[Su]}]},U9={scope:"title",begin:pN,relevance:0},H9={scope:"title",begin:K1,relevance:0},$9={begin:"\\.\\s*"+K1,relevance:0},q9=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},pp=Object.freeze({__proto__:null,APOS_STRING_MODE:M9,BACKSLASH_ESCAPE:Su,BINARY_NUMBER_MODE:F9,BINARY_NUMBER_RE:gN,COMMENT:gp,C_BLOCK_COMMENT_MODE:I9,C_LINE_COMMENT_MODE:D9,C_NUMBER_MODE:B9,C_NUMBER_RE:mN,END_SAME_AS_BEGIN:q9,HASH_COMMENT_MODE:L9,IDENT_RE:pN,MATCH_NOTHING_RE:T9,METHOD_GUARD:$9,NUMBER_MODE:P9,NUMBER_RE:hN,PHRASAL_WORDS_MODE:O9,QUOTE_STRING_MODE:R9,REGEXP_MODE:z9,RE_STARTERS_RE:N9,SHEBANG:A9,TITLE_MODE:U9,UNDERSCORE_IDENT_RE:K1,UNDERSCORE_TITLE_MODE:H9});function V9(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function W9(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function j9(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=V9,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function K9(e,t){Array.isArray(e.illegal)&&(e.illegal=W1(...e.illegal))}function G9(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Y9(e,t){e.relevance===void 0&&(e.relevance=1)}var J9=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=ns(n.beforeMatch,dN(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Z9=["of","and","for","in","not","or","if","then","parent","list","value"],X9="keyword";function bN(e,t,n=X9){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(i){Object.assign(r,bN(e[i],t,i))}),r;function o(i,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){let l=a.split("|");r[l[0]]=[i,Q9(l[0],l[1])]})}}function Q9(e,t){return t?Number(t):eF(e)?0:1}function eF(e){return Z9.includes(e.toLowerCase())}var iN={},ts=e=>{},sN=(e,...t)=>{},Ca=(e,t)=>{iN[`${e}/${t}`]||(iN[`${e}/${t}`]=!0)},mp=new Error;function yN(e,t,{key:n}){let r=0,o=e[n],i={},s={};for(let a=1;a<=t.length;a++)s[a+r]=o[a],i[a+r]=!0,r+=fN(t[a-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function tF(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ts("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),mp;if(typeof e.beginScope!="object"||e.beginScope===null)throw ts("beginScope must be object"),mp;yN(e,e.begin,{key:"beginScope"}),e.begin=j1(e.begin,{joinWith:""})}}function nF(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ts("skip, excludeEnd, returnEnd not compatible with endScope: {}"),mp;if(typeof e.endScope!="object"||e.endScope===null)throw ts("endScope must be object"),mp;yN(e,e.end,{key:"endScope"}),e.end=j1(e.end,{joinWith:""})}}function rF(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function oF(e){rF(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),tF(e),nF(e)}function iF(e){function t(s,a){return new RegExp(_u(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=fN(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let a=this.regexes.map(l=>l[1]);this.matcherRe=t(j1(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(a);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];let l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(s){let a=new r;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function i(s,a){let l=s;if(s.isCompiled)return l;[W9,G9,oF,J9].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[j9,K9,Y9].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=bN(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=_u(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return sF(c==="self"?s:c)})),s.contains.forEach(function(c){i(c,l)}),s.starts&&i(s.starts,a),l.matcher=o(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ai(e.classNameAliases||{}),i(e)}function vN(e){return e?e.endsWithParent||vN(e.starts):!1}function sF(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return ai(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:vN(e)?ai(e,{starts:e.starts?ai(e.starts):null}):Object.isFrozen(e)?ai(e):e}var aF="11.11.1",V1=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},U1=cN,aN=ai,lN=Symbol("nomatch"),lF=7,xN=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:q1};function l(S){return a.noHighlightRe.test(S)}function u(S){let A=S.className+" ";A+=S.parentNode?S.parentNode.className:"";let P=a.languageDetectRe.exec(A);if(P){let W=_(P[1]);return W||(sN(i.replace("{}",P[1])),sN("Falling back to no-highlight mode for this block.",S)),W?P[1]:"no-highlight"}return A.split(/\s+/).find(W=>l(W)||_(W))}function c(S,A,P){let W="",O="";typeof A=="object"?(W=S,P=A.ignoreIllegals,O=A.language):(Ca("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ca("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),O=S,W=A),P===void 0&&(P=!0);let le={code:W,language:O};U("before:highlight",le);let ke=le.result?le.result:d(le.language,le.code,P);return ke.code=le.code,U("after:highlight",ke),ke}function d(S,A,P,W){let O=Object.create(null);function le(z,X){return z.keywords[X]}function ke(){if(!ne.keywords){bt.addText(Ae);return}let z=0;ne.keywordPatternRe.lastIndex=0;let X=ne.keywordPatternRe.exec(Ae),ue="";for(;X;){ue+=Ae.substring(z,X.index);let we=xn.case_insensitive?X[0].toLowerCase():X[0],Nt=le(ne,we);if(Nt){let[Pr,sO]=Nt;if(bt.addText(ue),ue="",O[we]=(O[we]||0)+1,O[we]<=lF&&(Yu+=sO),Pr.startsWith("_"))ue+=X[0];else{let aO=xn.classNameAliases[Pr]||Pr;Tt(X[0],aO)}}else ue+=X[0];z=ne.keywordPatternRe.lastIndex,X=ne.keywordPatternRe.exec(Ae)}ue+=Ae.substring(z),bt.addText(ue)}function Ct(){if(Ae==="")return;let z=null;if(typeof ne.subLanguage=="string"){if(!t[ne.subLanguage]){bt.addText(Ae);return}z=d(ne.subLanguage,Ae,!0,Gu[ne.subLanguage]),Gu[ne.subLanguage]=z._top}else z=p(Ae,ne.subLanguage.length?ne.subLanguage:null);ne.relevance>0&&(Yu+=z.relevance),bt.__addSublanguage(z._emitter,z.language)}function Ke(){ne.subLanguage!=null?Ct():ke(),Ae=""}function Tt(z,X){z!==""&&(bt.startScope(X),bt.addText(z),bt.endScope())}function xo(z,X){let ue=1,we=X.length-1;for(;ue<=we;){if(!z._emit[ue]){ue++;continue}let Nt=xn.classNameAliases[z[ue]]||z[ue],Pr=X[ue];Nt?Tt(Pr,Nt):(Ae=Pr,ke(),Ae=""),ue++}}function ju(z,X){return z.scope&&typeof z.scope=="string"&&bt.openNode(xn.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(Tt(Ae,xn.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Ae=""):z.beginScope._multi&&(xo(z.beginScope,X),Ae="")),ne=Object.create(z,{parent:{value:ne}}),ne}function $a(z,X,ue){let we=S9(z.endRe,ue);if(we){if(z["on:end"]){let Nt=new hp(z);z["on:end"](X,Nt),Nt.isMatchIgnored&&(we=!1)}if(we){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return $a(z.parent,X,ue)}function Sh(z){return ne.matcher.regexIndex===0?(Ae+=z[0],1):(Mh=!0,0)}function Ch(z){let X=z[0],ue=z.rule,we=new hp(ue),Nt=[ue.__beforeBegin,ue["on:begin"]];for(let Pr of Nt)if(Pr&&(Pr(z,we),we.isMatchIgnored))return Sh(X);return ue.skip?Ae+=X:(ue.excludeBegin&&(Ae+=X),Ke(),!ue.returnBegin&&!ue.excludeBegin&&(Ae=X)),ju(ue,z),ue.returnBegin?0:X.length}function Th(z){let X=z[0],ue=A.substring(z.index),we=$a(ne,z,ue);if(!we)return lN;let Nt=ne;ne.endScope&&ne.endScope._wrap?(Ke(),Tt(X,ne.endScope._wrap)):ne.endScope&&ne.endScope._multi?(Ke(),xo(ne.endScope,z)):Nt.skip?Ae+=X:(Nt.returnEnd||Nt.excludeEnd||(Ae+=X),Ke(),Nt.excludeEnd&&(Ae=X));do ne.scope&&bt.closeNode(),!ne.skip&&!ne.subLanguage&&(Yu+=ne.relevance),ne=ne.parent;while(ne!==we.parent);return we.starts&&ju(we.starts,z),Nt.returnEnd?0:X.length}function Nh(){let z=[];for(let X=ne;X!==xn;X=X.parent)X.scope&&z.unshift(X.scope);z.forEach(X=>bt.openNode(X))}let ks={};function Ku(z,X){let ue=X&&X[0];if(Ae+=z,ue==null)return Ke(),0;if(ks.type==="begin"&&X.type==="end"&&ks.index===X.index&&ue===""){if(Ae+=A.slice(X.index,X.index+1),!o){let we=new Error(`0 width match regex (${S})`);throw we.languageName=S,we.badRule=ks.rule,we}return 1}if(ks=X,X.type==="begin")return Ch(X);if(X.type==="illegal"&&!P){let we=new Error('Illegal lexeme "'+ue+'" for mode "'+(ne.scope||"")+'"');throw we.mode=ne,we}else if(X.type==="end"){let we=Th(X);if(we!==lN)return we}if(X.type==="illegal"&&ue==="")return Ae+=` -`,1;if(Ah>1e5&&Ah>X.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ae+=ue,ue.length}let xn=_(S);if(!xn)throw ts(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');let Te=iF(xn),ko="",ne=W||Te,Gu={},bt=new a.__emitter(a);Nh();let Ae="",Yu=0,mi=0,Ah=0,Mh=!1;try{if(xn.__emitTokens)xn.__emitTokens(A,bt);else{for(ne.matcher.considerAll();;){Ah++,Mh?Mh=!1:ne.matcher.considerAll(),ne.matcher.lastIndex=mi;let z=ne.matcher.exec(A);if(!z)break;let X=A.substring(mi,z.index),ue=Ku(X,z);mi=z.index+ue}Ku(A.substring(mi))}return bt.finalize(),ko=bt.toHTML(),{language:S,value:ko,relevance:Yu,illegal:!1,_emitter:bt,_top:ne}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:S,value:U1(A),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:mi,context:A.slice(mi-100,mi+100),mode:z.mode,resultSoFar:ko},_emitter:bt};if(o)return{language:S,value:U1(A),illegal:!1,relevance:0,errorRaised:z,_emitter:bt,_top:ne};throw z}}function f(S){let A={value:U1(S),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return A._emitter.addText(S),A}function p(S,A){A=A||a.languages||Object.keys(t);let P=f(S),W=A.filter(_).filter(C).map(Ke=>d(Ke,S,!1));W.unshift(P);let O=W.sort((Ke,Tt)=>{if(Ke.relevance!==Tt.relevance)return Tt.relevance-Ke.relevance;if(Ke.language&&Tt.language){if(_(Ke.language).supersetOf===Tt.language)return 1;if(_(Tt.language).supersetOf===Ke.language)return-1}return 0}),[le,ke]=O,Ct=le;return Ct.secondBest=ke,Ct}function h(S,A,P){let W=A&&n[A]||P;S.classList.add("hljs"),S.classList.add(`language-${W}`)}function m(S){let A=null,P=u(S);if(l(P)||(U("before:highlightElement",{el:S,language:P}),S.dataset.highlighted))return;if(S.children.length>0&&(a.ignoreUnescapedHTML,a.throwUnescapedHTML))throw new V1("One of your code blocks includes unescaped HTML.",S.innerHTML);A=S;let W=A.textContent,O=P?c(W,{language:P,ignoreIllegals:!0}):p(W);S.innerHTML=O.value,S.dataset.highlighted="yes",h(S,P,O.language),S.result={language:O.language,re:O.relevance,relevance:O.relevance},O.secondBest&&(S.secondBest={language:O.secondBest.language,relevance:O.secondBest.relevance}),U("after:highlightElement",{el:S,result:O,text:W})}function b(S){a=aN(a,S)}let g=()=>{x(),Ca("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){x(),Ca("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let v=!1;function x(){function S(){x()}if(document.readyState==="loading"){v||window.addEventListener("DOMContentLoaded",S,!1),v=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function k(S,A){let P=null;try{P=A(e)}catch(W){if(ts("Language definition for '{}' could not be registered.".replace("{}",S)),o)ts(W);else throw W;P=s}P.name||(P.name=S),t[S]=P,P.rawDefinition=A.bind(null,e),P.aliases&&T(P.aliases,{languageName:S})}function w(S){delete t[S];for(let A of Object.keys(n))n[A]===S&&delete n[A]}function E(){return Object.keys(t)}function _(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function T(S,{languageName:A}){typeof S=="string"&&(S=[S]),S.forEach(P=>{n[P.toLowerCase()]=A})}function C(S){let A=_(S);return A&&!A.disableAutodetect}function H(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=A=>{S["before:highlightBlock"](Object.assign({block:A.el},A))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=A=>{S["after:highlightBlock"](Object.assign({block:A.el},A))})}function K(S){H(S),r.push(S)}function F(S){let A=r.indexOf(S);A!==-1&&r.splice(A,1)}function U(S,A){let P=S;r.forEach(function(W){W[P]&&W[P](A)})}function M(S){return Ca("10.7.0","highlightBlock will be removed entirely in v12.0"),Ca("10.7.0","Please use highlightElement now."),m(S)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:x,highlightElement:m,highlightBlock:M,configure:b,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:w,listLanguages:E,getLanguage:_,registerAliases:T,autoDetection:C,inherit:aN,addPlugin:K,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=aF,e.regex={concat:ns,lookahead:dN,either:W1,optional:E9,anyNumberOfTimes:w9};for(let S in pp)typeof pp[S]=="object"&&uN(pp[S]);return Object.assign(e,pp),e},Ta=xN({});Ta.newInstance=()=>xN({});kN.exports=Ta;Ta.HighlightJS=Ta;Ta.default=Ta});var q3=$t((WQ,$3)=>{var iv=!0,U3=!1,H3=!1;$3.exports=function(e,t){t&&(iv=!t.enabled,U3=!!t.label,H3=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function Z7(e,t){return rU(e[t])&&oU(e[t-1])&&iU(e[t-2])&&sU(e[t])}function X7(e,t){if(e.children.unshift(Q7(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),U3)if(H3){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(nU(e.content,n,t))}else e.children.unshift(eU(t)),e.children.push(tU(t))}function Q7(e,t){var n=new t("html_inline","",0),r=iv?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function eU(e){var t=new e("html_inline","",0);return t.content="",t}function nU(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function rU(e){return e.type==="inline"}function oU(e){return e.type==="paragraph_open"}function iU(e){return e.type==="list_item_open"}function sU(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var oO=R(pE());var Lr=R(ge());var Ri=R(ge()),J0;function hE(){return J0||(J0=acquireVsCodeApi()),J0}function mE(){let e=(0,Ri.useRef)(hE()),t=(0,Ri.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,Ri.useCallback)(r=>{let o=i=>{r(i.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,Ri.useEffect)(()=>{e.current=hE()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var Ov=R(ge());var gE=document.createElement("style");gE.textContent=`.button_Button { +"use strict";(()=>{var M3=Object.create;var Jh=Object.defineProperty;var N3=Object.getOwnPropertyDescriptor;var R3=Object.getOwnPropertyNames;var D3=Object.getPrototypeOf,O3=Object.prototype.hasOwnProperty;var $t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xs=(e,t)=>{for(var n in t)Jh(e,n,{get:t[n],enumerable:!0})},P3=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of R3(t))!O3.call(e,o)&&o!==n&&Jh(e,o,{get:()=>t[o],enumerable:!(r=N3(t,o))||r.enumerable});return e};var M=(e,t,n)=>(n=e!=null?M3(D3(e)):{},P3(t||!e||!e.__esModule?Jh(n,"default",{value:e,enumerable:!0}):n,e));var hk=$t(ce=>{"use strict";var Zs=Symbol.for("react.element"),B3=Symbol.for("react.portal"),F3=Symbol.for("react.fragment"),z3=Symbol.for("react.strict_mode"),U3=Symbol.for("react.profiler"),H3=Symbol.for("react.provider"),q3=Symbol.for("react.context"),$3=Symbol.for("react.forward_ref"),V3=Symbol.for("react.suspense"),W3=Symbol.for("react.memo"),G3=Symbol.for("react.lazy"),rk=Symbol.iterator;function K3(e){return e===null||typeof e!="object"?null:(e=rk&&e[rk]||e["@@iterator"],typeof e=="function"?e:null)}var ik={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sk=Object.assign,lk={};function Ei(e,t,n){this.props=e,this.context=t,this.refs=lk,this.updater=n||ik}Ei.prototype.isReactComponent={};Ei.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ei.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uk(){}uk.prototype=Ei.prototype;function Qh(e,t,n){this.props=e,this.context=t,this.refs=lk,this.updater=n||ik}var em=Qh.prototype=new uk;em.constructor=Qh;sk(em,Ei.prototype);em.isPureReactComponent=!0;var ok=Array.isArray,ck=Object.prototype.hasOwnProperty,tm={current:null},dk={key:!0,ref:!0,__self:!0,__source:!0};function fk(e,t,n){var r,o={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)ck.call(t,r)&&!dk.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{"use strict";mk.exports=hk()});var Ek=$t(Me=>{"use strict";function im(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(0>>1;rgc(s,n))lgc(u,s)?(e[r]=u,e[l]=n,r=l):(e[r]=s,e[i]=n,r=i);else if(lgc(u,n))e[r]=u,e[l]=n,r=l;else break e}}return t}function gc(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(gk=performance,Me.unstable_now=function(){return gk.now()}):(rm=Date,bk=rm.now(),Me.unstable_now=function(){return rm.now()-bk});var gk,rm,bk,lr=[],wo=[],Y3=1,Cn=null,Tt=3,yc=!1,ka=!1,Ys=!1,kk=typeof setTimeout=="function"?setTimeout:null,vk=typeof clearTimeout=="function"?clearTimeout:null,xk=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function sm(e){for(var t=Kn(wo);t!==null;){if(t.callback===null)xc(wo);else if(t.startTime<=e)xc(wo),t.sortIndex=t.expirationTime,im(lr,t);else break;t=Kn(wo)}}function lm(e){if(Ys=!1,sm(e),!ka)if(Kn(lr)!==null)ka=!0,cm(um);else{var t=Kn(wo);t!==null&&dm(lm,t.startTime-e)}}function um(e,t){ka=!1,Ys&&(Ys=!1,vk(Qs),Qs=-1),yc=!0;var n=Tt;try{for(sm(t),Cn=Kn(lr);Cn!==null&&(!(Cn.expirationTime>t)||e&&!Sk());){var r=Cn.callback;if(typeof r=="function"){Cn.callback=null,Tt=Cn.priorityLevel;var o=r(Cn.expirationTime<=t);t=Me.unstable_now(),typeof o=="function"?Cn.callback=o:Cn===Kn(lr)&&xc(lr),sm(t)}else xc(lr);Cn=Kn(lr)}if(Cn!==null)var a=!0;else{var i=Kn(wo);i!==null&&dm(lm,i.startTime-t),a=!1}return a}finally{Cn=null,Tt=n,yc=!1}}var kc=!1,bc=null,Qs=-1,Ck=5,wk=-1;function Sk(){return!(Me.unstable_now()-wke||125r?(e.sortIndex=n,im(wo,e),Kn(lr)===null&&e===Kn(wo)&&(Ys?(vk(Qs),Qs=-1):Ys=!0,dm(lm,n-r))):(e.sortIndex=o,im(lr,e),ka||yc||(ka=!0,cm(um))),e};Me.unstable_shouldYield=Sk;Me.unstable_wrapCallback=function(e){var t=Tt;return function(){var n=Tt;Tt=t;try{return e.apply(this,arguments)}finally{Tt=n}}}});var Ik=$t((G$,Lk)=>{"use strict";Lk.exports=Ek()});var Mw=$t(gn=>{"use strict";var Q3=pe(),hn=Ik();function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dm=Object.prototype.hasOwnProperty,eR=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_k={},Ak={};function tR(e){return Dm.call(Ak,e)?!0:Dm.call(_k,e)?!1:eR.test(e)?Ak[e]=!0:(_k[e]=!0,!1)}function nR(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rR(e,t,n,r){if(t===null||typeof t>"u"||nR(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kt(e,t,n,r,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var vt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vt[e]=new Kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vt[t]=new Kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vt[e]=new Kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vt[e]=new Kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){vt[e]=new Kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vt[e]=new Kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vt[e]=new Kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vt[e]=new Kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vt[e]=new Kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var E0=/[\-:]([a-z])/g;function L0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(E0,L0);vt[t]=new Kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(E0,L0);vt[t]=new Kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(E0,L0);vt[t]=new Kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vt[e]=new Kt(e,1,!1,e.toLowerCase(),null,!1,!1)});vt.xlinkHref=new Kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vt[e]=new Kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function I0(e,t,n,r){var o=vt.hasOwnProperty(t)?vt[t]:null;(o!==null?o.type!==0:r||!(2s||o[i]!==a[s]){var l=` +`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{pm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ll(e):""}function oR(e){switch(e.tag){case 5:return ll(e.type);case 16:return ll("Lazy");case 13:return ll("Suspense");case 19:return ll("SuspenseList");case 0:case 2:case 15:return e=hm(e.type,!1),e;case 11:return e=hm(e.type.render,!1),e;case 1:return e=hm(e.type,!0),e;default:return""}}function Fm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ai:return"Fragment";case _i:return"Portal";case Om:return"Profiler";case _0:return"StrictMode";case Pm:return"Suspense";case Bm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Pv:return(e.displayName||"Context")+".Consumer";case Ov:return(e._context.displayName||"Context")+".Provider";case A0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T0:return t=e.displayName||null,t!==null?t:Fm(e.type)||"Memo";case Eo:t=e._payload,e=e._init;try{return Fm(e(t))}catch{}}return null}function aR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fm(t);case 8:return t===_0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function zo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function iR(e){var t=Fv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cc(e){e._valueTracker||(e._valueTracker=iR(e))}function zv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function zm(e,t){var n=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Mk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Uv(e,t){t=t.checked,t!=null&&I0(e,"checked",t,!1)}function Um(e,t){Uv(e,t);var n=zo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Hm(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hm(e,t.type,zo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Nk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Hm(e,t,n){(t!=="number"||Zc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ul=Array.isArray;function Ui(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=wc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sR=["Webkit","ms","Moz","O"];Object.keys(fl).forEach(function(e){sR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fl[t]=fl[e]})});function Vv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fl.hasOwnProperty(e)&&fl[e]?(""+t).trim():t+"px"}function Wv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Vv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var lR=$e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vm(e,t){if(t){if(lR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Wm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gm=null;function M0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Km=null,Hi=null,qi=null;function Ok(e){if(e=Ul(e)){if(typeof Km!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Sd(t),Km(e.stateNode,e.type,t))}}function Gv(e){Hi?qi?qi.push(e):qi=[e]:Hi=e}function Kv(){if(Hi){var e=Hi,t=qi;if(qi=Hi=null,Ok(e),t)for(e=0;e>>=0,e===0?32:31-(yR(e)/kR|0)|0}var Sc=64,Ec=4194304;function cl(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ed(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~o;s!==0?r=cl(s):(a&=i,a!==0&&(r=cl(a)))}else i=n&~o,i!==0?r=cl(i):a!==0&&(r=cl(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function SR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=hl),Vk=" ",Wk=!1;function pC(e,t){switch(e){case"keyup":return YR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ti=!1;function eD(e,t){switch(e){case"compositionend":return hC(t);case"keypress":return t.which!==32?null:(Wk=!0,Vk);case"textInput":return e=t.data,e===Vk&&Wk?null:e;default:return null}}function tD(e,t){if(Ti)return e==="compositionend"||!z0&&pC(e,t)?(e=dC(),Hc=P0=Ao=null,Ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jk(n)}}function xC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yC(){for(var e=window,t=Zc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zc(e.document)}return t}function U0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function cD(e){var t=yC(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xC(n.ownerDocument.documentElement,n)){if(r!==null&&U0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=r.end===void 0?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=Xk(n,a);var i=Xk(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Mi=null,Qm=null,gl=null,e0=!1;function Zk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;e0||Mi==null||Mi!==Zc(r)||(r=Mi,"selectionStart"in r&&U0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gl&&_l(gl,r)||(gl=r,r=rd(Qm,"onSelect"),0Di||(e.current=i0[Di],i0[Di]=null,Di--)}function Ne(e,t){Di++,i0[Di]=e.current,e.current=t}var Uo={},Dt=qo(Uo),nn=qo(!1),_a=Uo;function Ki(e,t){var n=e.type.contextTypes;if(!n)return Uo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in n)o[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function rn(e){return e=e.childContextTypes,e!=null}function ad(){De(nn),De(Dt)}function av(e,t,n){if(Dt.current!==Uo)throw Error(D(168));Ne(Dt,t),Ne(nn,n)}function _C(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,aR(e)||"Unknown",o));return $e({},n,r)}function id(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Uo,_a=Dt.current,Ne(Dt,e),Ne(nn,nn.current),!0}function iv(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=_C(e,t,_a),r.__reactInternalMemoizedMergedChildContext=e,De(nn),De(Dt),Ne(Dt,e)):De(nn),Ne(nn,n)}var zr=null,Ed=!1,Em=!1;function AC(e){zr===null?zr=[e]:zr.push(e)}function kD(e){Ed=!0,AC(e)}function $o(){if(!Em&&zr!==null){Em=!0;var e=0,t=Se;try{var n=zr;for(Se=1;e>=i,o-=i,Ur=1<<32-Yn(t)+o|n<S?(I=w,w=null):I=w.sibling;var L=f(g,w,y[S],k);if(L===null){w===null&&(w=I);break}e&&w&&L.alternate===null&&t(g,w),x=a(L,x,S),C===null?v=L:C.sibling=L,C=L,w=I}if(S===y.length)return n(g,w),ze&&va(g,S),v;if(w===null){for(;SS?(I=w,w=null):I=w.sibling;var H=f(g,w,L.value,k);if(H===null){w===null&&(w=I);break}e&&w&&H.alternate===null&&t(g,w),x=a(H,x,S),C===null?v=H:C.sibling=H,C=H,w=I}if(L.done)return n(g,w),ze&&va(g,S),v;if(w===null){for(;!L.done;S++,L=y.next())L=d(g,L.value,k),L!==null&&(x=a(L,x,S),C===null?v=L:C.sibling=L,C=L);return ze&&va(g,S),v}for(w=r(g,w);!L.done;S++,L=y.next())L=p(w,g,S,L.value,k),L!==null&&(e&&L.alternate!==null&&w.delete(L.key===null?S:L.key),x=a(L,x,S),C===null?v=L:C.sibling=L,C=L);return e&&w.forEach(function(K){return t(g,K)}),ze&&va(g,S),v}function b(g,x,y,k){if(typeof y=="object"&&y!==null&&y.type===Ai&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case vc:e:{for(var v=y.key,C=x;C!==null;){if(C.key===v){if(v=y.type,v===Ai){if(C.tag===7){n(g,C.sibling),x=o(C,y.props.children),x.return=g,g=x;break e}}else if(C.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Eo&&uv(v)===C.type){n(g,C.sibling),x=o(C,y.props),x.ref=ol(g,C,y),x.return=g,g=x;break e}n(g,C);break}else t(g,C);C=C.sibling}y.type===Ai?(x=Ia(y.props.children,g.mode,k,y.key),x.return=g,g=x):(k=Xc(y.type,y.key,y.props,null,g.mode,k),k.ref=ol(g,x,y),k.return=g,g=k)}return i(g);case _i:e:{for(C=y.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(g,x.sibling),x=o(x,y.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Rm(y,g.mode,k),x.return=g,g=x}return i(g);case Eo:return C=y._init,b(g,x,C(y._payload),k)}if(ul(y))return h(g,x,y,k);if(el(y))return m(g,x,y,k);Pc(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(g,x.sibling),x=o(x,y),x.return=g,g=x):(n(g,x),x=Nm(y,g.mode,k),x.return=g,g=x),i(g)):n(g,x)}return b}var Xi=RC(!0),DC=RC(!1),ud=qo(null),cd=null,Bi=null,V0=null;function W0(){V0=Bi=cd=null}function G0(e){var t=ud.current;De(ud),e._currentValue=t}function u0(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vi(e,t){cd=e,V0=Bi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(tn=!0),e.firstContext=null)}function In(e){var t=e._currentValue;if(V0!==e)if(e={context:e,memoizedValue:t,next:null},Bi===null){if(cd===null)throw Error(D(308));Bi=e,cd.dependencies={lanes:0,firstContext:e}}else Bi=Bi.next=e;return t}var Sa=null;function K0(e){Sa===null?Sa=[e]:Sa.push(e)}function OC(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,K0(t)):(n.next=o.next,o.next=n),t.interleaved=n,Wr(e,r)}function Wr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Lo=!1;function j0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function PC(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(me&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Wr(e,n)}return o=r.interleaved,o===null?(t.next=t,K0(r)):(t.next=o.next,o.next=t),r.interleaved=t,Wr(e,n)}function $c(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,R0(e,n)}}function cv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?o=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?o=a=t:a=a.next=t}else o=a=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dd(e,t,n,r){var o=e.updateQueue;Lo=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=o.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=$e({},d,f);break e;case 2:Lo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);Ma|=i,e.lanes=i,e.memoizedState=d}}function dv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Im.transition;Im.transition={};try{e(!1),t()}finally{Se=n,Im.transition=r}}function QC(){return _n().memoizedState}function SD(e,t,n){var r=Bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ew(e))tw(t,n);else if(n=OC(e,t,n,r),n!==null){var o=Gt();Qn(n,e,r,o),nw(n,t,r)}}function ED(e,t,n){var r=Bo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ew(e))tw(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,er(s,i)){var l=t.interleaved;l===null?(o.next=o,K0(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=OC(e,t,o,r),n!==null&&(o=Gt(),Qn(n,e,r,o),nw(n,t,r))}}function ew(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function tw(e,t){bl=pd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nw(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,R0(e,n)}}var hd={readContext:In,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useInsertionEffect:Mt,useLayoutEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useMutableSource:Mt,useSyncExternalStore:Mt,useId:Mt,unstable_isNewReconciler:!1},LD={readContext:In,useCallback:function(e,t){return cr().memoizedState=[e,t===void 0?null:t],e},useContext:In,useEffect:pv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wc(4194308,4,jC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wc(4,2,e,t)},useMemo:function(e,t){var n=cr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=SD.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=cr();return e={current:e},t.memoizedState=e},useState:fv,useDebugValue:ng,useDeferredValue:function(e){return cr().memoizedState=e},useTransition:function(){var e=fv(!1),t=e[0];return e=wD.bind(null,e[1]),cr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,o=cr();if(ze){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ft===null)throw Error(D(349));(Ta&30)!==0||UC(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,pv(qC.bind(null,r,a,e),[e]),r.flags|=2048,Pl(9,HC.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=cr(),t=ft.identifierPrefix;if(ze){var n=Hr,r=Ur;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Dl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[dr]=t,e[Ml]=r,fw(e,t,!1,!1),t.stateNode=e;e:{switch(i=Wm(n,r),n){case"dialog":Re("cancel",e),Re("close",e),o=r;break;case"iframe":case"object":case"embed":Re("load",e),o=r;break;case"video":case"audio":for(o=0;oYi&&(t.flags|=128,r=!0,al(a,!1),t.lanes=4194304)}else{if(!r)if(e=fd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),al(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ze)return Nt(t),null}else 2*tt()-a.renderingStartTime>Yi&&n!==1073741824&&(t.flags|=128,r=!0,al(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=tt(),t.sibling=null,n=He.current,Ne(He,r?n&1|2:n&1),t):(Nt(t),null);case 22:case 23:return lg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(dn&1073741824)!==0&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function DD(e,t){switch(q0(t),t.tag){case 1:return rn(t.type)&&ad(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(),De(nn),De(Dt),J0(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Z0(t),null;case 13:if(De(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(He),null;case 4:return Zi(),null;case 10:return G0(t.type._context),null;case 22:case 23:return lg(),null;case 24:return null;default:return null}}var Fc=!1,Rt=!1,OD=typeof WeakSet=="function"?WeakSet:Set,q=null;function Fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function b0(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var Sv=!1;function PD(e,t){if(t0=td,e=yC(),U0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=i+o),d!==a||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=i),f===a&&++c===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(n0={focusedElem:e,selectionRange:n},td=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Xn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(k){Xe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return h=Sv,Sv=!1,h}function xl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&b0(t,n,a)}o=o.next}while(o!==r)}}function _d(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function x0(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function mw(e){var t=e.alternate;t!==null&&(e.alternate=null,mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dr],delete t[Ml],delete t[a0],delete t[xD],delete t[yD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gw(e){return e.tag===5||e.tag===3||e.tag===4}function Ev(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function y0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=od));else if(r!==4&&(e=e.child,e!==null))for(y0(e,t,n),e=e.sibling;e!==null;)y0(e,t,n),e=e.sibling}function k0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(k0(e,t,n),e=e.sibling;e!==null;)k0(e,t,n),e=e.sibling}var yt=null,Zn=!1;function So(e,t,n){for(n=n.child;n!==null;)bw(e,t,n),n=n.sibling}function bw(e,t,n){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(kd,n)}catch{}switch(n.tag){case 5:Rt||Fi(n,t);case 6:var r=yt,o=Zn;yt=null,So(e,t,n),yt=r,Zn=o,yt!==null&&(Zn?(e=yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yt.removeChild(n.stateNode));break;case 18:yt!==null&&(Zn?(e=yt,n=n.stateNode,e.nodeType===8?Sm(e.parentNode,n):e.nodeType===1&&Sm(e,n),Ll(e)):Sm(yt,n.stateNode));break;case 4:r=yt,o=Zn,yt=n.stateNode.containerInfo,Zn=!0,So(e,t,n),yt=r,Zn=o;break;case 0:case 11:case 14:case 15:if(!Rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&((a&2)!==0||(a&4)!==0)&&b0(n,t,i),o=o.next}while(o!==r)}So(e,t,n);break;case 1:if(!Rt&&(Fi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Xe(n,t,s)}So(e,t,n);break;case 21:So(e,t,n);break;case 22:n.mode&1?(Rt=(r=Rt)||n.memoizedState!==null,So(e,t,n),Rt=r):So(e,t,n);break;default:So(e,t,n)}}function Lv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OD),t.forEach(function(r){var o=WD.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function jn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~a}if(r=o,r=tt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FD(r/1960))-r,10e?16:e,To===null)var r=!1;else{if(e=To,To=null,bd=0,(me&6)!==0)throw Error(D(331));var o=me;for(me|=4,q=e.current;q!==null;){var a=q,i=a.child;if((q.flags&16)!==0){var s=a.deletions;if(s!==null){for(var l=0;ltt()-ig?La(e,0):ag|=n),on(e,t)}function Ew(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ec,Ec<<=1,(Ec&130023424)===0&&(Ec=4194304)));var n=Gt();e=Wr(e,t),e!==null&&(Fl(e,t,n),on(e,n))}function VD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ew(e,n)}function WD(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Ew(e,n)}var Lw;Lw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nn.current)tn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return tn=!1,ND(e,t,n);tn=(e.flags&131072)!==0}else tn=!1,ze&&(t.flags&1048576)!==0&&TC(t,ld,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Gc(e,t),e=t.pendingProps;var o=Ki(t,Dt.current);Vi(t,n),o=Q0(null,t,r,e,o,n);var a=eg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rn(r)?(a=!0,id(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,j0(t),o.updater=Id,t.stateNode=o,o._reactInternals=t,d0(t,r,e,n),t=p0(null,t,r,!0,a,n)):(t.tag=0,ze&&a&&H0(t),Wt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Gc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=KD(r),e=Xn(r,e),o){case 0:t=f0(null,t,r,e,n);break e;case 1:t=vv(null,t,r,e,n);break e;case 11:t=yv(null,t,r,e,n);break e;case 14:t=kv(null,t,r,Xn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),f0(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),vv(e,t,r,o,n);case 3:e:{if(uw(t),e===null)throw Error(D(387));r=t.pendingProps,a=t.memoizedState,o=a.element,PC(e,t),dd(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Ji(Error(D(423)),t),t=Cv(e,t,r,n,o);break e}else if(r!==o){o=Ji(Error(D(424)),t),t=Cv(e,t,r,n,o);break e}else for(fn=Do(t.stateNode.containerInfo.firstChild),pn=t,ze=!0,Jn=null,n=DC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ji(),r===o){t=Gr(e,t,n);break e}Wt(e,t,r,n)}t=t.child}return t;case 5:return BC(t),e===null&&l0(t),r=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,r0(r,o)?i=null:a!==null&&r0(r,a)&&(t.flags|=32),lw(e,t),Wt(e,t,i,n),t.child;case 6:return e===null&&l0(t),null;case 13:return cw(e,t,n);case 4:return X0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xi(t,null,r,n):Wt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),yv(e,t,r,o,n);case 7:return Wt(e,t,t.pendingProps,n),t.child;case 8:return Wt(e,t,t.pendingProps.children,n),t.child;case 12:return Wt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ne(ud,r._currentValue),r._currentValue=i,a!==null)if(er(a.value,i)){if(a.children===o.children&&!nn.current){t=Gr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=qr(-1,n&-n),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),u0(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(D(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),u0(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Wt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Vi(t,n),o=In(o),r=r(o),t.flags|=1,Wt(e,t,r,n),t.child;case 14:return r=t.type,o=Xn(r,t.pendingProps),o=Xn(r.type,o),kv(e,t,r,o,n);case 15:return iw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Gc(e,t),t.tag=1,rn(r)?(e=!0,id(t)):e=!1,Vi(t,n),rw(t,r,o),d0(t,r,o,n),p0(null,t,r,!0,e,n);case 19:return dw(e,t,n);case 22:return sw(e,t,n)}throw Error(D(156,t.tag))};function Iw(e,t){return eC(e,t)}function GD(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(e,t,n,r){return new GD(e,t,n,r)}function cg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function KD(e){if(typeof e=="function")return cg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===A0)return 11;if(e===T0)return 14}return 2}function Fo(e,t){var n=e.alternate;return n===null?(n=En(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xc(e,t,n,r,o,a){var i=2;if(r=e,typeof e=="function")cg(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ai:return Ia(n.children,o,a,t);case _0:i=8,o|=8;break;case Om:return e=En(12,n,t,o|2),e.elementType=Om,e.lanes=a,e;case Pm:return e=En(13,n,t,o),e.elementType=Pm,e.lanes=a,e;case Bm:return e=En(19,n,t,o),e.elementType=Bm,e.lanes=a,e;case Bv:return Td(n,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ov:i=10;break e;case Pv:i=9;break e;case A0:i=11;break e;case T0:i=14;break e;case Eo:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=En(i,n,t,o),t.elementType=e,t.type=r,t.lanes=a,t}function Ia(e,t,n,r){return e=En(7,e,r,t),e.lanes=n,e}function Td(e,t,n,r){return e=En(22,e,r,t),e.elementType=Bv,e.lanes=n,e.stateNode={isHidden:!1},e}function Nm(e,t,n){return e=En(6,e,null,t),e.lanes=n,e}function Rm(e,t,n){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jD(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gm(0),this.expirationTimes=gm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gm(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,a,i,s,l){return e=new jD(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=En(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},j0(a),e}function XD(e,t,n){var r=3{"use strict";function Nw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nw)}catch{}}Nw(),Rw.exports=Mw()});var Ow=$t(mg=>{"use strict";var Dw=ts();mg.createRoot=Dw.createRoot,mg.hydrateRoot=Dw.hydrateRoot;var X$});var Vw=$t(Fd=>{"use strict";var gO=pe(),bO=Symbol.for("react.element"),xO=Symbol.for("react.fragment"),yO=Object.prototype.hasOwnProperty,kO=gO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vO={key:!0,ref:!0,__self:!0,__source:!0};function $w(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)yO.call(t,r)&&!vO.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:bO,type:e,key:a,ref:i,props:o,_owner:kO.current}}Fd.Fragment=xO;Fd.jsx=$w;Fd.jsxs=$w});var G=$t((eW,Ww)=>{"use strict";Ww.exports=Vw()});var Qw=$t(Yw=>{"use strict";var ls=pe();function CO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wO=typeof Object.is=="function"?Object.is:CO,SO=ls.useState,EO=ls.useEffect,LO=ls.useLayoutEffect,IO=ls.useDebugValue;function _O(e,t){var n=t(),r=SO({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return LO(function(){o.value=n,o.getSnapshot=t,kg(o)&&a({inst:o})},[e,n,t]),EO(function(){return kg(o)&&a({inst:o}),e(function(){kg(o)&&a({inst:o})})},[e]),IO(n),n}function kg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wO(e,n)}catch{return!0}}function AO(e,t){return t()}var TO=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?AO:_O;Yw.useSyncExternalStore=ls.useSyncExternalStore!==void 0?ls.useSyncExternalStore:TO});var zd=$t((bW,eS)=>{"use strict";eS.exports=Qw()});var vL=$t(kL=>{"use strict";var Ff=pe(),PF=zd();function BF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FF=typeof Object.is=="function"?Object.is:BF,zF=PF.useSyncExternalStore,UF=Ff.useRef,HF=Ff.useEffect,qF=Ff.useMemo,$F=Ff.useDebugValue;kL.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var a=UF(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=qF(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&i.hasValue){var h=i.value;if(o(h,p))return d=h}return d=p}if(h=d,FF(c,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(c=p,h):(c=p,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var s=zF(e,a[0],a[1]);return HF(function(){i.hasValue=!0,i.value=s},[s]),$F(s),s}});var wL=$t((NK,CL)=>{"use strict";CL.exports=vL()});var W_=$t((RZ,V_)=>{function N_(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&N_(n)}),e}var Dp=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function R_(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function da(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var lz="",L_=e=>!!e.scope,uz=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},ux=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=R_(t)}openNode(t){if(!L_(t))return;let n=uz(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){L_(t)&&(this.buffer+=lz)}value(){return this.buffer}span(t){this.buffer+=``}},I_=(e={})=>{let t={children:[]};return Object.assign(t,e),t},cx=class e{constructor(){this.rootNode=I_(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=I_({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},dx=class extends cx{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new ux(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Hu(e){return e?typeof e=="string"?e:e.source:null}function D_(e){return ii("(?=",e,")")}function cz(e){return ii("(?:",e,")*")}function dz(e){return ii("(?:",e,")?")}function ii(...e){return e.map(n=>Hu(n)).join("")}function fz(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function px(...e){return"("+(fz(e).capture?"":"?:")+e.map(r=>Hu(r)).join("|")+")"}function O_(e){return new RegExp(e.toString()+"|").exec("").length-1}function pz(e,t){let n=e&&e.exec(t);return n&&n.index===0}var hz=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function hx(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,a=Hu(r),i="";for(;a.length>0;){let s=hz.exec(a);if(!s){i+=a;break}i+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?i+="\\"+String(Number(s[1])+o):(i+=s[0],s[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(t)}var mz=/\b\B/,P_="[a-zA-Z]\\w*",mx="[a-zA-Z_]\\w*",B_="\\b\\d+(\\.\\d+)?",F_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z_="\\b(0b[01]+)",gz="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",bz=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=ii(t,/.*\b/,e.binary,/\b.*/)),da({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},qu={begin:"\\\\[\\s\\S]",relevance:0},xz={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[qu]},yz={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[qu]},kz={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Pp=function(e,t,n={}){let r=da({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=px("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ii(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},vz=Pp("//","$"),Cz=Pp("/\\*","\\*/"),wz=Pp("#","$"),Sz={scope:"number",begin:B_,relevance:0},Ez={scope:"number",begin:F_,relevance:0},Lz={scope:"number",begin:z_,relevance:0},Iz={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[qu,{begin:/\[/,end:/\]/,relevance:0,contains:[qu]}]},_z={scope:"title",begin:P_,relevance:0},Az={scope:"title",begin:mx,relevance:0},Tz={begin:"\\.\\s*"+mx,relevance:0},Mz=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},Rp=Object.freeze({__proto__:null,APOS_STRING_MODE:xz,BACKSLASH_ESCAPE:qu,BINARY_NUMBER_MODE:Lz,BINARY_NUMBER_RE:z_,COMMENT:Pp,C_BLOCK_COMMENT_MODE:Cz,C_LINE_COMMENT_MODE:vz,C_NUMBER_MODE:Ez,C_NUMBER_RE:F_,END_SAME_AS_BEGIN:Mz,HASH_COMMENT_MODE:wz,IDENT_RE:P_,MATCH_NOTHING_RE:mz,METHOD_GUARD:Tz,NUMBER_MODE:Sz,NUMBER_RE:B_,PHRASAL_WORDS_MODE:kz,QUOTE_STRING_MODE:yz,REGEXP_MODE:Iz,RE_STARTERS_RE:gz,SHEBANG:bz,TITLE_MODE:_z,UNDERSCORE_IDENT_RE:mx,UNDERSCORE_TITLE_MODE:Az});function Nz(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Rz(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Dz(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Nz,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Oz(e,t){Array.isArray(e.illegal)&&(e.illegal=px(...e.illegal))}function Pz(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Bz(e,t){e.relevance===void 0&&(e.relevance=1)}var Fz=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=ii(n.beforeMatch,D_(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},zz=["of","and","for","in","not","or","if","then","parent","list","value"],Uz="keyword";function U_(e,t,n=Uz){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(a){Object.assign(r,U_(e[a],t,a))}),r;function o(a,i){t&&(i=i.map(s=>s.toLowerCase())),i.forEach(function(s){let l=s.split("|");r[l[0]]=[a,Hz(l[0],l[1])]})}}function Hz(e,t){return t?Number(t):qz(e)?0:1}function qz(e){return zz.includes(e.toLowerCase())}var __={},ai=e=>{},A_=(e,...t)=>{},Ns=(e,t)=>{__[`${e}/${t}`]||(__[`${e}/${t}`]=!0)},Op=new Error;function H_(e,t,{key:n}){let r=0,o=e[n],a={},i={};for(let s=1;s<=t.length;s++)i[s+r]=o[s],a[s+r]=!0,r+=O_(t[s-1]);e[n]=i,e[n]._emit=a,e[n]._multi=!0}function $z(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ai("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Op;if(typeof e.beginScope!="object"||e.beginScope===null)throw ai("beginScope must be object"),Op;H_(e,e.begin,{key:"beginScope"}),e.begin=hx(e.begin,{joinWith:""})}}function Vz(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ai("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Op;if(typeof e.endScope!="object"||e.endScope===null)throw ai("endScope must be object"),Op;H_(e,e.end,{key:"endScope"}),e.end=hx(e.end,{joinWith:""})}}function Wz(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Gz(e){Wz(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),$z(e),Vz(e)}function Kz(e){function t(i,s){return new RegExp(Hu(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=O_(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let s=this.regexes.map(l=>l[1]);this.matcherRe=t(hx(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(s);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];let l=new n;return this.rules.slice(s).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(s);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(i){let s=new r;return i.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),i.terminatorEnd&&s.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&s.addRule(i.illegal,{type:"illegal"}),s}function a(i,s){let l=i;if(i.isCompiled)return l;[Rz,Pz,Gz,Fz].forEach(c=>c(i,s)),e.compilerExtensions.forEach(c=>c(i,s)),i.__beforeBegin=null,[Dz,Oz,Bz].forEach(c=>c(i,s)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=U_(i.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),s&&(i.begin||(i.begin=/\B|\b/),l.beginRe=t(l.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(l.endRe=t(l.end)),l.terminatorEnd=Hu(l.end)||"",i.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+s.terminatorEnd)),i.illegal&&(l.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(c){return jz(c==="self"?i:c)})),i.contains.forEach(function(c){a(c,l)}),i.starts&&a(i.starts,s),l.matcher=o(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=da(e.classNameAliases||{}),a(e)}function q_(e){return e?e.endsWithParent||q_(e.starts):!1}function jz(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return da(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:q_(e)?da(e,{starts:e.starts?da(e.starts):null}):Object.isFrozen(e)?da(e):e}var Xz="11.11.1",fx=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},lx=R_,T_=da,M_=Symbol("nomatch"),Zz=7,$_=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,a="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]},s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:dx};function l(E){return s.noHighlightRe.test(E)}function u(E){let A=E.className+" ";A+=E.parentNode?E.parentNode.className:"";let P=s.languageDetectRe.exec(A);if(P){let W=S(P[1]);return W||(A_(a.replace("{}",P[1])),A_("Falling back to no-highlight mode for this block.",E)),W?P[1]:"no-highlight"}return A.split(/\s+/).find(W=>l(W)||S(W))}function c(E,A,P){let W="",N="";typeof A=="object"?(W=E,P=A.ignoreIllegals,N=A.language):(Ns("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ns("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),N=E,W=A),P===void 0&&(P=!0);let le={code:W,language:N};U("before:highlight",le);let Ce=le.result?le.result:d(le.language,le.code,P);return Ce.code=le.code,U("after:highlight",Ce),Ce}function d(E,A,P,W){let N=Object.create(null);function le(z,Y){return z.keywords[Y]}function Ce(){if(!ne.keywords){xt.addText(Te);return}let z=0;ne.keywordPatternRe.lastIndex=0;let Y=ne.keywordPatternRe.exec(Te),ue="";for(;Y;){ue+=Te.substring(z,Y.index);let we=vn.case_insensitive?Y[0].toLowerCase():Y[0],At=le(ne,we);if(At){let[Br,A3]=At;if(xt.addText(ue),ue="",N[we]=(N[we]||0)+1,N[we]<=Zz&&(fc+=A3),Br.startsWith("_"))ue+=Y[0];else{let T3=vn.classNameAliases[Br]||Br;_t(Y[0],T3)}}else ue+=Y[0];z=ne.keywordPatternRe.lastIndex,Y=ne.keywordPatternRe.exec(Te)}ue+=Te.substring(z),xt.addText(ue)}function It(){if(Te==="")return;let z=null;if(typeof ne.subLanguage=="string"){if(!t[ne.subLanguage]){xt.addText(Te);return}z=d(ne.subLanguage,Te,!0,dc[ne.subLanguage]),dc[ne.subLanguage]=z._top}else z=p(Te,ne.subLanguage.length?ne.subLanguage:null);ne.relevance>0&&(fc+=z.relevance),xt.__addSublanguage(z._emitter,z.language)}function je(){ne.subLanguage!=null?It():Ce(),Te=""}function _t(z,Y){z!==""&&(xt.startScope(Y),xt.addText(z),xt.endScope())}function vo(z,Y){let ue=1,we=Y.length-1;for(;ue<=we;){if(!z._emit[ue]){ue++;continue}let At=vn.classNameAliases[z[ue]]||z[ue],Br=Y[ue];At?_t(Br,At):(Te=Br,Ce(),Te=""),ue++}}function uc(z,Y){return z.scope&&typeof z.scope=="string"&&xt.openNode(vn.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(_t(Te,vn.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Te=""):z.beginScope._multi&&(vo(z.beginScope,Y),Te="")),ne=Object.create(z,{parent:{value:ne}}),ne}function js(z,Y,ue){let we=pz(z.endRe,ue);if(we){if(z["on:end"]){let At=new Dp(z);z["on:end"](Y,At),At.isMatchIgnored&&(we=!1)}if(we){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return js(z.parent,Y,ue)}function Wh(z){return ne.matcher.regexIndex===0?(Te+=z[0],1):(Zh=!0,0)}function Gh(z){let Y=z[0],ue=z.rule,we=new Dp(ue),At=[ue.__beforeBegin,ue["on:begin"]];for(let Br of At)if(Br&&(Br(z,we),we.isMatchIgnored))return Wh(Y);return ue.skip?Te+=Y:(ue.excludeBegin&&(Te+=Y),je(),!ue.returnBegin&&!ue.excludeBegin&&(Te=Y)),uc(ue,z),ue.returnBegin?0:Y.length}function Kh(z){let Y=z[0],ue=A.substring(z.index),we=js(ne,z,ue);if(!we)return M_;let At=ne;ne.endScope&&ne.endScope._wrap?(je(),_t(Y,ne.endScope._wrap)):ne.endScope&&ne.endScope._multi?(je(),vo(ne.endScope,z)):At.skip?Te+=Y:(At.returnEnd||At.excludeEnd||(Te+=Y),je(),At.excludeEnd&&(Te=Y));do ne.scope&&xt.closeNode(),!ne.skip&&!ne.subLanguage&&(fc+=ne.relevance),ne=ne.parent;while(ne!==we.parent);return we.starts&&uc(we.starts,z),At.returnEnd?0:Y.length}function jh(){let z=[];for(let Y=ne;Y!==vn;Y=Y.parent)Y.scope&&z.unshift(Y.scope);z.forEach(Y=>xt.openNode(Y))}let Si={};function cc(z,Y){let ue=Y&&Y[0];if(Te+=z,ue==null)return je(),0;if(Si.type==="begin"&&Y.type==="end"&&Si.index===Y.index&&ue===""){if(Te+=A.slice(Y.index,Y.index+1),!o){let we=new Error(`0 width match regex (${E})`);throw we.languageName=E,we.badRule=Si.rule,we}return 1}if(Si=Y,Y.type==="begin")return Gh(Y);if(Y.type==="illegal"&&!P){let we=new Error('Illegal lexeme "'+ue+'" for mode "'+(ne.scope||"")+'"');throw we.mode=ne,we}else if(Y.type==="end"){let we=Kh(Y);if(we!==M_)return we}if(Y.type==="illegal"&&ue==="")return Te+=` +`,1;if(Xh>1e5&&Xh>Y.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Te+=ue,ue.length}let vn=S(E);if(!vn)throw ai(a.replace("{}",E)),new Error('Unknown language: "'+E+'"');let _e=Kz(vn),Co="",ne=W||_e,dc={},xt=new s.__emitter(s);jh();let Te="",fc=0,ya=0,Xh=0,Zh=!1;try{if(vn.__emitTokens)vn.__emitTokens(A,xt);else{for(ne.matcher.considerAll();;){Xh++,Zh?Zh=!1:ne.matcher.considerAll(),ne.matcher.lastIndex=ya;let z=ne.matcher.exec(A);if(!z)break;let Y=A.substring(ya,z.index),ue=cc(Y,z);ya=z.index+ue}cc(A.substring(ya))}return xt.finalize(),Co=xt.toHTML(),{language:E,value:Co,relevance:fc,illegal:!1,_emitter:xt,_top:ne}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:E,value:lx(A),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:ya,context:A.slice(ya-100,ya+100),mode:z.mode,resultSoFar:Co},_emitter:xt};if(o)return{language:E,value:lx(A),illegal:!1,relevance:0,errorRaised:z,_emitter:xt,_top:ne};throw z}}function f(E){let A={value:lx(E),illegal:!1,relevance:0,_top:i,_emitter:new s.__emitter(s)};return A._emitter.addText(E),A}function p(E,A){A=A||s.languages||Object.keys(t);let P=f(E),W=A.filter(S).filter(L).map(je=>d(je,E,!1));W.unshift(P);let N=W.sort((je,_t)=>{if(je.relevance!==_t.relevance)return _t.relevance-je.relevance;if(je.language&&_t.language){if(S(je.language).supersetOf===_t.language)return 1;if(S(_t.language).supersetOf===je.language)return-1}return 0}),[le,Ce]=N,It=le;return It.secondBest=Ce,It}function h(E,A,P){let W=A&&n[A]||P;E.classList.add("hljs"),E.classList.add(`language-${W}`)}function m(E){let A=null,P=u(E);if(l(P)||(U("before:highlightElement",{el:E,language:P}),E.dataset.highlighted))return;if(E.children.length>0&&(s.ignoreUnescapedHTML,s.throwUnescapedHTML))throw new fx("One of your code blocks includes unescaped HTML.",E.innerHTML);A=E;let W=A.textContent,N=P?c(W,{language:P,ignoreIllegals:!0}):p(W);E.innerHTML=N.value,E.dataset.highlighted="yes",h(E,P,N.language),E.result={language:N.language,re:N.relevance,relevance:N.relevance},N.secondBest&&(E.secondBest={language:N.secondBest.language,relevance:N.secondBest.relevance}),U("after:highlightElement",{el:E,result:N,text:W})}function b(E){s=T_(s,E)}let g=()=>{k(),Ns("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){k(),Ns("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function k(){function E(){k()}if(document.readyState==="loading"){y||window.addEventListener("DOMContentLoaded",E,!1),y=!0;return}document.querySelectorAll(s.cssSelector).forEach(m)}function v(E,A){let P=null;try{P=A(e)}catch(W){if(ai("Language definition for '{}' could not be registered.".replace("{}",E)),o)ai(W);else throw W;P=i}P.name||(P.name=E),t[E]=P,P.rawDefinition=A.bind(null,e),P.aliases&&I(P.aliases,{languageName:E})}function C(E){delete t[E];for(let A of Object.keys(n))n[A]===E&&delete n[A]}function w(){return Object.keys(t)}function S(E){return E=(E||"").toLowerCase(),t[E]||t[n[E]]}function I(E,{languageName:A}){typeof E=="string"&&(E=[E]),E.forEach(P=>{n[P.toLowerCase()]=A})}function L(E){let A=S(E);return A&&!A.disableAutodetect}function H(E){E["before:highlightBlock"]&&!E["before:highlightElement"]&&(E["before:highlightElement"]=A=>{E["before:highlightBlock"](Object.assign({block:A.el},A))}),E["after:highlightBlock"]&&!E["after:highlightElement"]&&(E["after:highlightElement"]=A=>{E["after:highlightBlock"](Object.assign({block:A.el},A))})}function K(E){H(E),r.push(E)}function F(E){let A=r.indexOf(E);A!==-1&&r.splice(A,1)}function U(E,A){let P=E;r.forEach(function(W){W[P]&&W[P](A)})}function T(E){return Ns("10.7.0","highlightBlock will be removed entirely in v12.0"),Ns("10.7.0","Please use highlightElement now."),m(E)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:k,highlightElement:m,highlightBlock:T,configure:b,initHighlighting:g,initHighlightingOnLoad:x,registerLanguage:v,unregisterLanguage:C,listLanguages:w,getLanguage:S,registerAliases:I,autoDetection:L,inherit:T_,addPlugin:K,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=Xz,e.regex={concat:ii,lookahead:D_,either:px,optional:dz,anyNumberOfTimes:cz};for(let E in Rp)typeof Rp[E]=="object"&&N_(Rp[E]);return Object.assign(e,Rp),e},Rs=$_({});Rs.newInstance=()=>$_({});V_.exports=Rs;Rs.HighlightJS=Rs;Rs.default=Rs});var fM=$t((Rte,dM)=>{var Iy=!0,uM=!1,cM=!1;dM.exports=function(e,t){t&&(Iy=!t.enabled,uM=!!t.label,cM=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o=0;r--)if(e[r].level===n)return r;return-1}function z7(e,t){return W7(e[t])&&G7(e[t-1])&&K7(e[t-2])&&j7(e[t])}function U7(e,t){if(e.children.unshift(H7(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),uM)if(cM){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(V7(e.content,n,t))}else e.children.unshift(q7(t)),e.children.push($7(t))}function H7(e,t){var n=new t("html_inline","",0),r=Iy?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content=''),n}function q7(e){var t=new e("html_inline","",0);return t.content="",t}function V7(e,t,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:t}],r}function W7(e){return e.type==="inline"}function G7(e){return e.type==="paragraph_open"}function K7(e){return e.type==="list_item_open"}function j7(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var I3=M(Ow());var Pr=M(pe());var Oa=M(pe()),gg;function Pw(){return gg||(gg=acquireVsCodeApi()),gg}function Bw(){let e=(0,Oa.useRef)(Pw()),t=(0,Oa.useCallback)(r=>{e.current.postMessage(r)},[]),n=(0,Oa.useCallback)(r=>{let o=a=>{r(a.data)};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[]);return(0,Oa.useEffect)(()=>{e.current=Pw()},[]),{postMessage:t,onMessage:n,getState:()=>e.current.getState(),setState:r=>e.current.setState(r)}}var ek=M(pe());var Pd=M(pe());var Fw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),bg=e=>{let t=eO(e);return t.charAt(0).toUpperCase()+t.slice(1)},Od=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),zw=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ql=M(pe());var Uw={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"};var Hw=(0,ql.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>(0,ql.createElement)("svg",{ref:l,...Uw,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Od("lucide",o),...!a&&!zw(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,ql.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var ye=(e,t)=>{let n=(0,Pd.forwardRef)(({className:r,...o},a)=>(0,Pd.createElement)(Hw,{ref:a,iconNode:t,className:Od(`lucide-${Fw(bg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=bg(e),n};var tO=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$l=ye("arrow-down",tO);var nO=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Vo=ye("arrow-right",nO);var rO=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vl=ye("arrow-up",rO);var oO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Wl=ye("check",oO);var aO=[["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"}]],Gl=ye("external-link",aO);var iO=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ns=ye("folder-open",iO);var sO=[["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"}]],Wo=ye("git-branch",sO);var lO=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],rs=ye("git-pull-request",lO);var uO=[["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"}]],Kl=ye("lightbulb",uO);var cO=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],jl=ye("message-square",cO);var dO=[["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"}]],Xl=ye("pencil",dO);var fO=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zl=ye("plus",fO);var pO=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Jl=ye("trash-2",pO);var hO=[["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"}]],Go=ye("triangle-alert",hO);var mO=[["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"}]],Yl=ye("user",mO);var qw=document.createElement("style");qw.textContent=`.button_Button { padding: 8px 16px; border-radius: 4px; border: 1px solid transparent; @@ -40,7 +40,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),O=S,W=A),P===void 0&&( background-color: #45494e; } -`;document.head.appendChild(gE);var yd={button:"button_Button",primary:"primary_Button",secondary:"secondary_Button"};var xE=R(j()),qo=({variant:e="primary",children:t,className:n,...r})=>{let o=e==="secondary"?yd.secondary:yd.primary,i=`${yd.button} ${o} ${n||""}`;return(0,xE.jsx)("button",{className:i,...r,children:t})};var kE=document.createElement("style");kE.textContent=`.container_Input { +`;document.head.appendChild(qw);var Bd={button:"button_Button",primary:"primary_Button",secondary:"secondary_Button"};var Gw=M(G()),Ko=({variant:e="primary",children:t,className:n,...r})=>{let o=e==="secondary"?Bd.secondary:Bd.primary,a=`${Bd.button} ${o} ${n||""}`;return(0,Gw.jsx)("button",{className:a,...r,children:t})};var Kw=document.createElement("style");Kw.textContent=`.container_Input { margin-bottom: 16px; } @@ -75,7 +75,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),O=S,W=A),P===void 0&&( margin-top: 4px; } -`;document.head.appendChild(kE);var wE=R(j());var EE=document.createElement("style");EE.textContent=`.container_Select { +`;document.head.appendChild(Kw);var jw=M(G());var Xw=document.createElement("style");Xw.textContent=`.container_Select { margin-bottom: 16px; } @@ -111,7 +111,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),O=S,W=A),P===void 0&&( margin-top: 4px; } -`;document.head.appendChild(EE);var Pl={container:"container_Select",label:"label_Select",select:"select_Select",hint:"hint_Select"};var Oi=R(j()),Z0=({label:e,hint:t,options:n,children:r,className:o,...i})=>(0,Oi.jsxs)("div",{className:Pl.container,children:[e&&(0,Oi.jsx)("label",{className:Pl.label,children:e}),(0,Oi.jsx)("select",{className:`${Pl.select} ${o||""}`,...i,children:n?n.map(s=>(0,Oi.jsx)("option",{value:s.value,children:s.label},s.value)):r}),t&&(0,Oi.jsx)("div",{className:Pl.hint,children:t})]});var _E=document.createElement("style");_E.textContent=`.container_TextArea { +`;document.head.appendChild(Xw);var Ql={container:"container_Select",label:"label_Select",select:"select_Select",hint:"hint_Select"};var Pa=M(G()),xg=({label:e,hint:t,options:n,children:r,className:o,...a})=>(0,Pa.jsxs)("div",{className:Ql.container,children:[e&&(0,Pa.jsx)("label",{className:Ql.label,children:e}),(0,Pa.jsx)("select",{className:`${Ql.select} ${o||""}`,...a,children:n?n.map(i=>(0,Pa.jsx)("option",{value:i.value,children:i.label},i.value)):r}),t&&(0,Pa.jsx)("div",{className:Ql.hint,children:t})]});var Zw=document.createElement("style");Zw.textContent=`.container_TextArea { margin-bottom: 16px; } @@ -148,7 +148,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),O=S,W=A),P===void 0&&( margin-top: 4px; } -`;document.head.appendChild(_E);var Bl={container:"container_TextArea",label:"label_TextArea",textarea:"textarea_TextArea",hint:"hint_TextArea"};var Qs=R(j()),X0=({label:e,hint:t,className:n,...r})=>(0,Qs.jsxs)("div",{className:Bl.container,children:[e&&(0,Qs.jsx)("label",{className:Bl.label,children:e}),(0,Qs.jsx)("textarea",{className:`${Bl.textarea} ${n||""}`,...r}),t&&(0,Qs.jsx)("div",{className:Bl.hint,children:t})]});var SE=document.createElement("style");SE.textContent=`.badge_Badge { +`;document.head.appendChild(Zw);var eu={container:"container_TextArea",label:"label_TextArea",textarea:"textarea_TextArea",hint:"hint_TextArea"};var as=M(G()),yg=({label:e,hint:t,className:n,...r})=>(0,as.jsxs)("div",{className:eu.container,children:[e&&(0,as.jsx)("label",{className:eu.label,children:e}),(0,as.jsx)("textarea",{className:`${eu.textarea} ${n||""}`,...r}),t&&(0,as.jsx)("div",{className:eu.hint,children:t})]});var Jw=document.createElement("style");Jw.textContent=`.badge_Badge { display: inline-flex; align-items: center; gap: 4px; @@ -200,19 +200,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`),O=S,W=A),P===void 0&&( background-color: rgba(0, 0, 0, 0.15); } -`;document.head.appendChild(SE);var ea={badge:"badge_Badge",default:"default_Badge",status:"status_Badge",priority:"priority_Badge",removable:"removable_Badge",removeButton:"removeButton_Badge"};var Di=R(j()),ta=({children:e,variant:t="default",color:n,className:r,onRemove:o})=>{let i=ea[t]||ea.default,s=n?{backgroundColor:`${n}20`,color:n,borderColor:`${n}40`}:{};return(0,Di.jsxs)("span",{className:`${ea.badge} ${i} ${o?ea.removable:""} ${r||""}`,style:s,children:[e,o&&(0,Di.jsx)("button",{type:"button",className:ea.removeButton,onClick:a=>{a.stopPropagation(),o()},title:"Remove",children:(0,Di.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Di.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Di.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};var Ua=R(ge());var du=R(ge(),1),ei=R(ge(),1),oC=R(Xs(),1),iC=R(xd(),1),oo=R(j(),1);function It(e){this.content=e}It.prototype={constructor:It,find:function(e){for(var t=0;t>1}};It.from=function(e){if(e instanceof It)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new It(t)};var eg=It;function FE(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=FE(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function zE(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;ut&&r(l,o+a,i||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,o+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?kd(n+1,i):kd(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};fe.none=[];var Pi=class extends Error{},B=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=HE(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(UE(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(N.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new e(t,r,o)}};B.empty=new B(N.empty,0,0);function UE(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(UE(i.content,t-o-1,n-o-1)))}function HE(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=HE(s.content,t-i-1,n,s);return a&&e.replaceChild(o,s.copy(a))}function jI(e,t,n){if(n.openStart>e.depth)throw new Pi("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Pi("Inconsistent open depths");return $E(e,t,n,0)}function $E(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Fl(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Ii(e.nodeAfter,r),i++));for(let a=i;ao&&rg(e,t,o+1),s=r.depth>o&&rg(n,r,o+1),a=[];return Fl(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(qE(i,s),Ii(Li(i,VE(e,t,n,r,o+1)),a)):(i&&Ii(Li(i,_d(e,t,o+1)),a),Fl(t,n,o,a),s&&Ii(Li(s,_d(n,r,o+1)),a)),Fl(r,null,o,a),new N(a)}function _d(e,t,n){let r=[];if(Fl(null,e,n,r),e.depth>n){let o=rg(e,t,n+1);Ii(Li(o,_d(e,t,n+1)),r)}return Fl(t,null,n,r),new N(r)}function KI(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(N.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Sd=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Bi(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,a,o+l),!u||(s=s.child(a),s.isText))break;i=u-1,o+=l+1}return new e(n,r,i)}static resolveCached(t,n){let r=AE.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),WE(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=N.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=N.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};on.prototype.text=void 0;var ig=class e extends on{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):WE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function WE(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Fi=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new sg(t,n);if(r.next==null)return e.empty;let o=jE(r);r.next&&r.err("Unexpected trailing text");let i=n6(t6(o));return r6(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` -`)}};Fi.empty=new Fi(!0);var sg=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function jE(e){let t=[];do t.push(JI(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function JI(e){let t=[];do t.push(ZI(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function ZI(e){let t=e6(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=XI(e,t);else break;return t}function ME(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function XI(e,t){let n=ME(e),r=n;return e.eat(",")&&(e.next!="}"?r=ME(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function QI(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function e6(e){if(e.eat("(")){let t=jE(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=QI(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function t6(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],a);if(l==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c{u||o.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new Fi(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:YE(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new on(this,this.computeAttrs(t),N.from(n),fe.setFrom(r))}createChecked(t=null,n,r){return n=N.from(n),this.checkContent(n),new on(this,this.computeAttrs(t),n,fe.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=N.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(N.empty,!0);return i?new on(this,t,n.append(i),fe.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new e(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function o6(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var ag=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?o6(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},Ul=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=ZE(t,o.attrs),this.excluded=null;let i=GE(this.attrs);this.instance=i?new fe(this,i):null}create(t=null){return!t&&this.instance?this.instance:new fe(this,YE(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new e(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}},Vo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=eg.from(t.nodes),n.marks=eg.from(t.marks||{}),this.nodes=Cd.compile(this.spec.nodes,this),this.marks=Ul.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Fi.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?OE(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:OE(this,s.split(" "))}this.nodeFromJSON=o=>on.fromJSON(this,o),this.markFromJSON=o=>fe.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Cd){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new ig(r,r.defaultAttrs,t,fe.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function OE(e,t){let n=[];for(let r=0;r-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function i6(e){return e.tag!=null}function s6(e){return e.style!=null}var Nn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(i6(o))this.tags.push(o);else if(s6(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Td(this,n,!1);return r.addAll(t,fe.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Td(this,n,!0);return r.addAll(t,fe.none,n.from,n.to),B.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=IE(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=IE(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},XE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},a6={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},QE={ol:!0,ul:!0},Hl=1,lg=2,zl=4;function DE(e,t,n){return t!=null?(t?Hl:0)|(t==="full"?lg:0):e&&e.whitespace=="pre"?Hl|lg:n&~zl}var ra=class{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=fe.none,this.match=i||(s&zl?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Hl)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=N.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!XE.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Td=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=DE(null,n.preserveWhitespace,0)|(r?zl:0);o?i=new ra(o.type,o.attrs,fe.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new ra(null,null,fe.none,!0,null,s):i=new ra(t.schema.topNodeType,null,fe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&lg?"full":this.localPreserveWS||(o.options&Hl)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` -`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}i&&this.sync(a)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=o==null?null:t.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(t);if(u&&(!o||o.length>u.length+a)&&(o=u,i=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(u.type):LE(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new ra(t,n,l,o,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Hl)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let c=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function l6(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&QE.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function u6(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function IE(e){let t={};for(let n in e)t[n]=e[n];return t}function LE(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let l=0;l{if(i.length||s.marks.length){let a=0,l=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&wd(ng(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return wd(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=PE(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return PE(t.marks)}};function PE(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ng(e){return e.document||window.document}var BE=new WeakMap;function c6(e){let t=BE.get(e);return t===void 0&&BE.set(e,t=d6(e)),t}function d6(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=wd(e,f,n,r);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}var n2=65535,r2=Math.pow(2,16);function f6(e,t){return e+t*r2}function e2(e){return e&n2}function p6(e){return(e-(e&n2))/r2}var o2=1,i2=2,Nd=4,s2=8,Vl=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&s2)>0}get deletedBefore(){return(this.delInfo&(o2|Nd))>0}get deletedAfter(){return(this.delInfo&(i2|Nd))>0}get deletedAcross(){return(this.delInfo&Nd)>0}},Gr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=e2(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[a+i],c=this.ranges[a+s],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+o+(f<0?0:c);if(r)return p;let h=t==(n<0?l:d)?null:f6(a/3,t-l),m=t==l?i2:t==d?o2:Nd;return(n<0?t!=l:t!=d)&&(m|=s2),new Vl(p,m,h)}o+=c-u}return r?t+o:new Vl(t+o,0,null)}touches(t,n){let r=0,o=e2(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+i],c=l+u;if(t<=c&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return kt.fromReplace(t,this.from,this.to,i)}invert(){return new Yr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};ft.jsonID("addMark",jl);var Yr=class e extends ft{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new B(hg(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return kt.fromReplace(t,this.from,this.to,r)}invert(){return new jl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};ft.jsonID("removeMark",Yr);var Kl=class e extends ft{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return kt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return kt.fromReplace(t,this.pos,this.pos+1,new B(N.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};ft.jsonID("replaceAround",rt);function fg(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function h6(e,t,n,r){let o=[],i=[],s,a;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let m=0;me.step(l)),i.forEach(l=>e.step(l))}function m6(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof Ul){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let c=0;ce.step(new Yr(s.from,s.to,s.style)))}function mg(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l=0;l--)e.step(s[l])}function g6(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Jr(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,i=0;;--r){let s=e.$from.node(r),a=e.$from.index(r)+o,l=e.$to.indexAfter(r)-i;if(rn;h--)m||r.index(h)>0?(m=!0,c=N.from(r.node(h).copy(c)),d++):l--;let f=N.empty,p=0;for(let h=i,m=!1;h>n;h--)m||o.after(h+1)=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=N.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new rt(o,i,o,i,new B(r,0,0),n.length,!0))}function k6(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&w6(e.doc,e.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&l2(e,s,a,i),mg(e,e.mapping.slice(i).map(a,1),r,void 0,u===null);let c=e.mapping.slice(i),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new rt(d,f,d+1,f-1,new B(N.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&a2(e,s,a,i),!1}})}function a2(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function l2(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` -`))}})}function w6(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function E6(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new rt(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new B(N.from(s),0,0),1,!0))}function gn(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function _6(e,t,n=1,r){let o=e.doc.resolve(t),i=N.empty,s=N.empty;for(let a=o.depth,l=o.depth-n,u=n-1;a>l;a--,u--){i=N.from(o.node(a).copy(i));let c=r&&r[u];s=N.from(c?c.type.create(c.attrs,s):o.node(a).copy(s))}e.step(new Lt(t,t,new B(i.append(s),n,n),!0))}function An(e,t){let n=e.resolve(t),r=n.index();return u2(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S6(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&u2(i,s)&&r.node(o).canReplace(a,a+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function C6(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);l2(e,c.node(),c.before(),a)}s.inlineContent&&mg(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new Lt(u,l.map(t+n,-1),B.empty,!0)),r===!0){let c=e.doc.resolve(u);a2(e,c.node(),c.before(),e.steps.length)}return e}function T6(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(l,l,o);else{let d=u.contentMatchAt(l).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Gl(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return c2(o,i,r)?new Lt(t,n,r):new pg(o,i,r).fit()}function c2(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var pg=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=N.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=N.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new B(i,s,a);return t>-1?new rt(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Lt(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=cg(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(N.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=cg(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=cg(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new B($l(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new B($l(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m1||l==0||m.content.size)&&(d=b,c.push(d2(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let h=u==a.childCount;h||(p=-1),this.placed=ql(this.placed,n,N.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;a--){let{match:l,type:u}=this.frontier[a],c=dg(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ql(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=ql(this.placed,this.depth,N.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(N.empty,!0);n.childCount&&(this.placed=ql(this.placed,this.frontier.length,n))}};function $l(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy($l(e.firstChild.content,t-1,n)))}function ql(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ql(e.lastChild.content,t-1,n)))}function cg(e,t){for(let n=0;n1&&(r=r.replaceChild(0,d2(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(N.empty,!0)))),e.copy(r)}function dg(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!N6(n,i.content,s)?a:null}function N6(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:o.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=A6(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(a)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),n=i.after(p))}}function f2(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(N.empty,!0))}return e}function R6(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=T6(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new B(N.from(r),0,0))}function O6(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=p2(r,o);for(let s=0;s0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function p2(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}var Ad=class e extends ft{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return kt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return kt.fromReplace(t,this.pos,this.pos+1,new B(N.from(o),0,n.isLeaf?0:1))}getMap(){return Gr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};ft.jsonID("attr",Ad);var Md=class e extends ft{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return kt.ok(r)}getMap(){return Gr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};ft.jsonID("docAttr",Md);var ia=class extends Error{};ia=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};ia.prototype=Object.create(Error.prototype);ia.prototype.constructor=ia;ia.prototype.name="TransformError";var Wo=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Wl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new ia(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=B.empty){let o=Gl(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new B(N.from(r),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return M6(this,t,n,r),this}replaceRangeWith(t,n,r){return R6(this,t,n,r),this}deleteRange(t,n){return O6(this,t,n),this}lift(t,n){return b6(this,t,n),this}join(t,n=1){return C6(this,t,n),this}wrap(t,n){return x6(this,t,n),this}setBlockType(t,n=t,r,o=null){return k6(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return E6(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Ad(t,n,r)),this}setDocAttribute(t,n){return this.step(new Md(t,n)),this}addNodeMark(t,n){return this.step(new Kl(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof fe)n.isInSet(r.marks)&&this.step(new oa(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new oa(t,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return _6(this,t,n,r),this}addMark(t,n,r){return h6(this,t,n,r),this}removeMark(t,n,r){return m6(this,t,n,r),this}clearIncompatible(t,n,r){return mg(this,t,n,r),this}};var gg=Object.create(null),J=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new la(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?aa(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):aa(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Kt(t.node(0))}static atStart(t){return aa(t,t,0,0,1)||new Kt(t)}static atEnd(t){return aa(t,t,t.content.size,t.childCount,-1)||new Kt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=gg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in gg)throw new RangeError("Duplicate use of selection JSON ID "+t);return gg[t]=n,n.prototype.jsonID=t,n}getBookmark(){return V.between(this.$anchor,this.$head).getBookmark()}};J.prototype.visible=!0;var la=class{constructor(t,n){this.$from=t,this.$to=n}},h2=!1;function m2(e){!h2&&!e.parent.inlineContent&&(h2=!0)}var V=class e extends J{constructor(t,n=t){m2(t),m2(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return J.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Dd(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=J.findFrom(n,r,!0)||J.findFrom(n,-r,!0);if(i)n=i.$head;else return J.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(J.findFrom(t,-r,!0)||J.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&q.isSelectable(a))return q.create(e,n-(o<0?a.nodeSize:0))}else{let l=aa(e,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function g2(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(J.near(e.doc.resolve(s),n))}var b2=1,Od=2,y2=4,vg=class extends Wo{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Od,this}ensureMarks(t){return fe.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Od)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Od,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||fe.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(J.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=y2,this}get scrolledIntoView(){return(this.updated&y2)>0}};function v2(e,t){return!t||!e?e:e.bind(t)}var Ui=class{constructor(t,n,r){this.name=t,this.init=v2(n.init,r),this.apply=v2(n.apply,r)}},I6=[new Ui("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Ui("selection",{init(e,t){return e.selection||J.atStart(t.doc)},apply(e){return e.selection}}),new Ui("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Ui("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Yl=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=I6.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ui(r.key,r.spec.state,r))})}},Id=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Yl(t.schema,t.plugins),i=new e(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=on.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=J.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(l,t,n[a],i);return}}i[s.name]=s.init(t,i)}}),i}};function x2(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=x2(o,t,{})),n[r]=o}return n}var G=class{constructor(t){this.spec=t,this.props={},t.props&&x2(t.props,this,this.props),this.key=t.key?t.key.key:k2("plugin")}getState(t){return t[this.key]}},bg=Object.create(null);function k2(e){return e in bg?e+"$"+ ++bg[e]:(bg[e]=0,e+"$")}var Q=class{constructor(t="key"){this.key=k2(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var Ld=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function E2(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var kg=(e,t,n)=>{let r=E2(e,n);if(!r)return!1;let o=Eg(r);if(!o){let s=r.blockRange(),a=s&&Jr(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(O2(e,o,t,-1))return!0;if(r.parent.content.size==0&&(ua(i,"end")||q.isSelectable(i)))for(let s=r.depth;;s--){let a=Gl(e.doc,r.before(s),r.after(s),B.empty);if(a&&a.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},_2=(e,t,n)=>{let r=E2(e,n);if(!r)return!1;let o=Eg(r);return o?C2(e,o,t):!1},S2=(e,t,n)=>{let r=T2(e,n);if(!r)return!1;let o=Cg(r);return o?C2(e,o,t):!1};function C2(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let s=t.nodeAfter,a=s,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=Gl(e.doc,i,l,B.empty);if(!u||u.from!=i||u instanceof Lt&&u.slice.size>=l-i)return!1;if(n){let c=e.tr.step(u);c.setSelection(V.create(c.doc,i)),n(c.scrollIntoView())}return!0}function ua(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var wg=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Eg(r)}let s=i&&i.nodeBefore;return!s||!q.isSelectable(s)?!1:(t&&t(e.tr.setSelection(q.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Eg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function T2(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=T2(e,n);if(!r)return!1;let o=Cg(r);if(!o)return!1;let i=o.nodeAfter;if(O2(e,o,t,1))return!0;if(r.parent.content.size==0&&(ua(i,"start")||q.isSelectable(i))){let s=Gl(e.doc,r.before(),r.after(),B.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof q,o;if(r){if(n.node.isTextblock||!An(e.doc,n.from))return!1;o=n.from}else if(o=zi(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(q.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},A2=(e,t)=>{let n=e.selection,r;if(n instanceof q){if(n.node.isTextblock||!An(e.doc,n.to))return!1;r=n.to}else if(r=zi(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},M2=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Jr(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},Tg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function Ng(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Ng(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(J.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Mg=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Kt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Ng(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(gn(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Jr(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function L6(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof q&&t.selection.node.isBlock)return!r.parentOffset||!gn(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,a,l=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),a=Ng(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,l,r);i.unshift(m||(l&&a?{type:a}:null)),s=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof V||t.selection instanceof Kt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=gn(c.doc,d,i.length,i);if(f||(i[0]=a?{type:a}:null,f=gn(c.doc,d,i.length,i)),!f)return!1;if(c.split(d,i.length,i),!l&&u&&r.node(s).type!=a){let p=c.mapping.map(r.before(s)),h=c.doc.resolve(p);a&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,a)&&c.setNodeMarkup(c.mapping.map(r.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}var P6=L6();var R2=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(q.create(e.doc,o))),!0)},B6=(e,t)=>(t&&t(e.tr.setSelection(new Kt(e.doc))),!0);function F6(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||An(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function O2(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&F6(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&a.matchType(s[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,h=N.empty;for(let g=s.length-1;g>=0;g--)h=N.from(s[g].create(null,h));h=N.from(o.copy(h));let m=e.tr.step(new rt(t.pos-1,p,t.pos,p,new B(h,1,0),s.length,!0)),b=m.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&An(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&l?null:J.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Jr(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&ua(i,"start",!0)&&ua(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=i,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=N.empty;for(let v=h.length-1;v>=0;v--)g=N.from(h[v].copy(g));let y=e.tr.step(new rt(t.pos-h.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new B(g,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function D2(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(V.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}var Og=D2(-1),Dg=D2(1);function I2(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&sa(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function Ig(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);i=new Bi(l,l,t.depth),t.endIndex=0;c--)i=N.from(n[c].type.create(n[c].attrs,i));e.step(new rt(t.start-(r?2:0),t.end,t.start,t.end,new B(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?$6(t,n,e,i):q6(t,n,i):!0:!1}}function $6(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);im;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(a?0:1),c+1,s.content.append(l?N.empty:N.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new rt(d-(a?1:0),f+(l?1:0),d+1,f-1,new B((a?N.empty:N.from(o.copy(N.empty))).append(l?N.empty:N.from(o.copy(N.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function B2(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=N.from(u?e.create():null),d=new B(N.from(e.create(null,N.from(a.type.create(null,c)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new rt(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var wt=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},ha=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Hg=null,Xr=function(e,t,n){let r=Hg||(Hg=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},V6=function(){Hg=null},Ki=function(e,t,n,r){return n&&(F2(e,t,n,r,-1)||F2(e,t,n,r,1))},W6=/^(img|br|input|textarea|hr)$/i;function F2(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Rn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||ru(e)||W6.test(e.nodeName)||e.contentEditable=="false")return!1;t=wt(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?Rn(e):0}else return!1}}function Rn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function j6(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Rn(e)}else if(e.parentNode&&!ru(e))t=wt(e),e=e.parentNode;else return null}}function K6(e,t){for(;;){if(e.nodeType==3&&t2),Mn=ma||(pr?/Mac/.test(pr.platform):!1),v_=pr?/Win/.test(pr.platform):!1,Qr=/Android \d/.test(Xo),ou=!!z2&&"webkitFontSmoothing"in z2.documentElement.style,Z6=ou?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function X6(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Zr(e,t){return typeof e=="number"?e:e[t]}function Q6(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function U2(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=ha(s);continue}let a=s,l=a==i.body,u=l?X6(i):Q6(a),c=0,d=0;if(t.topu.bottom-Zr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Zr(o,"top")-u.top:t.bottom-u.bottom+Zr(o,"bottom")),t.leftu.right-Zr(r,"right")&&(c=t.right-u.right+Zr(o,"right")),c||d)if(l)i.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,b=a.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:ha(s)}}function e4(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:x_(e.dom)}}function x_(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=ha(r));return t}function t4({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;k_(n,r==0?0:r-t)}function k_(e,t){for(let n=0;n=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?r4(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:w_(n,o)}function r4(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let i=0;i=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function ib(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function o4(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function s4(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?o=a.posBefore:(!s&&l.right-1?o:e.docView.posFromDOM(t,n,-1)}function E_(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;ou&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=s4(e,r,o,t))}a==null&&(a=i4(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function H2(e){return e.top=0&&o==r.nodeValue.length?(l--,c=1):n<0?l--:u++,Jl(Ko(Xr(r,l,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Rn(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Pg(l.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==Rn(r))){let l=r.childNodes[o-1],u=l.nodeType==3?Xr(l,Rn(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Jl(Ko(u,1),!1)}if(i==null&&o=0)}function Jl(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Pg(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function S_(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function u4(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return S_(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=__(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Xr(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var c4=/[\u0590-\u08ac]/;function d4(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return a?!c4.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:S_(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var $2=null,q2=null,V2=!1;function f4(e,t,n){return $2==t&&q2==n?V2:($2=t,q2=n,V2=n=="up"||n=="down"?u4(e,t,n):d4(e,t,n))}var Dn=0,W2=1,$i=2,hr=3,Gi=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Dn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nwt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof Fd){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Pd&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?wt(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=wt(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;ch&&sn){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let a=r+i.border,l=s-i.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?$i:W2,t==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=hr:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?$i:hr}r=s}this.dirty=$i}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?$i:W2;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Dn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Wg=class extends Gi{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},ga=class e extends Gi{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Kr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&hr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=hr&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Dn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=Yg(i,0,t,r));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Kr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=N_(c,r,n),u?l=new jg(t,n,r,o,c,d||null,f,u,i,s+1):n.isText?new Bd(t,n,r,o,c,f,i):new e(t,n,r,o,c,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>N.empty)}return t}matchesNode(t,n,r){return this.dirty==Dn&&t.eq(this.node)&&zd(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new Gg(this,s&&s.node,t);g4(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?fe.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,o)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,t);let p;l.findNodeMatch(u,c,d,f)||a&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,o)||l.addNode(u,c,d,t,o),o+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==$i)&&(s&&this.protectLocalComposition(t,s),C_(this.contentDOM,this.children,t),ma&&b4(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof V)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,a=y4(this.node.content,s,r-n,o-n);return a<0?null:{node:i,pos:a,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new Wg(this,i,n,o);t.input.compositionNodes.push(s),this.children=Yg(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==hr||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Dn}updateOuterDeco(t){if(zd(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=T_(this.dom,this.nodeDOM,Kg(this.outerDeco,this.node,n),Kg(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function j2(e,t,n,r,o){N_(r,t,e);let i=new Zo(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}var Bd=class e extends Zo{constructor(t,n,r,o,i,s,a){super(t,n,r,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==hr||this.dirty!=Dn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Dn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Dn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=hr)}get domAtom(){return!1}isText(t){return this.node.text==t}},Fd=class extends Gi{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Dn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},jg=class extends Zo{constructor(t,n,r,o,i,s,a,l,u,c){super(t,n,r,o,i,s,a,u,c),this.spec=l}update(t,n,r,o){if(this.dirty==hr)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function C_(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=ga.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof ga)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function m4(e,t){return e.type.side-t.type.side}function g4(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)a.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):a.slice();r(f,m,t.forChild(i,f),p),i=h}}function b4(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function y4(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let u=a=0&&u+t.length+a>=n)return a+u;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}function Yg(e,t,n,r,o){let i=[];for(let s=0,a=0;s=n||c<=t?i.push(l):(un&&i.push(l.slice(n-u,l.size,r)))}return i}function sb(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,u;if(jd(n)){for(l=s;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&q.isSelectable(d)&&o.parent&&!(d.isInline&&G6(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new q(s==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!A_(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function x4(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,wt(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&sn&&Jo<=11&&(n.disabled=!0,n.disabled=!1)}function M_(e,t){if(t instanceof q){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Z2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Z2(e)}function Z2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ab(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||V.between(t,n,r)}function X2(e){return e.editable&&!e.hasFocus()?!1:R_(e)}function R_(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function k4(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ki(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Jg(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&J.findFrom(i,t)}function Go(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Q2(e,t,n){let r=e.state.selection;if(r instanceof V)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Go(e,new V(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=Jg(e.state,t);return o&&o instanceof q?Go(e,o):!1}else if(!(Mn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?q.isSelectable(i)?Go(e,new q(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):ou?Go(e,new V(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof q&&r.node.isInline)return Go(e,new V(t>0?r.$to:r.$from));{let o=Jg(e.state,t);return o?Go(e,o):!1}}}function Ud(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Xl(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function da(e,t){return t<0?w4(e):E4(e)}function w4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(On&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Xl(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(O_(n))break;{let a=n.previousSibling;for(;a&&Xl(a,-1);)o=n.parentNode,i=wt(a),a=a.previousSibling;if(a)n=a,r=Ud(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Zg(e,n,r):o&&Zg(e,o,i)}function E4(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Ud(n),i,s;for(;;)if(r{e.state==o&&eo(e)},50)}function e_(e,t){let n=e.state.doc.resolve(t);if(!(pt||v_)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function t_(e,t,n){let r=e.state.selection;if(r instanceof V&&!r.empty||n.indexOf("s")>-1||Mn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Jg(e.state,t);if(s&&s instanceof q)return Go(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof Kt?J.near(s,t):J.findFrom(s,t);return a?Go(e,a):!1}return!1}function n_(e,t){if(!(e.state.selection instanceof V))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function r_(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function C4(e){if(!Bt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;r_(e,r,"true"),setTimeout(()=>r_(e,r,"false"),20)}return!1}function T4(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function N4(e,t){let n=t.keyCode,r=T4(t);if(n==8||Mn&&n==72&&r=="c")return n_(e,-1)||da(e,-1);if(n==46&&!t.shiftKey||Mn&&n==68&&r=="c")return n_(e,1)||da(e,1);if(n==13||n==27)return!0;if(n==37||Mn&&n==66&&r=="c"){let o=n==37?e_(e,e.state.selection.from)=="ltr"?-1:1:-1;return Q2(e,o,r)||da(e,o)}else if(n==39||Mn&&n==70&&r=="c"){let o=n==39?e_(e,e.state.selection.from)=="ltr"?1:-1:1;return Q2(e,o,r)||da(e,o)}else{if(n==38||Mn&&n==80&&r=="c")return t_(e,-1,r)||da(e,-1);if(n==40||Mn&&n==78&&r=="c")return C4(e)||t_(e,1,r)||da(e,1);if(r==(Mn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function lb(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Kr.fromSchema(e.state.schema),a=F_(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=B_[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=a.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` +`;document.head.appendChild(Jw);var is={badge:"badge_Badge",default:"default_Badge",status:"status_Badge",priority:"priority_Badge",removable:"removable_Badge",removeButton:"removeButton_Badge"};var Ba=M(G()),ss=({children:e,variant:t="default",color:n,className:r,onRemove:o})=>{let a=is[t]||is.default,i=n?{backgroundColor:`${n}20`,color:n,borderColor:`${n}40`}:{};return(0,Ba.jsxs)("span",{className:`${is.badge} ${a} ${o?is.removable:""} ${r||""}`,style:i,children:[e,o&&(0,Ba.jsx)("button",{type:"button",className:is.removeButton,onClick:s=>{s.stopPropagation(),o()},title:"Remove",children:(0,Ba.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ba.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Ba.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};var Gs=M(pe());var _u=M(pe(),1),oa=M(pe(),1),IL=M(ts(),1),_L=M(zd(),1),ao=M(G(),1);function Ot(e){this.content=e}Ot.prototype={constructor:Ot,find:function(e){for(var t=0;t>1}};Ot.from=function(e){if(e instanceof Ot)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ot(t)};var vg=Ot;function cS(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o==a){n+=o.nodeSize;continue}if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let i=0;o.text[i]==a.text[i];i++)n++;return n}if(o.content.size||a.content.size){let i=cS(o.content,a.content,n+1);if(i!=null)return i}n+=o.nodeSize}}function dS(e,t,n,r){for(let o=e.childCount,a=t.childCount;;){if(o==0||a==0)return o==a?null:{a:n,b:r};let i=e.child(--o),s=t.child(--a),l=i.nodeSize;if(i==s){n-=l,r-=l;continue}if(!i.sameMarkup(s))return{a:n,b:r};if(i.isText&&i.text!=s.text){let u=0,c=Math.min(i.text.length,s.text.length);for(;ut&&r(l,o+s,a||null,i)!==!1&&l.content.size){let c=s+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,o+c)}s=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let a="",i=!0;return this.nodesBetween(t,n,(s,l)=>{let u=s.isText?s.text.slice(Math.max(t,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&r&&(i?i=!1:a+=r),a+=u},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),a=1);at)for(let a=0,i=0;it&&((in)&&(s.isText?s=s.cut(Math.max(0,t-i),Math.min(s.text.length,n-i)):s=s.cut(Math.max(0,t-i-1),Math.min(s.content.size,n-i-1))),r.push(s),o+=s.nodeSize),i=l}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),a=r+o.nodeSize;if(a>=t)return a==t?Ud(n+1,a):Ud(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};fe.none=[];var Ua=class extends Error{},B=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=pS(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(fS(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(_.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}};B.empty=new B(_.empty,0,0);function fS(e,t,n){let{index:r,offset:o}=e.findIndex(t),a=e.maybeChild(r),{index:i,offset:s}=e.findIndex(n);if(o==t||a.isText){if(s!=n&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(fS(a.content,t-o-1,n-o-1)))}function pS(e,t,n,r){let{index:o,offset:a}=e.findIndex(t),i=e.maybeChild(o);if(a==t||i.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=pS(i.content,t-a-1,n,i);return s&&e.replaceChild(o,i.copy(s))}function MO(e,t,n){if(n.openStart>e.depth)throw new Ua("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ua("Inconsistent open depths");return hS(e,t,n,0)}function hS(e,t,n,r){let o=e.index(r),a=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function tu(e,t,n,r){let o=(t||e).node(n),a=0,i=t?t.index(n):o.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Fa(e.nodeAfter,r),a++));for(let s=a;so&&Sg(e,t,o+1),i=r.depth>o&&Sg(n,r,o+1),s=[];return tu(null,e,o,s),a&&i&&t.index(o)==n.index(o)?(mS(a,i),Fa(za(a,gS(e,t,n,r,o+1)),s)):(a&&Fa(za(a,$d(e,t,o+1)),s),tu(t,n,o,s),i&&Fa(za(i,$d(n,r,o+1)),s)),tu(r,null,o,s),new _(s)}function $d(e,t,n){let r=[];if(tu(null,e,n,r),e.depth>n){let o=Sg(e,t,n+1);Fa(za(o,$d(e,t,n+1)),r)}return tu(t,null,n,r),new _(r)}function NO(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)o=t.node(a).copy(_.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Vd=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let a=0;a0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ha(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,a=n;for(let i=t;;){let{index:s,offset:l}=i.content.findIndex(a),u=a-l;if(r.push(i,s,o+l),!u||(i=i.child(s),i.isText))break;a=u-1,o+=l+1}return new e(n,r,a)}static resolveCached(t,n){let r=tS.get(t);if(r)for(let a=0;at&&this.nodesBetween(t,n,a=>(r.isInSet(a.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),bS(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=_.empty,o=0,a=r.childCount){let i=this.contentMatchAt(t).matchFragment(r,o,a),s=i&&i.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=_.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,o,r);return a.type.checkAttrs(a.attrs),a}};an.prototype.text=void 0;var Lg=class e extends an{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bS(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function bS(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var qa=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Ig(t,n);if(r.next==null)return e.empty;let o=xS(r);r.next&&r.err("Unexpected trailing text");let a=HO(UO(o));return qO(a,r),a}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let a=o+(r.validEnd?"*":" ")+" ";for(let i=0;i"+t.indexOf(r.next[i].next);return a}).join(` +`)}};qa.empty=new qa(!0);var Ig=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function xS(e){let t=[];do t.push(OO(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function OO(e){let t=[];do t.push(PO(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function PO(e){let t=zO(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=BO(e,t);else break;return t}function nS(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function BO(e,t){let n=nS(e),r=n;return e.eat(",")&&(e.next!="}"?r=nS(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function FO(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let a in n){let i=n[a];i.isInGroup(t)&&o.push(i)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function zO(e){if(e.eat("(")){let t=xS(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=FO(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function UO(e){let t=[[]];return o(a(e,0),n()),t;function n(){return t.push([])-1}function r(i,s,l){let u={term:l,to:s};return t[i].push(u),u}function o(i,s){i.forEach(l=>l.to=s)}function a(i,s){if(i.type=="choice")return i.exprs.reduce((l,u)=>l.concat(a(u,s)),[]);if(i.type=="seq")for(let l=0;;l++){let u=a(i.exprs[l],s);if(l==i.exprs.length-1)return u;o(u,s=n())}else if(i.type=="star"){let l=n();return r(s,l),o(a(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return o(a(i.expr,s),l),o(a(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(s)].concat(a(i.expr,s));if(i.type=="range"){let l=s;for(let u=0;u{e[i].forEach(({term:s,to:l})=>{if(!s)return;let u;for(let c=0;c{u||o.push([s,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=t[r.join(",")]=new qa(r.indexOf(e.length-1)>-1);for(let i=0;i-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:vS(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new an(this,this.computeAttrs(t),_.from(n),fe.setFrom(r))}createChecked(t=null,n,r){return n=_.from(n),this.checkContent(n),new an(this,this.computeAttrs(t),n,fe.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=_.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let o=this.contentMatch.matchFragment(n),a=o&&o.fillBefore(_.empty,!0);return a?new an(this,t,n.append(a),fe.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[a]=new e(a,n,i));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let a in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function $O(e,t,n){let r=n.split("|");return o=>{let a=o===null?"null":typeof o;if(r.indexOf(a)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${a}`)}}var _g=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$O(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},ru=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=wS(t,o.attrs),this.excluded=null;let a=kS(this.attrs);this.instance=a?new fe(this,a):null}create(t=null){return!t&&this.instance?this.instance:new fe(this,vS(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((a,i)=>r[a]=new e(a,o++,n,i)),r}removeFromSet(t){for(var n=0;n-1}},jo=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=vg.from(t.nodes),n.marks=vg.from(t.marks||{}),this.nodes=Wd.compile(this.spec.nodes,this),this.marks=ru.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let a=this.nodes[o],i=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=r[i]||(r[i]=qa.parse(i,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?oS(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let o in this.marks){let a=this.marks[o],i=a.spec.excludes;a.excluded=i==null?[a]:i==""?[]:oS(this,i.split(" "))}this.nodeFromJSON=o=>an.fromJSON(this,o),this.markFromJSON=o=>fe.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Wd){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new Lg(r,r.defaultAttrs,t,fe.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function oS(e,t){let n=[];for(let r=0;r-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function VO(e){return e.tag!=null}function WO(e){return e.style!=null}var An=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(VO(o))this.tags.push(o);else if(WO(o)){let a=/[^=]*/.exec(o.style)[0];r.indexOf(a)<0&&r.push(a),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let a=t.nodes[o.node];return a.contentMatch.matchType(a)})}parse(t,n={}){let r=new Gd(this,n,!1);return r.addAll(t,fe.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Gd(this,n,!0);return r.addAll(t,fe.none,n.from,n.to),B.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(t){let n=[];function r(o){let a=o.priority==null?50:o.priority,i=0;for(;i{r(i=iS(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in t.nodes){let a=t.nodes[o].spec.parseDOM;a&&a.forEach(i=>{r(i=iS(i)),i.node||i.ignore||i.mark||(i.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},SS={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},GO={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ES={ol:!0,ul:!0},ou=1,Ag=2,nu=4;function aS(e,t,n){return t!=null?(t?ou:0)|(t==="full"?Ag:0):e&&e.whitespace=="pre"?ou|Ag:n&~nu}var us=class{constructor(t,n,r,o,a,i){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=fe.none,this.match=a||(i&nu?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(_.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ou)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let a=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-o[0].length))}}let n=_.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(_.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!SS.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Gd=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,a,i=aS(null,n.preserveWhitespace,0)|(r?nu:0);o?a=new us(o.type,o.attrs,fe.none,!0,n.topMatch||o.type.contentMatch,i):r?a=new us(null,null,fe.none,!0,null,i):a=new us(t.schema.topNodeType,null,fe.none,!0,null,i),this.nodes=[a],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,a=o.options&Ag?"full":this.localPreserveWS||(o.options&ou)>0,{schema:i}=this.parser;if(a==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(a)if(a==="full")r=r.replace(/\r\n?/g,` +`);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let s=r.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(t,n,r,o){let a,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(i,n.attrs||null,r,n.preserveWhitespace);l&&(a=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}a&&this.sync(s)&&this.open--}addAll(t,n,r,o){let a=r||0;for(let i=r?t.childNodes[r]:t.firstChild,s=o==null?null:t.childNodes[o];i!=s;i=i.nextSibling,++a)this.findAtPoint(t,a),this.addDOM(i,n);this.findAtPoint(t,a)}findPlace(t,n,r){let o,a;for(let i=this.open,s=0;i>=0;i--){let l=this.nodes[i],u=l.findWrapping(t);if(u&&(!o||o.length>u.length+s)&&(o=u,a=l,!u.length))break;if(l.solid){if(r)break;s+=2}}if(!o)return null;this.sync(a);for(let i=0;i(i.type?i.type.allowsMarkType(u.type):sS(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new us(t,n,l,o,null,s)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ou)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),a=-(r?r.depth+1:0)+(o?0:1),i=(s,l)=>{for(;s>=0;s--){let u=n[s];if(u==""){if(s==n.length-1||s==0)continue;for(;l>=a;l--)if(i(s-1,l))return!0;return!1}else{let c=l>0||l==0&&o?this.nodes[l].type:r&&l>=a?r.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function KO(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&ES.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function jO(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function iS(e){let t={};for(let n in e)t[n]=e[n];return t}function sS(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let a=[],i=s=>{a.push(s);for(let l=0;l{if(a.length||i.marks.length){let s=0,l=0;for(;s=0;o--){let a=this.serializeMark(t.marks[o],t.isInline,n);a&&((a.contentDOM||a.dom).appendChild(r),r=a.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Hd(wg(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Hd(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=lS(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return lS(t.marks)}};function lS(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function wg(e){return e.document||window.document}var uS=new WeakMap;function XO(e){let t=uS.get(e);return t===void 0&&uS.set(e,t=ZO(e)),t}function ZO(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s,l=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=Hd(e,f,n,r);if(l.appendChild(p),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:l,contentDOM:s}}var _S=65535,AS=Math.pow(2,16);function JO(e,t){return e+t*AS}function LS(e){return e&_S}function YO(e){return(e-(e&_S))/AS}var TS=1,MS=2,Kd=4,NS=8,su=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&NS)>0}get deletedBefore(){return(this.delInfo&(TS|Kd))>0}get deletedAfter(){return(this.delInfo&(MS|Kd))>0}get deletedAcross(){return(this.delInfo&Kd)>0}},Xr=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=LS(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[s+a],c=this.ranges[s+i],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+o+(f<0?0:c);if(r)return p;let h=t==(n<0?l:d)?null:JO(s/3,t-l),m=t==l?MS:t==d?TS:Kd;return(n<0?t!=l:t!=d)&&(m|=NS),new su(p,m,h)}o+=c-u}return r?t+o:new su(t+o,0,null)}touches(t,n){let r=0,o=LS(n),a=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;st)break;let u=this.ranges[s+a],c=l+u;if(t<=c&&s==o*3)return!0;r+=this.ranges[s+i]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,a=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ra&&l!i.isAtom||!s.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),n.openStart,n.openEnd);return Ct.fromReplace(t,this.from,this.to,a)}invert(){return new Zr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};pt.jsonID("addMark",uu);var Zr=class e extends pt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new B(Og(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return Ct.fromReplace(t,this.from,this.to,r)}invert(){return new uu(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};pt.jsonID("removeMark",Zr);var cu=class e extends pt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ct.fromReplace(t,this.pos,this.pos+1,new B(_.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new e(n.pos,r.pos,o,a,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};pt.jsonID("replaceAround",ot);function Rg(e,t,n){let r=e.resolve(t),o=n-t,a=r.depth;for(;o>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,o--;if(o>0){let i=r.node(a).maybeChild(r.indexAfter(a));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function QO(e,t,n,r){let o=[],a=[],i,s;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let m=0;me.step(l)),a.forEach(l=>e.step(l))}function eP(e,t,n,r){let o=[],a=0;e.doc.nodesBetween(t,n,(i,s)=>{if(!i.isInline)return;a++;let l=null;if(r instanceof ru){let u=i.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let u=Math.min(s+i.nodeSize,n);for(let c=0;ce.step(new Zr(i.from,i.to,i.style)))}function Pg(e,t,n,r=n.contentMatch,o=!0){let a=e.doc.nodeAt(t),i=[],s=t+1;for(let l=0;l=0;l--)e.step(i[l])}function tP(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Jr(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,o=0,a=0;;--r){let i=e.$from.node(r),s=e.$from.index(r)+o,l=e.$to.indexAfter(r)-a;if(rn;h--)m||r.index(h)>0?(m=!0,c=_.from(r.node(h).copy(c)),d++):l--;let f=_.empty,p=0;for(let h=a,m=!1;h>n;h--)m||o.after(h+1)=0;i--){if(r.size){let s=n[i].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=_.from(n[i].type.create(n[i].attrs,r))}let o=t.start,a=t.end;e.step(new ot(o,a,o,a,new B(r,0,0),n.length,!0))}function iP(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,(i,s)=>{let l=typeof o=="function"?o(i):o;if(i.isTextblock&&!i.hasMarkup(r,l)&&sP(e.doc,e.mapping.slice(a).map(s),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&DS(e,i,s,a),Pg(e,e.mapping.slice(a).map(s,1),r,void 0,u===null);let c=e.mapping.slice(a),d=c.map(s,1),f=c.map(s+i.nodeSize,1);return e.step(new ot(d,f,d+1,f-1,new B(_.from(r.create(l,null,i.marks)),0,0),1,!0)),u===!0&&RS(e,i,s,a),!1}})}function RS(e,t,n,r){t.forEach((o,a)=>{if(o.isText){let i,s=/\r?\n|\r/g;for(;i=s.exec(o.text);){let l=e.mapping.slice(r).map(n+1+a+i.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function DS(e,t,n,r){t.forEach((o,a)=>{if(o.type==o.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(` +`))}})}function sP(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function lP(e,t,n,r,o){let a=e.doc.nodeAt(t);if(!a)throw new RangeError("No node at given position");n||(n=a.type);let i=n.create(r,null,o||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,i);if(!n.validContent(a.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new ot(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new B(_.from(i),0,0),1,!0))}function bn(e,t,n=1,r){let o=e.resolve(t),a=o.depth-n,i=r&&r[r.length-1]||o.parent;if(a<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>a;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let s=o.indexAfter(a),l=r&&r[0];return o.node(a).canReplaceWith(s,s,l?l.type:o.node(a+1).type)}function uP(e,t,n=1,r){let o=e.doc.resolve(t),a=_.empty,i=_.empty;for(let s=o.depth,l=o.depth-n,u=n-1;s>l;s--,u--){a=_.from(o.node(s).copy(a));let c=r&&r[u];i=_.from(c?c.type.create(c.attrs,i):o.node(s).copy(i))}e.step(new Pt(t,t,new B(a.append(i),n,n),!0))}function Tn(e,t){let n=e.resolve(t),r=n.index();return OS(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function cP(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(a=r.node(o+1),s++,i=r.node(o).maybeChild(s)):(a=r.node(o).maybeChild(s-1),i=r.node(o+1)),a&&!a.isTextblock&&OS(a,i)&&r.node(o).canReplace(s,s+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function dP(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,a=e.doc.resolve(t-n),i=a.node().type;if(o&&i.inlineContent){let c=i.whitespace=="pre",d=!!i.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let s=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);DS(e,c.node(),c.before(),s)}i.inlineContent&&Pg(e,t+n-1,i,a.node().contentMatchAt(a.index()),r==null);let l=e.mapping.slice(s),u=l.map(t-n);if(e.step(new Pt(u,l.map(t+n,-1),B.empty,!0)),r===!0){let c=e.doc.resolve(u);RS(e,c.node(),c.before(),e.steps.length)}return e}function fP(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let a=r.index(o);if(r.node(o).canReplaceWith(a,a,n))return r.before(o+1);if(a>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let a=r.indexAfter(o);if(r.node(o).canReplaceWith(a,a,n))return r.after(o+1);if(a=0;i--){let s=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,l=r.index(i)+(s>0?1:0),u=r.node(i),c=!1;if(a==1)c=u.canReplace(l,l,o);else{let d=u.contentMatchAt(l).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return s==0?r.pos:s<0?r.before(i+1):r.after(i+1)}return null}function du(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),a=e.resolve(n);return PS(o,a,r)?new Pt(t,n,r):new Dg(o,a,r).fit()}function PS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var Dg=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=_.empty;for(let o=0;o<=t.depth;o++){let a=t.node(o);this.frontier.push({type:a.type,match:a.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=_.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let a=this.placed,i=r.depth,s=o.depth;for(;i&&s&&a.childCount==1;)a=a.firstChild.content,i--,s--;let l=new B(a,i,s);return t>-1?new ot(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Pt(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),a.type.spec.isolating&&o<=r){t=r;break}n=a.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,a=null;r?(a=Mg(this.unplaced.content,r-1).firstChild,o=a.content):o=this.unplaced.content;let i=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:u}=this.frontier[s],c,d=null;if(n==1&&(i?u.matchType(i.type)||(d=u.fillBefore(_.from(i),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:r,frontierDepth:s,parent:a,inject:d};if(n==2&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:s,parent:a,wrap:c};if(a&&u.matchType(a.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Mg(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Mg(t,n);if(o.childCount<=1&&n>0){let a=t.size-n<=n+o.size;this.unplaced=new B(au(t,n-1,1),n-1,a?n-1:r)}else this.unplaced=new B(au(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:a}){for(;this.depth>n;)this.closeFrontierNode();if(a)for(let m=0;m1||l==0||m.content.size)&&(d=b,c.push(BS(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==s.childCount?p:-1)))}let h=u==s.childCount;h||(p=-1),this.placed=iu(this.placed,n,_.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=s;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],a=n=0;s--){let{match:l,type:u}=this.frontier[s],c=Ng(t,s,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:i,move:a?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=iu(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),a=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,a)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=iu(this.placed,this.depth,_.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(_.empty,!0);n.childCount&&(this.placed=iu(this.placed,this.frontier.length,n))}};function au(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(au(e.firstChild.content,t-1,n)))}function iu(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(iu(e.lastChild.content,t-1,n)))}function Mg(e,t){for(let n=0;n1&&(r=r.replaceChild(0,BS(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(_.empty,!0)))),e.copy(r)}function Ng(e,t,n,r,o){let a=e.node(t),i=o?e.indexAfter(t):e.index(t);if(i==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,i);return s&&!pP(n,a.content,i)?s:null}function pP(e,t,n){for(let r=n;r0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;i.indexOf(f)>-1?s=f:o.before(f)==p&&i.splice(1,0,-f)}let l=i.indexOf(s),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=hP(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(s)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=i[f];p<0||(t=o.before(p),n=a.after(p))}}function FS(e,t,n,r,o){if(tr){let a=o.contentMatchAt(0),i=a.fillBefore(e).append(e);e=i.append(a.matchFragment(i).fillBefore(_.empty,!0))}return e}function gP(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=fP(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new B(_.from(r),0,0))}function bP(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),a=zS(r,o);for(let i=0;i0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return e.delete(r.before(i),n);e.delete(t,n)}function zS(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let a=e.start(o);if(at.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(a==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==a-1)&&n.push(o)}return n}var jd=class e extends pt{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ct.fail("No node at attribute step's position");let r=Object.create(null);for(let a in n.attrs)r[a]=n.attrs[a];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Ct.fromReplace(t,this.pos,this.pos+1,new B(_.from(o),0,n.isLeaf?0:1))}getMap(){return Xr.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};pt.jsonID("attr",jd);var Xd=class e extends pt{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Ct.ok(r)}getMap(){return Xr.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};pt.jsonID("docAttr",Xd);var ds=class extends Error{};ds=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};ds.prototype=Object.create(Error.prototype);ds.prototype.constructor=ds;ds.prototype.name="TransformError";var Xo=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new lu}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new ds(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=B.empty){let o=du(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new B(_.from(r),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return mP(this,t,n,r),this}replaceRangeWith(t,n,r){return gP(this,t,n,r),this}deleteRange(t,n){return bP(this,t,n),this}lift(t,n){return nP(this,t,n),this}join(t,n=1){return dP(this,t,n),this}wrap(t,n){return aP(this,t,n),this}setBlockType(t,n=t,r,o=null){return iP(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return lP(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new jd(t,n,r)),this}setDocAttribute(t,n){return this.step(new Xd(t,n)),this}addNodeMark(t,n){return this.step(new cu(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof fe)n.isInSet(r.marks)&&this.step(new cs(t,n));else{let o=r.marks,a,i=[];for(;a=n.isInSet(o);)i.push(new cs(t,a)),o=a.removeFromSet(o);for(let s=i.length-1;s>=0;s--)this.step(i[s])}return this}split(t,n=1,r){return uP(this,t,n,r),this}addMark(t,n,r){return QO(this,t,n,r),this}removeMark(t,n,r){return eP(this,t,n,r),this}clearIncompatible(t,n,r){return Pg(this,t,n,r),this}};var Bg=Object.create(null),Z=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new hs(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;a--){let i=n<0?ps(t.node(0),t.node(a),t.before(a+1),t.index(a),n,r):ps(t.node(0),t.node(a),t.after(a+1),t.index(a)+1,n,r);if(i)return i}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new jt(t.node(0))}static atStart(t){return ps(t,t,0,0,1)||new jt(t)}static atEnd(t){return ps(t,t,t.content.size,t.childCount,-1)||new jt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Bg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Bg)throw new RangeError("Duplicate use of selection JSON ID "+t);return Bg[t]=n,n.prototype.jsonID=t,n}getBookmark(){return V.between(this.$anchor,this.$head).getBookmark()}};Z.prototype.visible=!0;var hs=class{constructor(t,n){this.$from=t,this.$to=n}},US=!1;function HS(e){!US&&!e.parent.inlineContent&&(US=!0)}var V=class e extends Z{constructor(t,n=t){HS(t),HS(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Z.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Yd(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let a=Z.findFrom(n,r,!0)||Z.findFrom(n,-r,!0);if(a)n=a.$head;else return Z.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Z.findFrom(t,-r,!0)||Z.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?i=0;i+=o){let s=t.child(i);if(s.isAtom){if(!a&&$.isSelectable(s))return $.create(e,n-(o<0?s.nodeSize:0))}else{let l=ps(e,s,n+o,o<0?s.childCount:0,o,a);if(l)return l}n+=s.nodeSize*o}return null}function qS(e,t,n){let r=e.steps.length-1;if(r{i==null&&(i=c)}),e.setSelection(Z.near(e.doc.resolve(i),n))}var $S=1,Jd=2,VS=4,Ug=class extends Xo{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Jd,this}ensureMarks(t){return fe.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Jd)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Jd,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||fe.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let a=this.storedMarks;if(!a){let i=this.doc.resolve(n);a=r==n?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,a)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(Z.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=VS,this}get scrolledIntoView(){return(this.updated&VS)>0}};function WS(e,t){return!t||!e?e:e.bind(t)}var Va=class{constructor(t,n,r){this.name=t,this.init=WS(n.init,r),this.apply=WS(n.apply,r)}},yP=[new Va("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Va("selection",{init(e,t){return e.selection||Z.atStart(t.doc)},apply(e){return e.selection}}),new Va("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Va("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],fu=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=yP.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Va(r.key,r.spec.state,r))})}},Qd=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],a=o.spec.state;a&&a.toJSON&&(n[r]=a.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new fu(t.schema,t.plugins),a=new e(o);return o.fields.forEach(i=>{if(i.name=="doc")a.doc=an.fromJSON(t.schema,n.doc);else if(i.name=="selection")a.selection=Z.fromJSON(a.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],u=l.spec.state;if(l.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){a[i.name]=u.fromJSON.call(l,t,n[s],a);return}}a[i.name]=i.init(t,a)}}),a}};function GS(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=GS(o,t,{})),n[r]=o}return n}var j=class{constructor(t){this.spec=t,this.props={},t.props&&GS(t.props,this,this.props),this.key=t.key?t.key.key:KS("plugin")}getState(t){return t[this.key]}},Fg=Object.create(null);function KS(e){return e in Fg?e+"$"+ ++Fg[e]:(Fg[e]=0,e+"$")}var Q=class{constructor(t="key"){this.key=KS(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var ef=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function XS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var qg=(e,t,n)=>{let r=XS(e,n);if(!r)return!1;let o=Vg(r);if(!o){let i=r.blockRange(),s=i&&Jr(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)}let a=o.nodeBefore;if(o2(e,o,t,-1))return!0;if(r.parent.content.size==0&&(ms(a,"end")||$.isSelectable(a)))for(let i=r.depth;;i--){let s=du(e.doc,r.before(i),r.after(i),B.empty);if(s&&s.slice.size1)break}return a.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),!0):!1},ZS=(e,t,n)=>{let r=XS(e,n);if(!r)return!1;let o=Vg(r);return o?YS(e,o,t):!1},JS=(e,t,n)=>{let r=QS(e,n);if(!r)return!1;let o=Kg(r);return o?YS(e,o,t):!1};function YS(e,t,n){let r=t.nodeBefore,o=r,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let i=t.nodeAfter,s=i,l=t.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let c=s.firstChild;if(!c)return!1;s=c}let u=du(e.doc,a,l,B.empty);if(!u||u.from!=a||u instanceof Pt&&u.slice.size>=l-a)return!1;if(n){let c=e.tr.step(u);c.setSelection(V.create(c.doc,a)),n(c.scrollIntoView())}return!0}function ms(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var $g=(e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=Vg(r)}let i=a&&a.nodeBefore;return!i||!$.isSelectable(i)?!1:(t&&t(e.tr.setSelection($.create(e.doc,a.pos-i.nodeSize)).scrollIntoView()),!0)};function Vg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function QS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=QS(e,n);if(!r)return!1;let o=Kg(r);if(!o)return!1;let a=o.nodeAfter;if(o2(e,o,t,1))return!0;if(r.parent.content.size==0&&(ms(a,"start")||$.isSelectable(a))){let i=du(e.doc,r.before(),r.after(),B.empty);if(i&&i.slice.size{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof $,o;if(r){if(n.node.isTextblock||!Tn(e.doc,n.from))return!1;o=n.from}else if(o=$a(e.doc,n.from,-1),o==null)return!1;if(t){let a=e.tr.join(o);r&&a.setSelection($.create(a.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(a.scrollIntoView())}return!0},t2=(e,t)=>{let n=e.selection,r;if(n instanceof $){if(n.node.isTextblock||!Tn(e.doc,n.to))return!1;r=n.to}else if(r=$a(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},n2=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),a=o&&Jr(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)},jg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function Xg(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),a=n.indexAfter(-1),i=Xg(o.contentMatchAt(a));if(!i||!o.canReplaceWith(a,a,i))return!1;if(t){let s=n.after(),l=e.tr.replaceWith(s,s,i.createAndFill());l.setSelection(Z.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},Jg=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof jt||r.parent.inlineContent||o.parent.inlineContent)return!1;let a=Xg(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let i=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let a=n.before();if(bn(e.doc,a))return t&&t(e.tr.split(a).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Jr(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function kP(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof $&&t.selection.node.isBlock)return!r.parentOffset||!bn(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],i,s,l=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),s=Xg(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,l,r);a.unshift(m||(l&&s?{type:s}:null)),i=p;break}else{if(p==1)return!1;a.unshift(null)}let c=t.tr;(t.selection instanceof V||t.selection instanceof jt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=bn(c.doc,d,a.length,a);if(f||(a[0]=s?{type:s}:null,f=bn(c.doc,d,a.length,a)),!f)return!1;if(c.split(d,a.length,a),!l&&u&&r.node(i).type!=s){let p=c.mapping.map(r.before(i)),h=c.doc.resolve(p);s&&r.node(i-1).canReplaceWith(h.index(),h.index()+1,s)&&c.setNodeMarkup(c.mapping.map(r.before(i)),s)}return n&&n(c.scrollIntoView()),!0}}var vP=kP();var r2=(e,t)=>{let{$from:n,to:r}=e.selection,o,a=n.sharedDepth(r);return a==0?!1:(o=n.before(a),t&&t(e.tr.setSelection($.create(e.doc,o))),!0)},CP=(e,t)=>(t&&t(e.tr.setSelection(new jt(e.doc))),!0);function wP(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,a=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(o.isTextblock||Tn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function o2(e,t,n,r){let o=t.nodeBefore,a=t.nodeAfter,i,s,l=o.type.spec.isolating||a.type.spec.isolating;if(!l&&wP(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(s=o.contentMatchAt(o.childCount)).findWrapping(a.type))&&s.matchType(i[0]||a.type).validEnd){if(n){let p=t.pos+a.nodeSize,h=_.empty;for(let g=i.length-1;g>=0;g--)h=_.from(i[g].create(null,h));h=_.from(o.copy(h));let m=e.tr.step(new ot(t.pos-1,p,t.pos,p,new B(h,1,0),i.length,!0)),b=m.doc.resolve(p+2*i.length);b.nodeAfter&&b.nodeAfter.type==o.type&&Tn(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=a.type.spec.isolating||r>0&&l?null:Z.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Jr(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&ms(a,"start",!0)&&ms(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=a,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=_.empty;for(let y=h.length-1;y>=0;y--)g=_.from(h[y].copy(g));let x=e.tr.step(new ot(t.pos-h.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new B(g,h.length,0),0,!0));n(x.scrollIntoView())}return!0}}return!1}function a2(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return o.node(a).isTextblock?(n&&n(t.tr.setSelection(V.create(t.doc,e<0?o.start(a):o.end(a)))),!0):!1}}var Qg=a2(-1),eb=a2(1);function i2(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),s=i&&fs(i,e,t);return s?(r&&r(n.tr.wrap(i,s).scrollIntoView()),!0):!1}}function tb(e,t=null){return function(n,r){let o=!1;for(let a=0;a{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let a=n.tr;for(let i=0;i=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=i.resolve(t.start-2);a=new Ha(l,l,t.depth),t.endIndex=0;c--)a=_.from(n[c].type.create(n[c].attrs,a));e.step(new ot(t.start-(r?2:0),t.end,t.start,t.end,new B(a,0,0),n.length,!0));let i=0;for(let c=0;ci.childCount>0&&i.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?IP(t,n,e,a):_P(t,n,a):!0:!1}}function IP(e,t,n,r){let o=e.tr,a=r.end,i=r.$to.end(r.depth);am;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let a=r.doc.resolve(n.start),i=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,l=n.endIndex==o.childCount,u=a.node(-1),c=a.index(-1);if(!u.canReplace(c+(s?0:1),c+1,i.content.append(l?_.empty:_.from(o))))return!1;let d=a.pos,f=d+i.nodeSize;return r.step(new ot(d-(s?1:0),f+(l?1:0),d+1,f-1,new B((s?_.empty:_.from(o.copy(_.empty))).append(l?_.empty:_.from(o.copy(_.empty))),s?0:1,l?0:1),s?0:1)),t(r.scrollIntoView()),!0}function u2(e){return function(t,n){let{$from:r,$to:o}=t.selection,a=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!a)return!1;let i=a.startIndex;if(i==0)return!1;let s=a.parent,l=s.child(i-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==s.type,c=_.from(u?e.create():null),d=new B(_.from(e.create(null,_.from(s.type.create(null,c)))),u?3:1,0),f=a.start,p=a.end;n(t.tr.step(new ot(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var wt=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},ks=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},lb=null,Qr=function(e,t,n){let r=lb||(lb=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},AP=function(){lb=null},Ja=function(e,t,n,r){return n&&(c2(e,t,n,r,-1)||c2(e,t,n,r,1))},TP=/^(img|br|input|textarea|hr)$/i;function c2(e,t,n,r,o){for(var a;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Nn(e))){let i=e.parentNode;if(!i||i.nodeType!=1||ku(e)||TP.test(e.nodeName)||e.contentEditable=="false")return!1;t=wt(e)+(o<0?0:1),e=i}else if(e.nodeType==1){let i=e.childNodes[t+(o<0?-1:0)];if(i.nodeType==1&&i.contentEditable=="false")if(!((a=i.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)t+=o;else return!1;else e=i,t=o<0?Nn(e):0}else return!1}}function Nn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function MP(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Nn(e)}else if(e.parentNode&&!ku(e))t=wt(e),e=e.parentNode;else return null}}function NP(e,t){for(;;){if(e.nodeType==3&&t2),Mn=vs||(hr?/Mac/.test(hr.platform):!1),W2=hr?/Win/.test(hr.platform):!1,eo=/Android \d/.test(na),vu=!!d2&&"webkitFontSmoothing"in d2.documentElement.style,PP=vu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function BP(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Yr(e,t){return typeof e=="number"?e:e[t]}function FP(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function f2(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,a=e.dom.ownerDocument;for(let i=n||e.dom;i;){if(i.nodeType!=1){i=ks(i);continue}let s=i,l=s==a.body,u=l?BP(a):FP(s),c=0,d=0;if(t.topu.bottom-Yr(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Yr(o,"top")-u.top:t.bottom-u.bottom+Yr(o,"bottom")),t.leftu.right-Yr(r,"right")&&(c=t.right-u.right+Yr(o,"right")),c||d)if(l)a.defaultView.scrollBy(c,d);else{let p=s.scrollLeft,h=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);let m=s.scrollLeft-p,b=s.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=l?"fixed":getComputedStyle(i).position;if(/^(fixed|sticky)$/.test(f))break;i=f=="absolute"?i.offsetParent:ks(i)}}function zP(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let a=(t.left+t.right)/2,i=n+1;i=n-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:G2(e.dom)}}function G2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=ks(r));return t}function UP({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;K2(n,r==0?0:r-t)}function K2(e,t){for(let n=0;n=s){i=Math.max(h.bottom,i),s=Math.min(h.top,s);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(a=d+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?qP(n,o):!n||r&&n.nodeType==1?{node:e,offset:a}:j2(n,o)}function qP(e,t){let n=e.nodeValue.length,r=document.createRange(),o;for(let a=0;a=(i.left+i.right)/2?1:0)};break}}return r.detach(),o||{node:e,offset:0}}function Lb(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function $P(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(i.left+i.right)/2?1:-1}return e.docView.posFromDOM(r,o,a)}function WP(e,t,n,r){let o=-1;for(let a=t,i=!1;a!=e.dom;){let s=e.docView.nearestDesc(a,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!i&&l.left>r.left||l.top>r.top?o=s.posBefore:(!i&&l.right-1?o:e.docView.posFromDOM(t,n,-1)}function X2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;vu&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=WP(e,r,o,t))}s==null&&(s=VP(e,i,t));let l=e.docView.nearestDesc(i,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function p2(e){return e.top=0&&o==r.nodeValue.length?(l--,c=1):n<0?l--:u++,pu(Jo(Qr(r,l,u),c),c<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&o&&(n<0||o==Nn(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return rb(l.getBoundingClientRect(),!1)}if(a==null&&o=0)}if(a==null&&o&&(n<0||o==Nn(r))){let l=r.childNodes[o-1],u=l.nodeType==3?Qr(l,Nn(l)-(i?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return pu(Jo(u,1),!1)}if(a==null&&o=0)}function pu(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function rb(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function J2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function jP(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return J2(e,t,()=>{let{node:a}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(a,!0);if(!s)break;if(s.node.isBlock){a=s.contentDOM||s.dom;break}a=s.dom.parentNode}let i=Z2(e,o.pos,1);for(let s=a.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=Qr(s,0,s.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?i.top-c.top>(c.bottom-i.top)*2:c.bottom-i.bottom>(i.bottom-c.top)*2))return!1}}return!0})}var XP=/[\u0590-\u08ac]/;function ZP(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,a=!o,i=o==r.parent.content.size,s=e.domSelection();return s?!XP.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?a:i:J2(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{s.collapse(c,d),l&&(l!=c||u!=d)&&s.extend&&s.extend(l,u)}catch{}return f!=null&&(s.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var h2=null,m2=null,g2=!1;function JP(e,t,n){return h2==t&&m2==n?g2:(h2=t,m2=n,g2=n=="up"||n=="down"?jP(e,t,n):ZP(e,t,n))}var Dn=0,b2=1,Ga=2,mr=3,Ya=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Dn,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nwt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let a=t;;a=a.parentNode){if(a==this.dom){o=!1;break}if(a.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let a=t;;a=a.parentNode){if(a==this.dom){o=!0;break}if(a.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let a=this.getDesc(o),i;if(a&&(!n||a.node))if(r&&(i=a.nodeDOM)&&!(i.nodeType==1?i.contains(t.nodeType==1?t:t.parentNode):i==t))r=!1;else return a}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let a=this.getDesc(o);if(a)return a.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||i instanceof rf){o=t-a;break}a=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let a;r&&!(a=this.children[r-1]).size&&a instanceof tf&&a.side>=0;r--);if(n<=0){let a,i=!0;for(;a=r?this.children[r-1]:null,!(!a||a.dom.parentNode==this.contentDOM);r--,i=!1);return a&&n&&i&&!a.border&&!a.domAtom?a.domFromPos(a.size,n):{node:this.contentDOM,offset:a?wt(a.dom)+1:0}}else{let a,i=!0;for(;a=r=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=i;for(let d=s;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=wt(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||s==this.children.length-1)){n=u;for(let c=s+1;ch&&in){let h=s;s=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(s.node,s.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let s=r+a.border,l=i-a.border;if(t>=s&&n<=l){this.dirty=t==r||n==i?Ga:b2,t==s&&n==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=mr:a.markDirty(t-s,n-s);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Ga:mr}r=i}this.dirty=Ga}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ga:b2;n.dirty{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)})),!n.type.spec.raw){if(i.nodeType!=1){let s=document.createElement("span");s.appendChild(i),i=s}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=n,this.widget=n,a=this}matchesWidget(t){return this.dirty==Dn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},fb=class extends Ya{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},Cs=class e extends Ya{constructor(t,n,r,o,a){super(t,[],r,o),this.mark=n,this.spec=a}static create(t,n,r,o){let a=o.nodeViews[n.type.name],i=a&&a(n,o,r);return(!i||!i.dom)&&(i=jr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,i.dom,i.contentDOM||i.dom,i)}parseRule(){return this.dirty&mr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=mr&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Dn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(a=gb(a,0,t,r));for(let s=0;s{if(!l)return i;if(l.parent)return l.parent.posBeforeChild(l)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=jr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=eE(c,r,n),u?l=new pb(t,n,r,o,c,d||null,f,u,a,i+1):n.isText?new nf(t,n,r,o,c,f,a):new e(t,n,r,o,c,d||null,f,a,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>_.empty)}return t}matchesNode(t,n,r){return this.dirty==Dn&&t.eq(this.node)&&of(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,a=t.composing?this.localCompositionInfo(t,n):null,i=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new mb(this,i&&i.node,t);t6(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?fe.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,o)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,t);let p;l.findNodeMatch(u,c,d,f)||s&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,o)||l.addNode(u,c,d,t,o),o+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ga)&&(i&&this.protectLocalComposition(t,i),Y2(this.contentDOM,this.children,t),vs&&n6(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof V)||rn+this.node.content.size)return null;let a=t.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let i=a.nodeValue,s=r6(this.node.content,i,r-n,o-n);return s<0?null:{node:a,pos:s,text:i}}else return{node:a,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let a=n;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let i=new fb(this,a,n,o);t.input.compositionNodes.push(i),this.children=gb(this.children,r,r+o.length,t,i)}update(t,n,r,o){return this.dirty==mr||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Dn}updateOuterDeco(t){if(of(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Q2(this.dom,this.nodeDOM,hb(this.outerDeco,this.node,n),hb(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function x2(e,t,n,r,o){eE(r,t,e);let a=new ta(void 0,e,t,n,r,r,r,o,0);return a.contentDOM&&a.updateChildren(o,0),a}var nf=class e extends ta{constructor(t,n,r,o,a,i,s){super(t,n,r,o,a,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==mr||this.dirty!=Dn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Dn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Dn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),a=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,a,a,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=mr)}get domAtom(){return!1}isText(t){return this.node.text==t}},rf=class extends Ya{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Dn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},pb=class extends ta{constructor(t,n,r,o,a,i,s,l,u,c){super(t,n,r,o,a,i,s,u,c),this.spec=l}update(t,n,r,o){if(this.dirty==mr)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let a=this.spec.update(t,n,r);return a&&this.updateInner(t,n,r,o),a}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function Y2(e,t,n){let r=e.firstChild,o=!1;for(let a=0;a>1,i=Math.min(a,t.length);for(;o-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=Cs.create(this.top,t[a],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,a++}}findNodeMatch(t,n,r,o){let a=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(t,n,r))a=this.top.children.indexOf(i,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s0;){let s;for(;;)if(r){let u=n.children[r-1];if(u instanceof Cs)n=u,r=u.children.length;else{s=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,a.set(s,o),i.push(s)}}return{index:o,matched:a,matches:i.reverse()}}function e6(e,t){return e.type.side-t.type.side}function t6(e,t,n,r){let o=t.locals(e),a=0;if(o.length==0){for(let u=0;ua;)s.push(o[i++]);let h=a+f.nodeSize;if(f.isText){let b=h;i!b.inline):s.slice();r(f,m,t.forChild(a,f),p),a=h}}function n6(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function r6(e,t,n,r){for(let o=0,a=0;o=n){if(a>=r&&l.slice(r-t.length-s,r-s)==t)return r-t.length;let u=s=0&&u+t.length+s>=n)return s+u;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function gb(e,t,n,r,o){let a=[];for(let i=0,s=0;i=n||c<=t?a.push(l):(un&&a.push(l.slice(n-u,l.size,r)))}return a}function Ib(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&o.size==0,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let s=r.resolve(i),l,u;if(ff(n)){for(l=i;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&$.isSelectable(d)&&o.parent&&!(d.isInline&&RP(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new $(i==f?s:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=i,f=i;for(let p=0;p{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!tE(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function a6(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,wt(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&sn&&ea<=11&&(n.disabled=!0,n.disabled=!1)}function nE(e,t){if(t instanceof $){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(w2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else w2(e)}function w2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _b(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||V.between(t,n,r)}function S2(e){return e.editable&&!e.hasFocus()?!1:rE(e)}function rE(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function i6(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ja(t.node,t.offset,n.anchorNode,n.anchorOffset)}function bb(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&Z.findFrom(a,t)}function Yo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function E2(e,t,n){let r=e.state.selection;if(r instanceof V)if(n.indexOf("s")>-1){let{$head:o}=r,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let i=e.state.doc.resolve(o.pos+a.nodeSize*(t<0?-1:1));return Yo(e,new V(r.$anchor,i))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=bb(e.state,t);return o&&o instanceof $?Yo(e,o):!1}else if(!(Mn&&n.indexOf("m")>-1)){let o=r.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,i;if(!a||a.isText)return!1;let s=t<0?o.pos-a.nodeSize:o.pos;return a.isAtom||(i=e.docView.descAt(s))&&!i.contentDOM?$.isSelectable(a)?Yo(e,new $(t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):vu?Yo(e,new V(e.state.doc.resolve(t<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $&&r.node.isInline)return Yo(e,new V(t>0?r.$to:r.$from));{let o=bb(e.state,t);return o?Yo(e,o):!1}}}function af(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function mu(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function bs(e,t){return t<0?s6(e):l6(e)}function s6(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=!1;for(Rn&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(mu(s,-1))o=n,a=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(oE(n))break;{let s=n.previousSibling;for(;s&&mu(s,-1);)o=n.parentNode,a=wt(s),s=s.previousSibling;if(s)n=s,r=af(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}i?xb(e,n,r):o&&xb(e,o,a)}function l6(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=af(n),a,i;for(;;)if(r{e.state==o&&to(e)},50)}function L2(e,t){let n=e.state.doc.resolve(t);if(!(ht||W2)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let a=e.coordsAtPos(t-1),i=(a.top+a.bottom)/2;if(i>o.top&&i1)return a.lefto.top&&i1)return a.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function I2(e,t,n){let r=e.state.selection;if(r instanceof V&&!r.empty||n.indexOf("s")>-1||Mn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let i=bb(e.state,t);if(i&&i instanceof $)return Yo(e,i)}if(!o.parent.inlineContent){let i=t<0?o:a,s=r instanceof jt?Z.near(i,t):Z.findFrom(i,t);return s?Yo(e,s):!1}return!1}function _2(e,t){if(!(e.state.selection instanceof V))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let i=e.state.tr;return t<0?i.delete(n.pos-a.nodeSize,n.pos):i.delete(n.pos,n.pos+a.nodeSize),e.dispatch(i),!0}return!1}function A2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function d6(e){if(!Ft||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;A2(e,r,"true"),setTimeout(()=>A2(e,r,"false"),20)}return!1}function f6(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function p6(e,t){let n=t.keyCode,r=f6(t);if(n==8||Mn&&n==72&&r=="c")return _2(e,-1)||bs(e,-1);if(n==46&&!t.shiftKey||Mn&&n==68&&r=="c")return _2(e,1)||bs(e,1);if(n==13||n==27)return!0;if(n==37||Mn&&n==66&&r=="c"){let o=n==37?L2(e,e.state.selection.from)=="ltr"?-1:1:-1;return E2(e,o,r)||bs(e,o)}else if(n==39||Mn&&n==70&&r=="c"){let o=n==39?L2(e,e.state.selection.from)=="ltr"?1:-1:1;return E2(e,o,r)||bs(e,o)}else{if(n==38||Mn&&n==80&&r=="c")return I2(e,-1,r)||bs(e,-1);if(n==40||Mn&&n==78&&r=="c")return d6(e)||I2(e,1,r)||bs(e,1);if(r==(Mn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Ab(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:a}=t;for(;o>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,a--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let i=e.someProp("clipboardSerializer")||jr.fromSchema(e.state.schema),s=cE(),l=s.createElement("div");l.appendChild(i.serializeFragment(r,{document:s}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=uE[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=s.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${a}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` -`);return{dom:l,text:f,slice:t}}function D_(e,t,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=!!t&&(r||i||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return a=new B(N.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)a=d;else{let f=o.marks(),{schema:p}=e.state,h=Kr.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=O4(n),ou&&D4(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Nn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!A4.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=I4(o_(a,+c[1],+c[2]),c[4]);else if(a=B.maxOpen(M4(a.content,o),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d{a=d(a,e,l)}),a}var A4=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function M4(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&i.length&&L_(l,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=P_(s[s.length-1],i.length));let c=I_(a,l);s.push(c),o=o.matchType(c.type),i=l}}),s)return N.from(s)}return e}function I_(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,N.from(e));return e}function L_(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function o_(e,t,n){return tn})),Fg.createHTML(e)):e}function O4(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=F_().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&B_[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=R4(e),o)for(let i=0;i=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=N.from(l.create(r[a+1],o)),i++,s++}return new B(o,i,s)}var Gt={},Yt={},L4={touchstart:!0,touchmove:!0},Qg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function P4(e){for(let t in Gt){let n=Gt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{F4(e,r)&&!ub(e,r)&&(e.editable||!(r.type in Yt))&&n(e,r)},L4[t]?{passive:!0}:void 0)}Bt&&e.dom.addEventListener("input",()=>null),eb(e)}function Yo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function B4(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function eb(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>ub(e,r))})}function ub(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function F4(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function z4(e,t){!ub(e,t)&&Gt[t.type]&&(e.editable||!(t.type in Yt))&&Gt[t.type](e,t)}Yt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!U_(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Qr&&pt&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),ma&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Hi(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||N4(e,n)?n.preventDefault():Yo(e,"key")};Yt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Yt.keypress=(e,t)=>{let n=t;if(U_(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Mn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof V)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function Kd(e){return{left:e.clientX,top:e.clientY}}function U4(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function cb(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,n,i.nodeAfter,i.before(s),o,!0):a(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function pa(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function H4(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&q.isSelectable(r)?(pa(e,new q(n),"pointer"),!0):!1}function $4(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof q&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(q.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(pa(e,q.create(e.state.doc,o),"pointer"),!0):!1}function q4(e,t,n,r,o){return cb(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?$4(e,n):H4(e,n))}function V4(e,t,n,r){return cb(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function W4(e,t,n,r){return cb(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||j4(e,n,r)}function j4(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(pa(e,V.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)pa(e,V.create(r,a+1,a+1+s.content.size),"pointer");else if(q.isSelectable(s))pa(e,q.create(r,a),"pointer");else continue;return!0}}function db(e){return Hd(e)}var z_=Mn?"metaKey":"ctrlKey";Gt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=db(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&U4(n,e.input.lastClick)&&!n[z_]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(Kd(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new tb(e,s,n,!!r)):(i=="doubleClick"?V4:W4)(e,s.pos,s.inside,n)?n.preventDefault():Yo(e,"pointer"))};var tb=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[z_],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}let a=o?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof q&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&On&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Yo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>eo(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Kd(t))),this.updateAllowDefault(t),this.allowDefault||!n?Yo(this.view,"pointer"):q4(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Bt&&this.mightDrag&&!this.mightDrag.node.isAtom||pt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(pa(this.view,J.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Yo(this.view,"pointer")}move(t){this.updateAllowDefault(t),Yo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Gt.touchstart=e=>{e.input.lastTouch=Date.now(),db(e),Yo(e,"pointer")};Gt.touchmove=e=>{e.input.lastTouch=Date.now(),Yo(e,"pointer")};Gt.contextmenu=e=>db(e);function U_(e,t){return e.composing?!0:Bt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var K4=Qr?5e3:-1;Yt.compositionstart=Yt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof V&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||pt&&v_&&G4(e)))e.markCursor=e.state.storedMarks||n.marks(),Hd(e,!0),e.markCursor=null;else if(Hd(e,!t.selection.empty),On&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}H_(e,K4)};function G4(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Yt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,H_(e,20))};function H_(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Hd(e),t))}function $_(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=J4());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Y4(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=j6(t.focusNode,t.focusOffset),r=K6(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function J4(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Hd(e,t=!1){if(!(Qr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),$_(e),t||e.docView&&e.docView.dirty){let n=sb(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Z4(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var Ql=sn&&Jo<15||ma&&Z6<604;Gt.copy=Yt.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=Ql?null:n.clipboardData,s=r.content(),{dom:a,text:l}=lb(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):Z4(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function X4(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Q4(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?eu(e,r.value,null,o,t):eu(e,r.textContent,r.innerHTML,o,t)},50)}function eu(e,t,n,r,o){let i=D_(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||B.empty)))return!0;if(!i)return!1;let s=X4(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function q_(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Yt.paste=(e,t)=>{let n=t;if(e.composing&&!Qr)return;let r=Ql?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&eu(e,q_(r),r.getData("text/html"),o,n)?n.preventDefault():Q4(e,n)};var $d=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},eL=Mn?"altKey":"ctrlKey";function V_(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[eL]}Gt.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Kd(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof q?o.to-1:o.to))){if(r&&r.mightDrag)s=q.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=q.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:u,slice:c}=lb(e,a);(!n.dataTransfer.files.length||!pt||y_>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ql?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ql||n.dataTransfer.setData("text/plain",u),e.dragging=new $d(c,V_(e,n),s)};Gt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Yt.dragover=Yt.dragenter=(e,t)=>t.preventDefault();Yt.drop=(e,t)=>{try{tL(e,t,e.dragging)}finally{e.dragging=null}};function tL(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Kd(t));if(!r)return;let o=e.state.doc.resolve(r.pos),i=n&&n.slice;i?e.someProp("transformPasted",p=>{i=p(i,e,!1)}):i=D_(e,q_(t.dataTransfer),Ql?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&V_(e,t));if(e.someProp("handleDrop",p=>p(e,t,i||B.empty,s))){t.preventDefault();return}if(!i)return;t.preventDefault();let a=i?Rd(e.state.doc,o.pos,i):o.pos;a==null&&(a=o.pos);let l=e.state.tr;if(s){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let u=l.mapping.map(a),c=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,i.content.firstChild):l.replaceRange(u,u,i),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&q.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new q(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),l.setSelection(ab(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Gt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&eo(e)},20))};Gt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Gt.beforeinput=(e,t)=>{if(pt&&Qr&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Hi(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Yt)Gt[e]=Yt[e];function tu(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var qd=class e{constructor(t,n){this.toDOM=t,this.spec=n||Wi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new ze(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&tu(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},Vi=class e{constructor(t,n){this.attrs=t,this.spec=n||Wi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new ze(i,s,this)}valid(t,n){return n.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,o+a,i)}}map(t,n,r){return this==Pt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Wi)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=l+r,c;if(c=j_(n,a,u)){for(o||(o=this.children.slice());ia&&d.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let i=t+1,s=i+n.content.size;for(let a=0;ai&&l.type instanceof Vi){let u=Math.max(i,l.from)-i,c=Math.min(s,l.to)-i;uo.map(t,n,Wi));return e.from(r)}forChild(t,n){if(n.isLeaf)return _e.empty;let r=[];for(let o=0;on instanceof _e)?t:t.reduce((n,r)=>n.concat(r instanceof _e?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-h-(p-f);for(let g=0;gy+c-d)continue;let v=a[g]+c-d;p>=v?a[g+1]=f<=v?-2:-1:f>=c&&b&&(a[g]+=b,a[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u=r.content.size){l=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=a[u+2].mapInner(n,b,c+1,e[u]+i+1,s);g!=Pt?(a[u]=d,a[u+1]=p,a[u+2]=g):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=rL(a,e,t,n,o,i,s),c=Wd(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=j_(e,a,l+n);if(u){i=!0;let c=Wd(u,a,n+l+1,r);c!=Pt&&o.push(l,l+a.nodeSize,c)}});let s=W_(i?K_(e):e,-n).sort(ji);for(let a=0;a0;)t++;e.splice(t,0,n)}function zg(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Pt&&t.push(r)}),e.cursorWrapper&&t.push(_e.create(e.state.doc,[e.cursorWrapper.deco])),Vd.from(t)}var oL={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},iL=sn&&Jo<=11,rb=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},ob=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rb,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),iL&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,oL)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(X2(this.view)){if(this.suppressingSelectionUpdates)return eo(this.view);if(sn&&Jo<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Ki(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=ha(i))n.add(i);for(let i=t.anchorNode;i;i=ha(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&X2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||lL(t,d)!=p)&&f.remove()}}}else if((pt||Bt)&&l.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),sL(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||eo(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let g=r.childNodes[b-1],y=g.pmViewDesc;if(g.nodeName=="BR"&&!y){i=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||Nn.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:cL,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+s,head:g+s}}return{doc:m,sel:h,from:s,to:a}}function cL(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Bt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Bt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var dL=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function fL(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let E=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,_=sb(e,E);if(_&&!e.state.selection.eq(_)){if(pt&&Qr&&e.input.lastKeyCode===13&&Date.now()-100C(e,Hi(13,"Enter"))))return;let T=e.state.tr.setSelection(_);E=="pointer"?T.setMeta("pointer",!0):E=="key"&&T.scrollIntoView(),i&&T.setMeta("composition",i),e.dispatch(T)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,u=uL(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Qr)&&o.some(E=>E.nodeType==1&&!dL.test(E.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",E=>E(e,Hi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&l instanceof V&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let E=c_(e,e.state.doc,u.sel);if(E&&!E.eq(e.state.selection)){let _=e.state.tr.setSelection(E);i&&_.setMeta("composition",i),e.dispatch(_)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),sn&&Jo<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),y=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if((ma&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!y&&m.posE(e,Hi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&hL(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",E=>E(e,Hi(8,"Backspace")))){Qr&&pt&&e.domObserver.suppressSelectionUpdates();return}pt&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),Qr&&!y&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(E){return E(e,Hi(13,"Enter"))})},20));let v=h.start,x=h.endA,k=E=>{let _=E||e.state.tr.replace(v,x,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let T=c_(e,_.doc,u.sel);T&&!(pt&&e.composing&&T.empty&&(h.start!=h.endB||e.input.lastChromeDeleteeo(e),20));let E=k(e.state.tr.delete(v,x)),_=c.resolve(h.start).marksAcross(c.resolve(h.endA));_&&E.ensureMarks(_),e.dispatch(E)}else if(h.endA==h.endB&&(w=pL(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let E=k(e.state.tr);w.type=="add"?E.addMark(v,x,w.mark):E.removeMark(v,x,w.mark),e.dispatch(E)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let E=m.parent.textBetween(m.parentOffset,b.parentOffset),_=()=>k(e.state.tr.insertText(E,v,x));e.someProp("handleTextInput",T=>T(e,v,x,E,_))||e.dispatch(_())}else e.dispatch(k());else e.dispatch(k())}function c_(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ab(e,t.resolve(n.anchor),t.resolve(n.head))}function pL(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,a,l;for(let c=0;cc.mark(a.addToSet(c.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||Ug(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function mL(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));r-=s+l-i}if(s=s?i-r:0;i-=l,i&&i=a?i-r:0;i-=l,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}var nu=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Qg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(g_),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=h_(this),p_(this),this.nodeViews=m_(this),this.docView=j2(this.state.doc,f_(this),zg(this),this.dom,this),this.domObserver=new ob(this,(r,o,i,s)=>fL(this,r,o,i,s)),this.domObserver.start(),P4(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&eb(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(g_),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&($_(this),s=!0),this.state=t;let a=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=m_(this);bL(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&eb(this),this.editable=h_(this),p_(this);let l=zg(this),u=f_(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(o.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&e4(this);if(s){this.domObserver.stop();let p=d&&(sn||pt)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&gL(o.selection,t.selection);if(d){let h=pt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Y4(this)),(i||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=j2(t.doc,u,l,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&k4(this))?eo(this,p):(M_(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&t4(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof q){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&U2(this,n.getBoundingClientRect(),t)}else U2(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new $d(t.slice,t.move,o<0?void 0:q.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return a4(this,t)}coordsAtPos(t,n=1){return __(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return f4(this,n||this.state,t)}pasteHTML(t,n){return eu(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return eu(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return lb(this,t)}destroy(){this.docView&&(B4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],zg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,V6())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return z4(this,t)}domSelectionRange(){let t=this.domSelection();return t?Bt&&this.root.nodeType===11&&Y6(this.dom.ownerDocument)==this.dom&&aL(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};nu.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function f_(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[ze.node(0,e.state.doc.content.size,t)]}function p_(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:ze.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function h_(e){return!e.someProp("editable",t=>t(e.state)===!1)}function gL(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function m_(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function bL(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function g_(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var to={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Yd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},yL=typeof navigator<"u"&&/Mac/.test(navigator.platform),vL=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(ot=0;ot<10;ot++)to[48+ot]=to[96+ot]=String(ot);var ot;for(ot=1;ot<=24;ot++)to[ot+111]="F"+ot;var ot;for(ot=65;ot<=90;ot++)to[ot]=String.fromCharCode(ot+32),Yd[ot]=String.fromCharCode(ot);var ot;for(Gd in to)Yd.hasOwnProperty(Gd)||(Yd[Gd]=to[Gd]);var Gd;function G_(e){var t=yL&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||vL&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Yd:to)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var xL=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),kL=typeof navigator<"u"&&/Win/.test(navigator.platform);function wL(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a{for(var n in t)_L(e,n,{get:t[n],enumerable:!0})};function nf(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var rf=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,(...u)=>{let c=a(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!e,l=e||o.tr,u=()=>(!a&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(l,t),b=f(...h)(m);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>l(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:nf({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)(s)]))}};return s}},oS={};vb(oS,{blur:()=>SL,clearContent:()=>CL,clearNodes:()=>TL,command:()=>NL,createParagraphNear:()=>AL,cut:()=>ML,deleteCurrentNode:()=>RL,deleteNode:()=>OL,deleteRange:()=>DL,deleteSelection:()=>IL,enter:()=>LL,exitCode:()=>PL,extendMarkRange:()=>BL,first:()=>FL,focus:()=>zL,forEach:()=>UL,insertContent:()=>HL,insertContentAt:()=>VL,joinBackward:()=>KL,joinDown:()=>jL,joinForward:()=>GL,joinItemBackward:()=>YL,joinItemForward:()=>JL,joinTextblockBackward:()=>ZL,joinTextblockForward:()=>XL,joinUp:()=>WL,keyboardShortcut:()=>e8,lift:()=>t8,liftEmptyBlock:()=>n8,liftListItem:()=>r8,newlineInCode:()=>o8,resetAttributes:()=>i8,scrollIntoView:()=>s8,selectAll:()=>a8,selectNodeBackward:()=>l8,selectNodeForward:()=>u8,selectParentNode:()=>c8,selectTextblockEnd:()=>d8,selectTextblockStart:()=>f8,setContent:()=>p8,setMark:()=>T8,setMeta:()=>N8,setNode:()=>A8,setNodeSelection:()=>M8,setTextDirection:()=>R8,setTextSelection:()=>O8,sinkListItem:()=>D8,splitBlock:()=>I8,splitListItem:()=>L8,toggleList:()=>P8,toggleMark:()=>B8,toggleNode:()=>F8,toggleWrap:()=>z8,undoInputRule:()=>U8,unsetAllMarks:()=>H8,unsetMark:()=>$8,unsetTextDirection:()=>q8,updateAttributes:()=>V8,wrapIn:()=>W8,wrapInList:()=>j8});var SL=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),CL=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),TL=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(a,l)=>{if(a.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Jr(p);if(a.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},NL=e=>t=>e(t),AL=()=>({state:e,dispatch:t})=>Mg(e,t),ML=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new V(r.doc.resolve(Math.max(s-1,0)))),!0},RL=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){let a=o.before(i),l=o.after(i);e.delete(a,l).scrollIntoView()}return!0}return!1};function Ye(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var OL=e=>({tr:t,state:n,dispatch:r})=>{let o=Ye(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let l=i.before(s),u=i.after(s);t.delete(l,u).scrollIntoView()}return!0}return!1},DL=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},IL=()=>({state:e,dispatch:t})=>Ld(e,t),LL=()=>({commands:e})=>e.keyboardShortcut("Enter"),PL=()=>({state:e,dispatch:t})=>Ag(e,t);function xb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function tf(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:xb(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function iS(e,t,n={}){return e.find(r=>r.type===t&&tf(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function J_(e,t,n={}){return!!iS(e,t,n)}function kb(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!iS([...o.node.marks],t,n)))return;let s=o.index,a=e.start()+o.offset,l=s+1,u=a+o.node.nodeSize;for(;s>0&&J_([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l({tr:n,state:r,dispatch:o})=>{let i=ro(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(o){let d=kb(l,i,t);if(d&&d.from<=u&&d.to>=c){let f=V.create(s,d.from,d.to);n.setSelection(f)}}return!0},FL=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};let s=()=>{(sf()||aS())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!of(n.state.selection))return s(),!0;let a=sS(o.doc,e)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},UL=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),HL=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),lS=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&lS(r)}return e};function Jd(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return lS(n)}function su(e,t,n){if(e instanceof on||e instanceof N)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return N.fromArray(e.map(a=>t.nodeFromJSON(a)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return su("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="",l=new Vo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Nn.fromSchema(l).parseSlice(Jd(e),n.parseOptions):Nn.fromSchema(l).parse(Jd(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let i=Nn.fromSchema(t);return n.slice?i.parseSlice(Jd(e),n.parseOptions).content:i.parse(Jd(e),n.parseOptions)}return su("",t,n)}function $L(e,t,n){let r=e.steps.length-1;if(r{s===0&&(s=c)}),e.setSelection(J.near(e.doc.resolve(s),n))}var qL=e=>!("type"in e),VL=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a,l=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{su(t,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){l(b)}try{a=su(t,i.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return l(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((qL(a)?a:[a]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof N){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else{m=a;let b=r.doc.resolve(c),g=b.node(),y=b.parentOffset===0,v=g.isText||g.isTextblock,x=g.content.size>0;y&&v&&x&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&$L(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},WL=()=>({state:e,dispatch:t})=>N2(e,t),jL=()=>({state:e,dispatch:t})=>A2(e,t),KL=()=>({state:e,dispatch:t})=>kg(e,t),GL=()=>({state:e,dispatch:t})=>_g(e,t),YL=()=>({state:e,dispatch:t,tr:n})=>{try{let r=zi(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},JL=()=>({state:e,dispatch:t,tr:n})=>{try{let r=zi(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},ZL=()=>({state:e,dispatch:t})=>_2(e,t),XL=()=>({state:e,dispatch:t})=>S2(e,t);function uS(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function QL(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:o})=>{let i=QL(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function mr(e,t,n={}){let{from:r,to:o,empty:i}=e.selection,s=t?Ye(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);a.push({node:d,from:p,to:h})});let l=o-r,u=a.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>tf(d.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var t8=(e,t={})=>({state:n,dispatch:r})=>{let o=Ye(e,n.schema);return mr(n,o,t)?M2(n,r):!1},n8=()=>({state:e,dispatch:t})=>Rg(e,t),r8=e=>({state:t,dispatch:n})=>{let r=Ye(e,t.schema);return P2(r)(t,n)},o8=()=>({state:e,dispatch:t})=>Tg(e,t);function af(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Z_(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var i8=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,a=af(typeof e=="string"?e:e.name,r.schema);if(!a)return!1;a==="node"&&(i=Ye(e,r.schema)),a==="mark"&&(s=ro(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{i&&i===c.type&&(l=!0,o&&n.setNodeMarkup(d,void 0,Z_(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(l=!0,o&&n.addMark(d,d+c.nodeSize,s.create(Z_(f.attrs,t))))})})}),l},s8=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),a8=()=>({tr:e,dispatch:t})=>{if(t){let n=new Kt(e.doc);e.setSelection(n)}return!0},l8=()=>({state:e,dispatch:t})=>wg(e,t),u8=()=>({state:e,dispatch:t})=>Sg(e,t),c8=()=>({state:e,dispatch:t})=>R2(e,t),d8=()=>({state:e,dispatch:t})=>Dg(e,t),f8=()=>({state:e,dispatch:t})=>Og(e,t);function bb(e,t,n={},r={}){return su(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var p8=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{let{doc:l}=i;if(r.preserveWhitespace!=="full"){let u=bb(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function cS(e,t){let n=ro(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});let a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function wb(e,t){let n=new Wo(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function h8(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function dS(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Eb(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function uf(e){return t=>Eb(t.$from,e)}function Z(e,t,n){return e.config[t]===void 0&&e.parent?Z(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Z(e.parent,t,n):null}):e.config[t]}function _b(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=Z(t,"addExtensions",n);return r?[t,..._b(r())]:t}).flat(10)}function xa(e,t){let n=Kr.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function fS(e){return typeof e=="function"}function be(e,t=void 0,...n){return fS(e)?t?e.bind(t)(...n):e(...n):e}function m8(e={}){return Object.keys(e).length===0&&e.constructor===Object}function ya(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function pS(e){let t=[],{nodeExtensions:n,markExtensions:r}=ya(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{let a={name:s.name,options:s.options,storage:s.storage,extensions:o},l=Z(s,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(s=>{let a={name:s.name,options:s.options,storage:s.storage},l=Z(s,"addAttributes",a);if(!l)return;let u=l();Object.entries(u).forEach(([c,d])=>{let f={...i,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:s.name,name:c,attribute:f})})}),t}function re(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let a=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],u=a.filter(c=>!l.includes(c));r[o]=[...l,...u].join(" ")}else if(o==="style"){let a=i?i.split(";").map(c=>c.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),a.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function va(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>re(n,r),{})}function g8(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function X_(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((i,s)=>{let a=s.attribute.parseHTML?s.attribute.parseHTML(n):g8(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function Q_(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&m8(n)?!1:n!=null))}function eS(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function b8(e,t){var n;let r=pS(e),{nodeExtensions:o,markExtensions:i}=ya(e),s=(n=o.find(u=>Z(u,"topNode")))==null?void 0:n.name,a=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,y)=>{let v=Z(y,"extendNodeSchema",d);return{...g,...v?v(u):{}}},{}),p=Q_({...f,content:be(Z(u,"content",d)),marks:be(Z(u,"marks",d)),group:be(Z(u,"group",d)),inline:be(Z(u,"inline",d)),atom:be(Z(u,"atom",d)),selectable:be(Z(u,"selectable",d)),draggable:be(Z(u,"draggable",d)),code:be(Z(u,"code",d)),whitespace:be(Z(u,"whitespace",d)),linebreakReplacement:be(Z(u,"linebreakReplacement",d)),defining:be(Z(u,"defining",d)),isolating:be(Z(u,"isolating",d)),attrs:Object.fromEntries(c.map(eS))}),h=be(Z(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>X_(g,c)));let m=Z(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:va(g,c)}));let b=Z(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),l=Object.fromEntries(i.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let y=Z(g,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=Q_({...f,inclusive:be(Z(u,"inclusive",d)),excludes:be(Z(u,"excludes",d)),group:be(Z(u,"group",d)),spanning:be(Z(u,"spanning",d)),code:be(Z(u,"code",d)),attrs:Object.fromEntries(c.map(eS))}),h=be(Z(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>X_(b,c)));let m=Z(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:va(b,c)})),[u.name,p]}));return new Vo({topNode:s,nodes:a,marks:l})}function y8(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Sb(e){return e.sort((n,r)=>{let o=Z(n,"priority")||100,i=Z(r,"priority")||100;return o>i?-1:or.name)).length,t}function mS(e,t,n){let{from:r,to:o}=t,{blockSeparator:i=` +`);return{dom:l,text:f,slice:t}}function aE(e,t,n,r,o){let a=o.parent.type.spec.code,i,s;if(!n&&!t)return null;let l=!!t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,a||r,e)}),a)return s=new B(_.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp("transformPasted",f=>{s=f(s,e,!0)}),s;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)s=d;else{let f=o.marks(),{schema:p}=e.state,h=jr.fromSchema(p);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=i.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),i=b6(n),vu&&x6(i);let u=i&&i.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||An.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!h6.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)s=y6(T2(s,+c[1],+c[2]),c[4]);else if(s=B.maxOpen(m6(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let p=s.content.firstChild;d{s=d(s,e,l)}),s}var h6=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function m6(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),a,i=[];if(e.forEach(s=>{if(!i)return;let l=o.findWrapping(s.type),u;if(!l)return i=null;if(u=i.length&&a.length&&sE(l,a,s,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=lE(i[i.length-1],a.length));let c=iE(s,l);i.push(c),o=o.matchType(c.type),a=l}}),i)return _.from(i)}return e}function iE(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,_.from(e));return e}function sE(e,t,n,r,o){if(o1&&(a=0),o=n&&(s=t<0?i.contentMatchAt(0).fillBefore(s,a<=o).append(s):s.append(i.contentMatchAt(i.childCount).fillBefore(_.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(s))}function T2(e,t,n){return tn})),ab.createHTML(e)):e}function b6(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=cE().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&uE[r[1].toLowerCase()])&&(e=o.map(a=>"<"+a+">").join("")+e+o.map(a=>"").reverse().join("")),n.innerHTML=g6(e),o)for(let a=0;a=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=_.from(l.create(r[s+1],o)),a++,i++}return new B(o,a,i)}var Xt={},Zt={},k6={touchstart:!0,touchmove:!0},kb=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function v6(e){for(let t in Xt){let n=Xt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{w6(e,r)&&!Tb(e,r)&&(e.editable||!(r.type in Zt))&&n(e,r)},k6[t]?{passive:!0}:void 0)}Ft&&e.dom.addEventListener("input",()=>null),vb(e)}function Qo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function C6(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function vb(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Tb(e,r))})}function Tb(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function w6(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function S6(e,t){!Tb(e,t)&&Xt[t.type]&&(e.editable||!(t.type in Zt))&&Xt[t.type](e,t)}Zt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!fE(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(eo&&ht&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),vs&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Wa(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||p6(e,n)?n.preventDefault():Qo(e,"key")};Zt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Zt.keypress=(e,t)=>{let n=t;if(fE(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Mn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof V)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),a=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o,a))&&e.dispatch(a()),n.preventDefault()}};function pf(e){return{left:e.clientX,top:e.clientY}}function E6(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Mb(e,t,n,r,o){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let i=a.depth+1;i>0;i--)if(e.someProp(t,s=>i>a.depth?s(e,n,a.nodeAfter,a.before(i),o,!0):s(e,n,a.node(i),a.before(i),o,!1)))return!0;return!1}function ys(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function L6(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(ys(e,new $(n),"pointer"),!0):!1}function I6(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof $&&(r=n.node);let a=e.state.doc.resolve(t);for(let i=a.depth+1;i>0;i--){let s=i>a.depth?a.nodeAfter:a.node(i);if($.isSelectable(s)){r&&n.$from.depth>0&&i>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?o=a.before(n.$from.depth):o=a.before(i);break}}return o!=null?(ys(e,$.create(e.state.doc,o),"pointer"),!0):!1}function _6(e,t,n,r,o){return Mb(e,"handleClickOn",t,n,r)||e.someProp("handleClick",a=>a(e,t,r))||(o?I6(e,n):L6(e,n))}function A6(e,t,n,r){return Mb(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function T6(e,t,n,r){return Mb(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||M6(e,n,r)}function M6(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(ys(e,V.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let a=o.depth+1;a>0;a--){let i=a>o.depth?o.nodeAfter:o.node(a),s=o.before(a);if(i.inlineContent)ys(e,V.create(r,s+1,s+1+i.content.size),"pointer");else if($.isSelectable(i))ys(e,$.create(r,s),"pointer");else continue;return!0}}function Nb(e){return sf(e)}var dE=Mn?"metaKey":"ctrlKey";Xt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Nb(e),o=Date.now(),a="singleClick";o-e.input.lastClick.time<500&&E6(n,e.input.lastClick)&&!n[dE]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?a="doubleClick":e.input.lastClick.type=="doubleClick"&&(a="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:a,button:n.button};let i=e.posAtCoords(pf(n));i&&(a=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Cb(e,i,n,!!r)):(a=="doubleClick"?A6:T6)(e,i.pos,i.inside,n)?n.preventDefault():Qo(e,"pointer"))};var Cb=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[dE],this.allowDefault=r.shiftKey;let a,i;if(n.inside>-1)a=t.state.doc.nodeAt(n.inside),i=n.inside;else{let c=t.state.doc.resolve(n.pos);a=c.parent,i=c.depth?c.before():0}let s=o?null:r.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||u instanceof $&&u.from<=i&&u.to>i)&&(this.mightDrag={node:a,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Rn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Qo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>to(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(pf(t))),this.updateAllowDefault(t),this.allowDefault||!n?Qo(this.view,"pointer"):_6(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Ft&&this.mightDrag&&!this.mightDrag.node.isAtom||ht&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ys(this.view,Z.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Qo(this.view,"pointer")}move(t){this.updateAllowDefault(t),Qo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Xt.touchstart=e=>{e.input.lastTouch=Date.now(),Nb(e),Qo(e,"pointer")};Xt.touchmove=e=>{e.input.lastTouch=Date.now(),Qo(e,"pointer")};Xt.contextmenu=e=>Nb(e);function fE(e,t){return e.composing?!0:Ft&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var N6=eo?5e3:-1;Zt.compositionstart=Zt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof V&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||ht&&W2&&R6(e)))e.markCursor=e.state.storedMarks||n.marks(),sf(e,!0),e.markCursor=null;else if(sf(e,!t.selection.empty),Rn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,a=r.focusOffset;o&&o.nodeType==1&&a!=0;){let i=a<0?o.lastChild:o.childNodes[a-1];if(!i)break;if(i.nodeType==3){let s=e.domSelection();s&&s.collapse(i,i.nodeValue.length);break}else o=i,a=-1}}e.input.composing=!0}pE(e,N6)};function R6(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Zt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,pE(e,20))};function pE(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>sf(e),t))}function hE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=O6());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function D6(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=MP(t.focusNode,t.focusOffset),r=NP(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,a=e.domObserver.lastChangedTextNode;if(n==a||r==a)return a;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let i=n.pmViewDesc;if(!(!i||!i.isText(n.nodeValue)))return r}}return n||r}function O6(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function sf(e,t=!1){if(!(eo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),hE(e),t||e.docView&&e.docView.dirty){let n=Ib(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function P6(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var gu=sn&&ea<15||vs&&PP<604;Xt.copy=Zt.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let a=gu?null:n.clipboardData,i=r.content(),{dom:s,text:l}=Ab(e,i);a?(n.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):P6(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function B6(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function F6(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?bu(e,r.value,null,o,t):bu(e,r.textContent,r.innerHTML,o,t)},50)}function bu(e,t,n,r,o){let a=aE(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,a||B.empty)))return!0;if(!a)return!1;let i=B6(a),s=i?e.state.tr.replaceSelectionWith(i,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function mE(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Zt.paste=(e,t)=>{let n=t;if(e.composing&&!eo)return;let r=gu?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&bu(e,mE(r),r.getData("text/html"),o,n)?n.preventDefault():F6(e,n)};var lf=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},z6=Mn?"altKey":"ctrlKey";function gE(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[z6]}Xt.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,a=o.empty?null:e.posAtCoords(pf(n)),i;if(!(a&&a.pos>=o.from&&a.pos<=(o instanceof $?o.to-1:o.to))){if(r&&r.mightDrag)i=$.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(i=$.create(e.state.doc,d.posBefore))}}let s=(i||e.state.selection).content(),{dom:l,text:u,slice:c}=Ab(e,s);(!n.dataTransfer.files.length||!ht||V2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(gu?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",gu||n.dataTransfer.setData("text/plain",u),e.dragging=new lf(c,gE(e,n),i)};Xt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Zt.dragover=Zt.dragenter=(e,t)=>t.preventDefault();Zt.drop=(e,t)=>{try{U6(e,t,e.dragging)}finally{e.dragging=null}};function U6(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(pf(t));if(!r)return;let o=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp("transformPasted",p=>{a=p(a,e,!1)}):a=aE(e,mE(t.dataTransfer),gu?null:t.dataTransfer.getData("text/html"),!1,o);let i=!!(n&&gE(e,t));if(e.someProp("handleDrop",p=>p(e,t,a||B.empty,i))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?Zd(e.state.doc,o.pos,a):o.pos;s==null&&(s=o.pos);let l=e.state.tr;if(i){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let u=l.mapping.map(s),c=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,a.content.firstChild):l.replaceRange(u,u,a),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&$.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))l.setSelection(new $(f));else{let p=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),l.setSelection(_b(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Xt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&to(e)},20))};Xt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Xt.beforeinput=(e,t)=>{if(ht&&eo&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",a=>a(e,Wa(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Zt)Xt[e]=Zt[e];function xu(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var uf=class e{constructor(t,n){this.toDOM=t,this.spec=n||Xa,this.side=this.spec.side||0}map(t,n,r,o){let{pos:a,deleted:i}=t.mapResult(n.from+o,this.side<0?-1:1);return i?null:new Ue(a-r,a-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&xu(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},ja=class e{constructor(t,n){this.attrs=t,this.spec=n||Xa}map(t,n,r,o){let a=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,i=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return a>=i?null:new Ue(a,i,this)}valid(t,n){return n.from=t&&(!a||a(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let i=0;it){let s=this.children[i]+1;this.children[i+2].findInner(t-s,n-s,r,o+s,a)}}map(t,n,r){return this==Bt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Xa)}mapInner(t,n,r,o,a){let i;for(let s=0;s{let u=l+r,c;if(c=xE(n,s,u)){for(o||(o=this.children.slice());as&&d.to=t){this.children[s]==t&&(r=this.children[s+2]);break}let a=t+1,i=a+n.content.size;for(let s=0;sa&&l.type instanceof ja){let u=Math.max(a,l.from)-a,c=Math.min(i,l.to)-a;uo.map(t,n,Xa));return e.from(r)}forChild(t,n){if(n.isLeaf)return Ee.empty;let r=[];for(let o=0;on instanceof Ee)?t:t.reduce((n,r)=>n.concat(r instanceof Ee?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-h-(p-f);for(let g=0;gx+c-d)continue;let y=s[g]+c-d;p>=y?s[g+1]=f<=y?-2:-1:f>=c&&b&&(s[g]+=b,s[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u=r.content.size){l=!0;continue}let f=n.map(e[u+1]+a,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=s[u+2].mapInner(n,b,c+1,e[u]+a+1,i);g!=Bt?(s[u]=d,s[u+1]=p,s[u+2]=g):(s[u+1]=-2,l=!0)}else l=!0}if(l){let u=q6(s,e,t,n,o,a,i),c=df(u,r,0,i);t=c.local;for(let d=0;dn&&i.to{let u=xE(e,s,l+n);if(u){a=!0;let c=df(u,s,n+l+1,r);c!=Bt&&o.push(l,l+s.nodeSize,c)}});let i=bE(a?yE(e):e,-n).sort(Za);for(let s=0;s0;)t++;e.splice(t,0,n)}function ib(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Bt&&t.push(r)}),e.cursorWrapper&&t.push(Ee.create(e.state.doc,[e.cursorWrapper.deco])),cf.from(t)}var $6={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},V6=sn&&ea<=11,Sb=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},Eb=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Sb,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),V6&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,$6)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(S2(this.view)){if(this.suppressingSelectionUpdates)return to(this.view);if(sn&&ea<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Ja(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let a=t.focusNode;a;a=ks(a))n.add(a);for(let a=t.anchorNode;a;a=ks(a))if(n.has(a)){r=a;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&S2(t)&&!this.ignoreSelectionChange(r),a=-1,i=-1,s=!1,l=[];if(t.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||K6(t,d)!=p)&&f.remove()}}}else if((ht||Ft)&&l.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;a<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(a>-1&&(t.docView.markDirty(a,i),W6(t)),this.handleDOMChange(a,i,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||to(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;b--){let g=r.childNodes[b-1],x=g.pmViewDesc;if(g.nodeName=="BR"&&!x){a=b;break}if(!x||x.size)break}let d=e.state.doc,f=e.someProp("domParser")||An.fromSchema(e.state.schema),p=d.resolve(i),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:a,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:X6,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+i,head:g+i}}return{doc:m,sel:h,from:i,to:s}}function X6(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Ft&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Ft&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Z6=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function J6(e,t,n,r,o){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let w=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,S=Ib(e,w);if(S&&!e.state.selection.eq(S)){if(ht&&eo&&e.input.lastKeyCode===13&&Date.now()-100L(e,Wa(13,"Enter"))))return;let I=e.state.tr.setSelection(S);w=="pointer"?I.setMeta("pointer",!0):w=="key"&&I.scrollIntoView(),a&&I.setMeta("composition",a),e.dispatch(I)}return}let i=e.state.doc.resolve(t),s=i.sharedDepth(n);t=i.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l=e.state.selection,u=j6(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||eo)&&o.some(w=>w.nodeType==1&&!Z6.test(w.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",w=>w(e,Wa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&l instanceof V&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let w=P2(e,e.state.doc,u.sel);if(w&&!w.eq(e.state.selection)){let S=e.state.tr.setSelection(w);a&&S.setMeta("composition",a),e.dispatch(S)}}return}e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),sn&&ea<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),x=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if((vs&&e.input.lastIOSEnter>Date.now()-225&&(!x||o.some(w=>w.nodeName=="DIV"||w.nodeName=="P"))||!x&&m.posw(e,Wa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&Q6(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",w=>w(e,Wa(8,"Backspace")))){eo&&ht&&e.domObserver.suppressSelectionUpdates();return}ht&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),eo&&!x&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(w){return w(e,Wa(13,"Enter"))})},20));let y=h.start,k=h.endA,v=w=>{let S=w||e.state.tr.replace(y,k,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let I=P2(e,S.doc,u.sel);I&&!(ht&&e.composing&&I.empty&&(h.start!=h.endB||e.input.lastChromeDeleteto(e),20));let w=v(e.state.tr.delete(y,k)),S=c.resolve(h.start).marksAcross(c.resolve(h.endA));S&&w.ensureMarks(S),e.dispatch(w)}else if(h.endA==h.endB&&(C=Y6(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let w=v(e.state.tr);C.type=="add"?w.addMark(y,k,C.mark):w.removeMark(y,k,C.mark),e.dispatch(w)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let w=m.parent.textBetween(m.parentOffset,b.parentOffset),S=()=>v(e.state.tr.insertText(w,y,k));e.someProp("handleTextInput",I=>I(e,y,k,w,S))||e.dispatch(S())}else e.dispatch(v());else e.dispatch(v())}function P2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_b(e,t.resolve(n.anchor),t.resolve(n.head))}function Y6(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,a=r,i,s,l;for(let c=0;cc.mark(s.addToSet(c.marks));else if(o.length==0&&a.length==1)s=a[0],i="remove",l=c=>c.mark(s.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||sb(i,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let a=e.node(r).maybeChild(e.indexAfter(r));for(;a&&!a.isLeaf;)a=a.firstChild,o++}return o}function e4(e,t,n,r,o){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:i,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,a-Math.min(i,s));r-=i+l-a}if(i=i?a-r:0;a-=l,a&&a=s?a-r:0;a-=l,a&&a=56320&&t<=57343&&n>=55296&&n<=56319}var yu=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new kb,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(q2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=U2(this),z2(this),this.nodeViews=H2(this),this.docView=x2(this.state.doc,F2(this),ib(this),this.dom,this),this.domObserver=new Eb(this,(r,o,a,i)=>J6(this,r,o,a,i)),this.domObserver.start(),v6(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&vb(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(q2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,a=!1,i=!1;t.storedMarks&&this.composing&&(hE(this),i=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=H2(this);n4(p,this.nodeViews)&&(this.nodeViews=p,a=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&vb(this),this.editable=U2(this),z2(this);let l=ib(this),u=F2(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=a||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(o.selection))&&(i=!0);let f=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&zP(this);if(i){this.domObserver.stop();let p=d&&(sn||ht)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&t4(o.selection,t.selection);if(d){let h=ht?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=D6(this)),(a||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=x2(t.doc,u,l,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&i6(this))?to(this,p):(nE(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&UP(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof $){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&f2(this,n.getBoundingClientRect(),t)}else f2(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(a))==r.node&&(o=a)}this.dragging=new lf(t.slice,t.move,o<0?void 0:$.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let i=0;in.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return GP(this,t)}coordsAtPos(t,n=1){return Z2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return JP(this,n||this.state,t)}pasteHTML(t,n){return bu(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return bu(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Ab(this,t)}destroy(){this.docView&&(C6(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ib(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,AP())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return S6(this,t)}domSelectionRange(){let t=this.domSelection();return t?Ft&&this.root.nodeType===11&&DP(this.dom.ownerDocument)==this.dom&&G6(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};yu.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function F2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Ue.node(0,e.state.doc.content.size,t)]}function z2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Ue.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function U2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function t4(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function H2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function n4(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function q2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var no={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},mf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},r4=typeof navigator<"u"&&/Mac/.test(navigator.platform),o4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(at=0;at<10;at++)no[48+at]=no[96+at]=String(at);var at;for(at=1;at<=24;at++)no[at+111]="F"+at;var at;for(at=65;at<=90;at++)no[at]=String.fromCharCode(at+32),mf[at]=String.fromCharCode(at);var at;for(hf in no)mf.hasOwnProperty(hf)||(mf[hf]=no[hf]);var hf;function kE(e){var t=r4&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||o4&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?mf:no)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var a4=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),i4=typeof navigator<"u"&&/Win/.test(navigator.platform);function s4(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,a,i;for(let s=0;s{for(var n in t)u4(e,n,{get:t[n],enumerable:!0})};function Cf(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,a=n.storedMarks,n}}}var wf=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,a=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([i,s])=>[i,(...u)=>{let c=s(...u)(a);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i=[],s=!!e,l=e||o.tr,u=()=>(!s&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(l),i.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(l,t),b=f(...h)(m);return i.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,a=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...u)=>l(...u)({...a,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i={tr:e,editor:r,view:a,state:Cf({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([s,l])=>[s,(...u)=>l(...u)(i)]))}};return i}},TE={};Ub(TE,{blur:()=>c4,clearContent:()=>d4,clearNodes:()=>f4,command:()=>p4,createParagraphNear:()=>h4,cut:()=>m4,deleteCurrentNode:()=>g4,deleteNode:()=>b4,deleteRange:()=>x4,deleteSelection:()=>y4,enter:()=>k4,exitCode:()=>v4,extendMarkRange:()=>C4,first:()=>w4,focus:()=>S4,forEach:()=>E4,insertContent:()=>L4,insertContentAt:()=>A4,joinBackward:()=>N4,joinDown:()=>M4,joinForward:()=>R4,joinItemBackward:()=>D4,joinItemForward:()=>O4,joinTextblockBackward:()=>P4,joinTextblockForward:()=>B4,joinUp:()=>T4,keyboardShortcut:()=>z4,lift:()=>U4,liftEmptyBlock:()=>H4,liftListItem:()=>q4,newlineInCode:()=>$4,resetAttributes:()=>V4,scrollIntoView:()=>W4,selectAll:()=>G4,selectNodeBackward:()=>K4,selectNodeForward:()=>j4,selectParentNode:()=>X4,selectTextblockEnd:()=>Z4,selectTextblockStart:()=>J4,setContent:()=>Y4,setMark:()=>fB,setMeta:()=>pB,setNode:()=>hB,setNodeSelection:()=>mB,setTextDirection:()=>gB,setTextSelection:()=>bB,sinkListItem:()=>xB,splitBlock:()=>yB,splitListItem:()=>kB,toggleList:()=>vB,toggleMark:()=>CB,toggleNode:()=>wB,toggleWrap:()=>SB,undoInputRule:()=>EB,unsetAllMarks:()=>LB,unsetMark:()=>IB,unsetTextDirection:()=>_B,updateAttributes:()=>AB,wrapIn:()=>TB,wrapInList:()=>MB});var c4=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),d4=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),f4=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:a,$to:i})=>{e.doc.nodesBetween(a.pos,i.pos,(s,l)=>{if(s.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+s.nodeSize)),p=d.blockRange(f);if(!p)return;let h=Jr(p);if(s.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},p4=e=>t=>e(t),h4=()=>({state:e,dispatch:t})=>Jg(e,t),m4=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,a=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let i=r.mapping.map(t);return r.insert(i,a.content),r.setSelection(new V(r.doc.resolve(Math.max(i-1,0)))),!0},g4=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===r.type){if(t){let s=o.before(a),l=o.after(a);e.delete(s,l).scrollIntoView()}return!0}return!1};function Ze(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var b4=e=>({tr:t,state:n,dispatch:r})=>{let o=Ze(e,n.schema),a=t.selection.$anchor;for(let i=a.depth;i>0;i-=1)if(a.node(i).type===o){if(r){let l=a.before(i),u=a.after(i);t.delete(l,u).scrollIntoView()}return!0}return!1},x4=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},y4=()=>({state:e,dispatch:t})=>ef(e,t),k4=()=>({commands:e})=>e.keyboardShortcut("Enter"),v4=()=>({state:e,dispatch:t})=>Zg(e,t);function Hb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function vf(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:Hb(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function ME(e,t,n={}){return e.find(r=>r.type===t&&vf(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function CE(e,t,n={}){return!!ME(e,t,n)}function qb(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!ME([...o.node.marks],t,n)))return;let i=o.index,s=e.start()+o.offset,l=i+1,u=s+o.node.nodeSize;for(;i>0&&CE([...e.parent.child(i-1).marks],t,n);)i-=1,s-=e.parent.child(i).nodeSize;for(;l({tr:n,state:r,dispatch:o})=>{let a=oo(e,r.schema),{doc:i,selection:s}=n,{$from:l,from:u,to:c}=s;if(o){let d=qb(l,a,t);if(d&&d.from<=u&&d.to>=c){let f=V.create(i,d.from,d.to);n.setSelection(f)}}return!0},w4=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:a})=>{t={scrollIntoView:!0,...t};let i=()=>{(Ef()||RE())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(a&&e===null&&!Sf(n.state.selection))return i(),!0;let s=NE(o.doc,e)||n.state.selection,l=n.state.selection.eq(s);return a&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},E4=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),L4=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),DE=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&DE(r)}return e};function gf(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return DE(n)}function wu(e,t,n){if(e instanceof an||e instanceof _)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return _.fromArray(e.map(s=>t.nodeFromJSON(s)));let i=t.nodeFromJSON(e);return n.errorOnInvalidContent&&i.check(),i}catch(a){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return wu("",t,n)}if(o){if(n.errorOnInvalidContent){let i=!1,s="",l=new jo({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(i=!0,s=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?An.fromSchema(l).parseSlice(gf(e),n.parseOptions):An.fromSchema(l).parse(gf(e),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}let a=An.fromSchema(t);return n.slice?a.parseSlice(gf(e),n.parseOptions).content:a.parse(gf(e),n.parseOptions)}return wu("",t,n)}function I4(e,t,n){let r=e.steps.length-1;if(r{i===0&&(i=c)}),e.setSelection(Z.near(e.doc.resolve(i),n))}var _4=e=>!("type"in e),A4=(e,t,n)=>({tr:r,dispatch:o,editor:a})=>{var i;if(o){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s,l=b=>{a.emit("contentError",{editor:a,error:b,disableCollaboration:()=>{"collaboration"in a.storage&&typeof a.storage.collaboration=="object"&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{wu(t,a.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){l(b)}try{s=wu(t,a.schema,{parseOptions:u,errorOnInvalidContent:(i=n.errorOnInvalidContent)!=null?i:a.options.enableContentCheck})}catch(b){return l(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((_4(s)?s:[s]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof _){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else{m=s;let b=r.doc.resolve(c),g=b.node(),x=b.parentOffset===0,y=g.isText||g.isTextblock,k=g.content.size>0;x&&y&&k&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&I4(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},T4=()=>({state:e,dispatch:t})=>e2(e,t),M4=()=>({state:e,dispatch:t})=>t2(e,t),N4=()=>({state:e,dispatch:t})=>qg(e,t),R4=()=>({state:e,dispatch:t})=>Wg(e,t),D4=()=>({state:e,dispatch:t,tr:n})=>{try{let r=$a(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},O4=()=>({state:e,dispatch:t,tr:n})=>{try{let r=$a(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},P4=()=>({state:e,dispatch:t})=>ZS(e,t),B4=()=>({state:e,dispatch:t})=>JS(e,t);function OE(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function F4(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,a,i;for(let s=0;s({editor:t,view:n,tr:r,dispatch:o})=>{let a=F4(e).split(/-(?!$)/),i=a.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),s=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,s))});return l?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function gr(e,t,n={}){let{from:r,to:o,empty:a}=e.selection,i=t?Ze(t,e.schema):null,s=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);s.push({node:d,from:p,to:h})});let l=o-r,u=s.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>vf(d.node.attrs,n,{strict:!1}));return a?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var U4=(e,t={})=>({state:n,dispatch:r})=>{let o=Ze(e,n.schema);return gr(n,o,t)?n2(n,r):!1},H4=()=>({state:e,dispatch:t})=>Yg(e,t),q4=e=>({state:t,dispatch:n})=>{let r=Ze(e,t.schema);return l2(r)(t,n)},$4=()=>({state:e,dispatch:t})=>jg(e,t);function Lf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function wE(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var V4=(e,t)=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null,s=Lf(typeof e=="string"?e:e.name,r.schema);if(!s)return!1;s==="node"&&(a=Ze(e,r.schema)),s==="mark"&&(i=oo(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{a&&a===c.type&&(l=!0,o&&n.setNodeMarkup(d,void 0,wE(c.attrs,t))),i&&c.marks.length&&c.marks.forEach(f=>{i===f.type&&(l=!0,o&&n.addMark(d,d+c.nodeSize,i.create(wE(f.attrs,t))))})})}),l},W4=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),G4=()=>({tr:e,dispatch:t})=>{if(t){let n=new jt(e.doc);e.setSelection(n)}return!0},K4=()=>({state:e,dispatch:t})=>$g(e,t),j4=()=>({state:e,dispatch:t})=>Gg(e,t),X4=()=>({state:e,dispatch:t})=>r2(e,t),Z4=()=>({state:e,dispatch:t})=>eb(e,t),J4=()=>({state:e,dispatch:t})=>Qg(e,t);function Fb(e,t,n={},r={}){return wu(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var Y4=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:a,dispatch:i,commands:s})=>{let{doc:l}=a;if(r.preserveWhitespace!=="full"){let u=Fb(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return i&&a.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return i&&a.setMeta("preventUpdate",!n),s.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function PE(e,t){let n=oo(t,e.schema),{from:r,to:o,empty:a}=e.selection,i=[];a?(e.storedMarks&&i.push(...e.storedMarks),i.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{i.push(...l.marks)});let s=i.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function $b(e,t){let n=new Xo(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Q4(e){for(let t=0;t{t(r)&&n.push({node:r,pos:o})}),n}function BE(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,a)=>{n(o)&&r.push({node:o,pos:a})}),r}function Vb(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function _f(e){return t=>Vb(t.$from,e)}function J(e,t,n){return e.config[t]===void 0&&e.parent?J(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?J(e.parent,t,n):null}):e.config[t]}function Wb(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},r=J(t,"addExtensions",n);return r?[t,...Wb(r())]:t}).flat(10)}function Ls(e,t){let n=jr.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function FE(e){return typeof e=="function"}function ge(e,t=void 0,...n){return FE(e)?t?e.bind(t)(...n):e(...n):e}function eB(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Ss(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function zE(e){let t=[],{nodeExtensions:n,markExtensions:r}=Ss(e),o=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(i=>{let s={name:i.name,options:i.options,storage:i.storage,extensions:o},l=J(i,"addGlobalAttributes",s);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...a,...p}})})})})}),o.forEach(i=>{let s={name:i.name,options:i.options,storage:i.storage},l=J(i,"addAttributes",s);if(!l)return;let u=l();Object.entries(u).forEach(([c,d])=>{let f={...a,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:i.name,name:c,attribute:f})})}),t}function oe(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,a])=>{if(!r[o]){r[o]=a;return}if(o==="class"){let s=a?String(a).split(" "):[],l=r[o]?r[o].split(" "):[],u=s.filter(c=>!l.includes(c));r[o]=[...l,...u].join(" ")}else if(o==="style"){let s=a?a.split(";").map(c=>c.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),s.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=a}),r},{})}function Es(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>oe(n,r),{})}function tB(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function SE(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((a,i)=>{let s=i.attribute.parseHTML?i.attribute.parseHTML(n):tB(n.getAttribute(i.name));return s==null?a:{...a,[i.name]:s}},{});return{...r,...o}}}}function EE(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&eB(n)?!1:n!=null))}function LE(e){var t,n;let r={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(r.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function nB(e,t){var n;let r=zE(e),{nodeExtensions:o,markExtensions:a}=Ss(e),i=(n=o.find(u=>J(u,"topNode")))==null?void 0:n.name,s=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,x)=>{let y=J(x,"extendNodeSchema",d);return{...g,...y?y(u):{}}},{}),p=EE({...f,content:ge(J(u,"content",d)),marks:ge(J(u,"marks",d)),group:ge(J(u,"group",d)),inline:ge(J(u,"inline",d)),atom:ge(J(u,"atom",d)),selectable:ge(J(u,"selectable",d)),draggable:ge(J(u,"draggable",d)),code:ge(J(u,"code",d)),whitespace:ge(J(u,"whitespace",d)),linebreakReplacement:ge(J(u,"linebreakReplacement",d)),defining:ge(J(u,"defining",d)),isolating:ge(J(u,"isolating",d)),attrs:Object.fromEntries(c.map(LE))}),h=ge(J(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>SE(g,c)));let m=J(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:Es(g,c)}));let b=J(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),l=Object.fromEntries(a.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let x=J(g,"extendMarkSchema",d);return{...b,...x?x(u):{}}},{}),p=EE({...f,inclusive:ge(J(u,"inclusive",d)),excludes:ge(J(u,"excludes",d)),group:ge(J(u,"group",d)),spanning:ge(J(u,"spanning",d)),code:ge(J(u,"code",d)),attrs:Object.fromEntries(c.map(LE))}),h=ge(J(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>SE(b,c)));let m=J(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:Es(b,c)})),[u.name,p]}));return new jo({topNode:i,nodes:s,marks:l})}function rB(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function Gb(e){return e.sort((n,r)=>{let o=J(n,"priority")||100,a=J(r,"priority")||100;return o>a?-1:or.name)).length,t}function HE(e,t,n){let{from:r,to:o}=t,{blockSeparator:a=` -`,textSerializers:s={}}=n||{},a="";return e.nodesBetween(r,o,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(a+=i);let p=s?.[l.type.name];if(p)return c&&(a+=p({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(a+=(f=l?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),a}function Cb(e,t){let n={from:0,to:e.content.size};return mS(e,n,t)}function cf(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function v8(e,t){let n=Ye(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,a=>{i.push(a)});let s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function Tb(e,t){let n=af(typeof t=="string"?t:t.name,e.schema);return n==="node"?v8(e,t):n==="mark"?cS(e,t):{}}function x8(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function k8(e){let t=x8(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Nb(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((a,l)=>{s.push({from:a,to:l})});else{let{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{let u=t.slice(i).map(a,-1),c=t.slice(i).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),k8(r)}function df(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let i=n.resolve(e),s=kb(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var gS=(e,t,n,r=20)=>{let o=e.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let a=o.node(i);a?.type.name===t?s=a:i-=1}return[s,i]};function hb(e,t){return t.nodes[e]||t.marks[e]||null}function ef(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var w8=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,a)=>{var l,u;let c=((u=(l=o.type.spec).toText)==null?void 0:u.call(l,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-i))}),n};function yb(e,t,n={}){let{empty:r,ranges:o}=e.selection,i=t?ro(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>tf(d.attrs,n,{strict:!1}));let s=0,a=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),y=Math.min(h,b+m.nodeSize),v=y-g;s+=v,a.push(...m.marks.map(x=>({mark:x,from:g,to:y})))})}),s===0)return!1;let l=a.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>tf(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=a.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=s}function E8(e,t,n={}){if(!t)return mr(e,null,n)||yb(e,null,n);let r=af(t,e.schema);return r==="node"?mr(e,t,n):r==="mark"?yb(e,t,n):!1}var bS=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let i=uf(a=>a.type.name===t)(e.selection);if(!i)return!1;let s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function tS(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function nS(e,t){let{nodeExtensions:n}=ya(t),r=n.find(s=>s.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=be(Z(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function au(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(au(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function ff(e){return e instanceof q}var vS=class xS{constructor(t){this.position=t}static fromJSON(t){return new xS(t.position)}toJSON(){return{position:this.position}}};function _8(e,t){let n=t.mapping.mapResult(e.position);return{position:new vS(n.pos),mapResult:n}}function S8(e){return new vS(e)}function pf(e,t,n){let o=e.state.doc.content.size,i=no(t,0,o),s=no(n,0,o),a=e.coordsAtPos(i),l=e.coordsAtPos(s,-1),u=Math.min(a.top,l.top),c=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function C8(e,t,n){var r;let{selection:o}=t,i=null;if(of(o)&&(i=o.$cursor),i){let a=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(u=>u.type.excludes(n)))}let{ranges:s}=o;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var T8=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=n,{empty:s,ranges:a}=i,l=ro(e,r.schema);if(o)if(s){let u=cS(r,l);n.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return C8(r,n,l)},N8=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),A8=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let i=Ye(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:a})=>Ig(i,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>Ig(i,{...s,...t})(a,r)).run():!1},M8=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=no(e,0,r.content.size),i=q.create(r,o);t.setSelection(i)}return!0},R8=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:i}=r,s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=i.from,a=i.to),o&&n.doc.nodesBetween(s,a,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},O8=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=V.atStart(r).from,a=V.atEnd(r).to,l=no(o,s,a),u=no(i,s,a),c=V.create(r,l,u);t.setSelection(c)}return!0},D8=e=>({state:t,dispatch:n})=>{let r=Ye(e,t.schema);return B2(r)(t,n)};function rS(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var I8=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:i,doc:s}=t,{$from:a,$to:l}=i,u=o.extensionManager.attributes,c=ef(u,a.node().type.name,a.node().attrs);if(i instanceof q&&i.node.isBlock)return!a.parentOffset||!gn(s,a.pos)?!1:(r&&(e&&rS(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:h8(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=gn(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!h&&gn(t.doc,t.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(i instanceof V&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f)){let m=t.mapping.map(a.before()),b=t.doc.resolve(m);a.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(a.before()),f)}e&&rS(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},L8=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;let a=Ye(e,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;let d=l.node(-1);if(d.type!==a)return!1;let f=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let g=N.empty,y=l.index(-1)?1:l.index(-2)?2:3;for(let _=l.depth-y;_>=l.depth-3;_-=1)g=N.from(l.node(_).copy(g));let v=l.indexAfter(-1){if(E>-1)return!1;_.isTextblock&&_.content.size===0&&(E=T+1)}),E>-1&&n.setSelection(V.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}let p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...ef(f,d.type.name,d.attrs),...t},m={...ef(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);let b=p?[{type:a,attrs:h},{type:p,attrs:m}]:[{type:a,attrs:h}];if(!gn(n.doc,l.pos,2))return!1;if(o){let{selection:g,storedMarks:y}=r,{splittableMarks:v}=i.extensionManager,x=y||g.$to.parentOffset&&g.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!x||!o)return!0;let k=x.filter(w=>v.includes(w.type.name));n.ensureMarks(k)}return!0},mb=(e,t)=>{let n=uf(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&An(e.doc,n.pos)&&e.join(n.pos),!0},gb=(e,t)=>{let n=uf(s=>s.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&An(e.doc,r)&&e.join(r),!0},P8=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=Ye(e,s.schema),h=Ye(t,s.schema),{selection:m,storedMarks:b}=s,{$from:g,$to:y}=m,v=g.blockRange(y),x=b||m.$to.parentOffset&&m.$from.marks();if(!v)return!1;let k=uf(w=>nS(w.type.name,d))(m);if(v.depth>=1&&k&&v.depth-k.depth<=1){if(k.node.type===p)return u.liftListItem(h);if(nS(k.node.type.name,d)&&p.validContent(k.node.content)&&a)return l().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>mb(i,p)).command(()=>gb(i,p)).run()}return!n||!x||!a?l().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>mb(i,p)).command(()=>gb(i,p)).run():l().command(()=>{let w=c().wrapInList(p,r),E=x.filter(_=>f.includes(_.type.name));return i.ensureMarks(E),w?!0:u.clearNodes()}).wrapInList(p,r).command(()=>mb(i,p)).command(()=>gb(i,p)).run()},B8=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:i=!1}=n,s=ro(e,r.schema);return yb(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},F8=(e,t,n={})=>({state:r,commands:o})=>{let i=Ye(e,r.schema),s=Ye(t,r.schema),a=mr(r,i,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(s,l):o.setNode(i,{...l,...n})},z8=(e,t={})=>({state:n,commands:r})=>{let o=Ye(e,n.schema);return mr(n,o,t)?r.lift(o):r.wrapIn(o,t)},U8=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1},H8=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},$8=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;let{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=ro(e,r.schema),{$from:u,empty:c,ranges:d}=a;if(!o)return!0;if(c&&s){let{from:f,to:p}=a,h=(i=u.marks().find(b=>b.type===l))==null?void 0:i.attrs,m=kb(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},q8=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,i,s;return typeof e=="number"?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,(a,l)=>{if(a.isText)return;let u={...a.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},V8=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null,a=af(typeof e=="string"?e:e.name,r.schema);if(!a)return!1;a==="node"&&(i=Ye(e,r.schema)),a==="mark"&&(s=ro(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?r.doc.nodesBetween(c,d,(b,g)=>{i&&i===b.type&&(l=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):r.doc.nodesBetween(c,d,(b,g)=>{g=c&&g<=d&&(i&&i===b.type&&(l=!0,o&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(y=>{if(s===y.type&&(l=!0,o)){let v=Math.max(g,c),x=Math.min(g+b.nodeSize,d);n.addMark(v,x,s.create({...y.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&o&&n.addMark(h,m,s.create({...b.attrs,...t}))}))}),l},W8=(e,t={})=>({state:n,dispatch:r})=>{let o=Ye(e,n.schema);return I2(o,t)(n,r)},j8=(e,t={})=>({state:n,dispatch:r})=>{let o=Ye(e,n.schema);return L2(o,t)(n,r)},K8=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},hf=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},G8=(e,t)=>{if(xb(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function Zd(e){var t;let{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=w8(u)+i;return s.forEach(f=>{if(c)return;let p=G8(d,f.find);if(!p)return;let h=l.state.tr,m=nf({state:l.state,transaction:h}),b={from:r-(p[0].length-i.length),to:o},{commands:g,chain:y,can:v}=new rf({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:y,can:v})===null||!h.steps.length||(f.undoable&&h.setMeta(a,{transform:h,from:r,to:o,text:i}),l.dispatch(h),c=!0)}),c}function Y8(e){let{editor:t,rules:n}=e,r=new G({state:{init(){return null},apply(o,i,s){let a=o.getMeta(r);if(a)return a;let l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=xa(N.from(c),s.schema);let{from:d}=l,f=d+c.length;Zd({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return Zd({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&Zd({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?Zd({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function J8(e){return Object.prototype.toString.call(e).slice(8,-1)}function Xd(e){return J8(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function kS(e,t){let n={...e};return Xd(e)&&Xd(t)&&Object.keys(t).forEach(r=>{Xd(t[r])&&Xd(e[r])?n[r]=kS(e[r],t[r]):n[r]=t[r]}),n}var Ab=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...be(Z(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...be(Z(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>kS(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},it=class wS extends Ab{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new wS(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let l=s.find(u=>u?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function Z8(e){return typeof e=="number"}var X8=class{constructor(e){this.find=e.find,this.handler=e.handler}},Q8=(e,t,n)=>{if(xb(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),i.push(o.replaceWith)),i}):[]};function eP(e){let{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:c}=new rf({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var m,b,g,y,v;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let x=(v=(y=(g=p.content)==null?void 0:g.size)!=null?y:p.nodeSize)!=null?v:0,k=Math.max(r,h),w=Math.min(o,h+x);if(k>=w)return;let E=p.isText?p.text||"":p.textBetween(k-h,w-h,void 0,"\uFFFC");Q8(E,i.find,s).forEach(T=>{if(T.index===void 0)return;let C=k+T.index+1,H=C+T[0].length,K={from:n.tr.mapping.map(C),to:n.tr.mapping.map(H)},F=i.handler({state:n,range:K,match:T,commands:l,chain:u,can:c,pasteEvent:s,dropEvent:a});d.push(F)})}),d.every(p=>p!==null)}var Qd=null,tP=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function nP(e){let{editor:t,rules:n}=e,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}let l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=nf({state:c,transaction:m});if(!(!eP({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new G({view(d){let f=h=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,r&&(Qd=t)},p=()=>{Qd&&(Qd=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,a=f,!i){let p=Qd;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!i,g=h.getMeta("applyPasteRules"),y=!!g;if(!m&&!b&&!y)return;if(y){let{text:k}=g;typeof k=="string"?k=k:k=xa(N.from(k),p.schema);let{from:w}=g,E=w+k.length,_=tP(k);return l({rule:c,state:p,from:w,to:{b:E},pasteEvt:_})}let v=f.doc.content.findDiffStart(p.doc.content),x=f.doc.content.findDiffEnd(p.doc.content);if(!(!Z8(v)||!x||v===x.b))return l({rule:c,state:p,from:v,to:x,pasteEvt:s})}}))}var mf=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=hS(e),this.schema=b8(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:hb(t.name,this.schema)},r=Z(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Sb([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:hb(r.name,this.schema)},i=[],s=Z(r,"addKeyboardShortcuts",o),a={};if(r.type==="mark"&&Z(r,"exitable",o)&&(a.ArrowRight=()=>it.handleExit({editor:e,mark:r})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));a={...a,...f}}let l=Y_(a);i.push(l);let u=Z(r,"addInputRules",o);if(tS(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=Y8({editor:e,rules:f}),h=Array.isArray(p)?p:[p];i.push(...h)}}let c=Z(r,"addPasteRules",o);if(tS(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=nP({editor:e,rules:f});i.push(...p)}}let d=Z(r,"addProseMirrorPlugins",o);if(d){let f=d();i.push(...f)}return i})}get attributes(){return pS(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=ya(this.extensions);return Object.fromEntries(t.filter(n=>!!Z(n,"addNodeView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Ye(n.name,this.schema)},i=Z(n,"addNodeView",o);if(!i)return[];let s=i();if(!s)return[];let a=(l,u,c,d,f)=>{let p=va(l,r);return s({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,a]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=ya(this.extensions);return Object.fromEntries(t.filter(n=>!!Z(n,"addMarkView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ro(n.name,this.schema)},i=Z(n,"addMarkView",o);if(!i)return[];let s=(a,l,u)=>{let c=va(a,r);return i()({mark:a,view:l,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{fP(a,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:hb(t.name,this.schema)};t.type==="mark"&&((n=be(Z(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=Z(t,"onBeforeCreate",r),i=Z(t,"onCreate",r),s=Z(t,"onUpdate",r),a=Z(t,"onSelectionUpdate",r),l=Z(t,"onTransaction",r),u=Z(t,"onFocus",r),c=Z(t,"onBlur",r),d=Z(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};mf.resolve=hS;mf.sort=Sb;mf.flatten=_b;var Mb={};vb(Mb,{ClipboardTextSerializer:()=>_S,Commands:()=>SS,Delete:()=>CS,Drop:()=>TS,Editable:()=>NS,FocusEvents:()=>MS,Keymap:()=>RS,Paste:()=>OS,Tabindex:()=>DS,TextDirection:()=>IS,focusEventsPluginKey:()=>AS});var oe=class ES extends Ab{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new ES(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},_S=oe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new G({key:new Q("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(c=>c.$from.pos)),a=Math.max(...i.map(c=>c.$to.pos)),l=cf(n);return mS(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),SS=oe.create({name:"commands",addCommands(){return{...oS}}}),CS=oe.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let i=()=>{var s,a,l,u;if((u=(l=(a=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,e))!=null?u:e.getMeta("y-sync$"))return;let c=wb(e.before,[e,...t]);Nb(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof Yr){let g=f.slice(h).map(p.from,-1),y=f.slice(h).map(p.to),v=f.invert().map(g,-1),x=f.invert().map(y),k=(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(E=>E.eq(p.mark)),w=(b=c.doc.nodeAt(y))==null?void 0:b.marks.some(E=>E.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:v,to:x},newRange:{from:g,to:y},partial:!!(w||k),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),TS=oe.create({name:"drop",addProseMirrorPlugins(){return[new G({key:new Q("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),NS=oe.create({name:"editable",addProseMirrorPlugins(){return[new G({key:new Q("editable"),props:{editable:()=>this.editor.options.editable}})]}}),AS=new Q("focusEvents"),MS=oe.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new G({key:AS,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),RS=oe.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{let{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:J.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return sf()||uS()?i:o},addProseMirrorPlugins(){return[new G({key:new Q("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:a}=t.selection,l=J.atStart(t.doc).from,u=J.atEnd(t.doc).to;if(i||!(s===l&&a===u)||!au(n.doc))return;let f=n.tr,p=nf({state:n,transaction:f}),{commands:h}=new rf({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),OS=oe.create({name:"paste",addProseMirrorPlugins(){return[new G({key:new Q("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),DS=oe.create({name:"tabindex",addProseMirrorPlugins(){return[new G({key:new Q("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),IS=oe.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=ya(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new G({key:new Q("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),rP=class ba{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new ba(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new ba(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new ba(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;let l=new ba(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new ba(a,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let i=o.node.attrs,s=Object.keys(n);for(let a=0;a{r&&o.length>0||(s.node.type.name===t&&i.every(l=>n[l]===s.node.attrs[l])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},oP=`.ProseMirror { +`,textSerializers:i={}}=n||{},s="";return e.nodesBetween(r,o,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(s+=a);let p=i?.[l.type.name];if(p)return c&&(s+=p({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(s+=(f=l?.text)==null?void 0:f.slice(Math.max(r,u)-u,o-u))}),s}function Kb(e,t){let n={from:0,to:e.content.size};return HE(e,n,t)}function Af(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function oB(e,t){let n=Ze(t,e.schema),{from:r,to:o}=e.selection,a=[];e.doc.nodesBetween(r,o,s=>{a.push(s)});let i=a.reverse().find(s=>s.type.name===n.name);return i?{...i.attrs}:{}}function jb(e,t){let n=Lf(typeof t=="string"?t:t.name,e.schema);return n==="node"?oB(e,t):n==="mark"?PE(e,t):{}}function aB(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function iB(e){let t=aB(e);return t.length===1?t:t.filter((n,r)=>!t.filter((a,i)=>i!==r).some(a=>n.oldRange.from>=a.oldRange.from&&n.oldRange.to<=a.oldRange.to&&n.newRange.from>=a.newRange.from&&n.newRange.to<=a.newRange.to))}function Xb(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,a)=>{let i=[];if(o.ranges.length)o.forEach((s,l)=>{i.push({from:s,to:l})});else{let{from:s,to:l}=n[a];if(s===void 0||l===void 0)return;i.push({from:s,to:l})}i.forEach(({from:s,to:l})=>{let u=t.slice(a).map(s,-1),c=t.slice(a).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),iB(r)}function Tf(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let a=n.resolve(e),i=qb(a,o.type);i&&r.push({mark:o,...i})}):n.nodesBetween(e,t,(o,a)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(i=>({from:a,to:a+o.nodeSize,mark:i})))}),r}var qE=(e,t,n,r=20)=>{let o=e.doc.resolve(n),a=r,i=null;for(;a>0&&i===null;){let s=o.node(a);s?.type.name===t?i=s:a-=1}return[i,a]};function Ob(e,t){return t.nodes[e]||t.marks[e]||null}function kf(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(a=>a.type===t&&a.name===r);return o?o.attribute.keepOnSplit:!1}))}var sB=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,a,i,s)=>{var l,u;let c=((u=(l=o.type.spec).toText)==null?void 0:u.call(l,{node:o,pos:a,parent:i,index:s}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-a))}),n};function zb(e,t,n={}){let{empty:r,ranges:o}=e.selection,a=t?oo(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>a?a.name===d.type.name:!0).find(d=>vf(d.attrs,n,{strict:!1}));let i=0,s=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),x=Math.min(h,b+m.nodeSize),y=x-g;i+=y,s.push(...m.marks.map(k=>({mark:k,from:g,to:x})))})}),i===0)return!1;let l=s.filter(d=>a?a.name===d.mark.type.name:!0).filter(d=>vf(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=s.filter(d=>a?d.mark.type!==a&&d.mark.type.excludes(a):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=i}function lB(e,t,n={}){if(!t)return gr(e,null,n)||zb(e,null,n);let r=Lf(t,e.schema);return r==="node"?gr(e,t,n):r==="mark"?zb(e,t,n):!1}var $E=(e,t)=>{let{$from:n,$to:r,$anchor:o}=e.selection;if(t){let a=_f(s=>s.type.name===t)(e.selection);if(!a)return!1;let i=e.doc.resolve(a.pos+1);return o.pos+1===i.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function IE(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function _E(e,t){let{nodeExtensions:n}=Ss(t),r=n.find(i=>i.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},a=ge(J(r,"group",o));return typeof a!="string"?!1:a.split(" ").includes("list")}function Su(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(a=>{o!==!1&&(Su(a,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function Mf(e){return e instanceof $}var WE=class GE{constructor(t){this.position=t}static fromJSON(t){return new GE(t.position)}toJSON(){return{position:this.position}}};function uB(e,t){let n=t.mapping.mapResult(e.position);return{position:new WE(n.pos),mapResult:n}}function cB(e){return new WE(e)}function Nf(e,t,n){let o=e.state.doc.content.size,a=ro(t,0,o),i=ro(n,0,o),s=e.coordsAtPos(a),l=e.coordsAtPos(i,-1),u=Math.min(s.top,l.top),c=Math.max(s.bottom,l.bottom),d=Math.min(s.left,l.left),f=Math.max(s.right,l.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function dB(e,t,n){var r;let{selection:o}=t,a=null;if(Sf(o)&&(a=o.$cursor),a){let s=(r=e.storedMarks)!=null?r:a.marks();return a.parent.type.allowsMarkType(n)&&(!!n.isInSet(s)||!s.some(u=>u.type.excludes(n)))}let{ranges:i}=o;return i.some(({$from:s,$to:l})=>{let u=s.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var fB=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:a}=n,{empty:i,ranges:s}=a,l=oo(e,r.schema);if(o)if(i){let u=PE(r,l);n.addStoredMark(l.create({...u,...t}))}else s.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return dB(r,n,l)},pB=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),hB=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let a=Ze(e,n.schema),i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),a.isTextblock?o().command(({commands:s})=>tb(a,{...i,...t})(n)?!0:s.clearNodes()).command(({state:s})=>tb(a,{...i,...t})(s,r)).run():!1},mB=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=ro(e,0,r.content.size),a=$.create(r,o);t.setSelection(a)}return!0},gB=(e,t)=>({tr:n,state:r,dispatch:o})=>{let{selection:a}=r,i,s;return typeof t=="number"?(i=t,s=t):t&&"from"in t&&"to"in t?(i=t.from,s=t.to):(i=a.from,s=a.to),o&&n.doc.nodesBetween(i,s,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},bB=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:a}=typeof e=="number"?{from:e,to:e}:e,i=V.atStart(r).from,s=V.atEnd(r).to,l=ro(o,i,s),u=ro(a,i,s),c=V.create(r,l,u);t.setSelection(c)}return!0},xB=e=>({state:t,dispatch:n})=>{let r=Ze(e,t.schema);return u2(r)(t,n)};function AE(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var yB=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:a,doc:i}=t,{$from:s,$to:l}=a,u=o.extensionManager.attributes,c=kf(u,s.node().type.name,s.node().attrs);if(a instanceof $&&a.node.isBlock)return!s.parentOffset||!bn(i,s.pos)?!1:(r&&(e&&AE(n,o.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=s.depth===0?void 0:Q4(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=bn(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!h&&bn(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(a instanceof V&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let m=t.mapping.map(s.before()),b=t.doc.resolve(m);s.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&AE(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},kB=(e,t={})=>({tr:n,state:r,dispatch:o,editor:a})=>{var i;let s=Ze(e,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;let d=l.node(-1);if(d.type!==s)return!1;let f=a.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let g=_.empty,x=l.index(-1)?1:l.index(-2)?2:3;for(let S=l.depth-x;S>=l.depth-3;S-=1)g=_.from(l.node(S).copy(g));let y=l.indexAfter(-1){if(w>-1)return!1;S.isTextblock&&S.content.size===0&&(w=I+1)}),w>-1&&n.setSelection(V.near(n.doc.resolve(w))),n.scrollIntoView()}return!0}let p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...kf(f,d.type.name,d.attrs),...t},m={...kf(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);let b=p?[{type:s,attrs:h},{type:p,attrs:m}]:[{type:s,attrs:h}];if(!bn(n.doc,l.pos,2))return!1;if(o){let{selection:g,storedMarks:x}=r,{splittableMarks:y}=a.extensionManager,k=x||g.$to.parentOffset&&g.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!k||!o)return!0;let v=k.filter(C=>y.includes(C.type.name));n.ensureMarks(v)}return!0},Pb=(e,t)=>{let n=_f(i=>i.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&Tn(e.doc,n.pos)&&e.join(n.pos),!0},Bb=(e,t)=>{let n=_f(i=>i.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&Tn(e.doc,r)&&e.join(r),!0},vB=(e,t,n,r={})=>({editor:o,tr:a,state:i,dispatch:s,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=Ze(e,i.schema),h=Ze(t,i.schema),{selection:m,storedMarks:b}=i,{$from:g,$to:x}=m,y=g.blockRange(x),k=b||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;let v=_f(C=>_E(C.type.name,d))(m);if(y.depth>=1&&v&&y.depth-v.depth<=1){if(v.node.type===p)return u.liftListItem(h);if(_E(v.node.type.name,d)&&p.validContent(v.node.content)&&s)return l().command(()=>(a.setNodeMarkup(v.pos,p),!0)).command(()=>Pb(a,p)).command(()=>Bb(a,p)).run()}return!n||!k||!s?l().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>Pb(a,p)).command(()=>Bb(a,p)).run():l().command(()=>{let C=c().wrapInList(p,r),w=k.filter(S=>f.includes(S.type.name));return a.ensureMarks(w),C?!0:u.clearNodes()}).wrapInList(p,r).command(()=>Pb(a,p)).command(()=>Bb(a,p)).run()},CB=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:a=!1}=n,i=oo(e,r.schema);return zb(r,i,t)?o.unsetMark(i,{extendEmptyMarkRange:a}):o.setMark(i,t)},wB=(e,t,n={})=>({state:r,commands:o})=>{let a=Ze(e,r.schema),i=Ze(t,r.schema),s=gr(r,a,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(i,l):o.setNode(a,{...l,...n})},SB=(e,t={})=>({state:n,commands:r})=>{let o=Ze(e,n.schema);return gr(n,o,t)?r.lift(o):r.wrapIn(o,t)},EB=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;l-=1)i.step(s.steps[l].invert(s.docs[l]));if(a.text){let l=i.doc.resolve(a.from).marks();i.replaceWith(a.from,a.to,e.schema.text(a.text,l))}else i.delete(a.from,a.to)}return!0}}return!1},LB=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(a=>{e.removeMark(a.$from.pos,a.$to.pos)}),!0},IB=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var a;let{extendEmptyMarkRange:i=!1}=t,{selection:s}=n,l=oo(e,r.schema),{$from:u,empty:c,ranges:d}=s;if(!o)return!0;if(c&&i){let{from:f,to:p}=s,h=(a=u.marks().find(b=>b.type===l))==null?void 0:a.attrs,m=qb(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},_B=e=>({tr:t,state:n,dispatch:r})=>{let{selection:o}=n,a,i;return typeof e=="number"?(a=e,i=e):e&&"from"in e&&"to"in e?(a=e.from,i=e.to):(a=o.from,i=o.to),r&&t.doc.nodesBetween(a,i,(s,l)=>{if(s.isText)return;let u={...s.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},AB=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null,s=Lf(typeof e=="string"?e:e.name,r.schema);if(!s)return!1;s==="node"&&(a=Ze(e,r.schema)),s==="mark"&&(i=oo(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?r.doc.nodesBetween(c,d,(b,g)=>{a&&a===b.type&&(l=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):r.doc.nodesBetween(c,d,(b,g)=>{g=c&&g<=d&&(a&&a===b.type&&(l=!0,o&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),i&&b.marks.length&&b.marks.forEach(x=>{if(i===x.type&&(l=!0,o)){let y=Math.max(g,c),k=Math.min(g+b.nodeSize,d);n.addMark(y,k,i.create({...x.attrs,...t}))}}))}),p&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),i&&p.marks.length&&p.marks.forEach(b=>{i===b.type&&o&&n.addMark(h,m,i.create({...b.attrs,...t}))}))}),l},TB=(e,t={})=>({state:n,dispatch:r})=>{let o=Ze(e,n.schema);return i2(o,t)(n,r)},MB=(e,t={})=>({state:n,dispatch:r})=>{let o=Ze(e,n.schema);return s2(o,t)(n,r)},NB=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Rf=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},RB=(e,t)=>{if(Hb(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r};function bf(e){var t;let{editor:n,from:r,to:o,text:a,rules:i,plugin:s}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=sB(u)+a;return i.forEach(f=>{if(c)return;let p=RB(d,f.find);if(!p)return;let h=l.state.tr,m=Cf({state:l.state,transaction:h}),b={from:r-(p[0].length-a.length),to:o},{commands:g,chain:x,can:y}=new wf({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:x,can:y})===null||!h.steps.length||(f.undoable&&h.setMeta(s,{transform:h,from:r,to:o,text:a}),l.dispatch(h),c=!0)}),c}function DB(e){let{editor:t,rules:n}=e,r=new j({state:{init(){return null},apply(o,a,i){let s=o.getMeta(r);if(s)return s;let l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=Ls(_.from(c),i.schema);let{from:d}=l,f=d+c.length;bf({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:a}},props:{handleTextInput(o,a,i,s){return bf({editor:t,from:a,to:i,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:a}=o.state.selection;a&&bf({editor:t,from:a.pos,to:a.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,a){if(a.key!=="Enter")return!1;let{$cursor:i}=o.state.selection;return i?bf({editor:t,from:i.pos,to:i.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function OB(e){return Object.prototype.toString.call(e).slice(8,-1)}function xf(e){return OB(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function KE(e,t){let n={...e};return xf(e)&&xf(t)&&Object.keys(t).forEach(r=>{xf(t[r])&&xf(e[r])?n[r]=KE(e[r],t[r]):n[r]=t[r]}),n}var Zb=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...ge(J(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...ge(J(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>KE(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},it=class jE extends Zb{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new jE(n)}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let i=o.marks();if(!!!i.find(u=>u?.type.name===n.name))return!1;let l=i.find(u=>u?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function PB(e){return typeof e=="number"}var BB=class{constructor(e){this.find=e.find,this.handler=e.handler}},FB=(e,t,n)=>{if(Hb(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let a=[o.text];return a.index=o.index,a.input=e,a.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith),a.push(o.replaceWith)),a}):[]};function zB(e){let{editor:t,state:n,from:r,to:o,rule:a,pasteEvent:i,dropEvent:s}=e,{commands:l,chain:u,can:c}=new wf({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{var m,b,g,x,y;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let k=(y=(x=(g=p.content)==null?void 0:g.size)!=null?x:p.nodeSize)!=null?y:0,v=Math.max(r,h),C=Math.min(o,h+k);if(v>=C)return;let w=p.isText?p.text||"":p.textBetween(v-h,C-h,void 0,"\uFFFC");FB(w,a.find,i).forEach(I=>{if(I.index===void 0)return;let L=v+I.index+1,H=L+I[0].length,K={from:n.tr.mapping.map(L),to:n.tr.mapping.map(H)},F=a.handler({state:n,range:K,match:I,commands:l,chain:u,can:c,pasteEvent:i,dropEvent:s});d.push(F)})}),d.every(p=>p!==null)}var yf=null,UB=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function HB(e){let{editor:t,rules:n}=e,r=null,o=!1,a=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}let l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=Cf({state:c,transaction:m});if(!(!zB({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:s})||!m.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new j({view(d){let f=h=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,r&&(yf=t)},p=()=>{yf&&(yf=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(a=r===d.dom.parentElement,s=f,!a){let p=yf;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return i=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!a,g=h.getMeta("applyPasteRules"),x=!!g;if(!m&&!b&&!x)return;if(x){let{text:v}=g;typeof v=="string"?v=v:v=Ls(_.from(v),p.schema);let{from:C}=g,w=C+v.length,S=UB(v);return l({rule:c,state:p,from:C,to:{b:w},pasteEvt:S})}let y=f.doc.content.findDiffStart(p.doc.content),k=f.doc.content.findDiffEnd(p.doc.content);if(!(!PB(y)||!k||y===k.b))return l({rule:c,state:p,from:y,to:k,pasteEvt:i})}}))}var Df=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=UE(e),this.schema=nB(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Ob(t.name,this.schema)},r=J(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return Gb([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:Ob(r.name,this.schema)},a=[],i=J(r,"addKeyboardShortcuts",o),s={};if(r.type==="mark"&&J(r,"exitable",o)&&(s.ArrowRight=()=>it.handleExit({editor:e,mark:r})),i){let f=Object.fromEntries(Object.entries(i()).map(([p,h])=>[p,()=>h({editor:e})]));s={...s,...f}}let l=vE(s);a.push(l);let u=J(r,"addInputRules",o);if(IE(r,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=DB({editor:e,rules:f}),h=Array.isArray(p)?p:[p];a.push(...h)}}let c=J(r,"addPasteRules",o);if(IE(r,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=HB({editor:e,rules:f});a.push(...p)}}let d=J(r,"addProseMirrorPlugins",o);if(d){let f=d();a.push(...f)}return a})}get attributes(){return zE(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Ss(this.extensions);return Object.fromEntries(t.filter(n=>!!J(n,"addNodeView")).map(n=>{let r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Ze(n.name,this.schema)},a=J(n,"addNodeView",o);if(!a)return[];let i=a();if(!i)return[];let s=(l,u,c,d,f)=>{let p=Es(l,r);return i({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,s]}))}get markViews(){let{editor:e}=this,{markExtensions:t}=Ss(this.extensions);return Object.fromEntries(t.filter(n=>!!J(n,"addMarkView")).map(n=>{let r=this.attributes.filter(s=>s.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:oo(n.name,this.schema)},a=J(n,"addMarkView",o);if(!a)return[];let i=(s,l,u)=>{let c=Es(s,r);return a()({mark:s,view:l,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{JB(s,e,d)}})};return[n.name,i]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Ob(t.name,this.schema)};t.type==="mark"&&((n=ge(J(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);let o=J(t,"onBeforeCreate",r),a=J(t,"onCreate",r),i=J(t,"onUpdate",r),s=J(t,"onSelectionUpdate",r),l=J(t,"onTransaction",r),u=J(t,"onFocus",r),c=J(t,"onBlur",r),d=J(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),a&&this.editor.on("create",a),i&&this.editor.on("update",i),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};Df.resolve=UE;Df.sort=Gb;Df.flatten=Wb;var Jb={};Ub(Jb,{ClipboardTextSerializer:()=>ZE,Commands:()=>JE,Delete:()=>YE,Drop:()=>QE,Editable:()=>eL,FocusEvents:()=>nL,Keymap:()=>rL,Paste:()=>oL,Tabindex:()=>aL,TextDirection:()=>iL,focusEventsPluginKey:()=>tL});var ae=class XE extends Zb{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new XE(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},ZE=ae.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new j({key:new Q("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:a}=o,i=Math.min(...a.map(c=>c.$from.pos)),s=Math.max(...a.map(c=>c.$to.pos)),l=Af(n);return HE(r,{from:i,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),JE=ae.create({name:"commands",addCommands(){return{...TE}}}),YE=ae.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;let a=()=>{var i,s,l,u;if((u=(l=(s=(i=this.editor.options.coreExtensionOptions)==null?void 0:i.delete)==null?void 0:s.filterTransaction)==null?void 0:l.call(s,e))!=null?u:e.getMeta("y-sync$"))return;let c=$b(e.before,[e,...t]);Xb(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof Zr){let g=f.slice(h).map(p.from,-1),x=f.slice(h).map(p.to),y=f.invert().map(g,-1),k=f.invert().map(x),v=(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(w=>w.eq(p.mark)),C=(b=c.doc.nodeAt(x))==null?void 0:b.marks.some(w=>w.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:y,to:k},newRange:{from:g,to:x},partial:!!(C||v),editor:this.editor,transaction:e,combinedTransform:c})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(a,0):a()}}),QE=ae.create({name:"drop",addProseMirrorPlugins(){return[new j({key:new Q("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),eL=ae.create({name:"editable",addProseMirrorPlugins(){return[new j({key:new Q("editable"),props:{editable:()=>this.editor.options.editable}})]}}),tL=new Q("focusEvents"),nL=ae.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new j({key:tL,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),rL=ae.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:s})=>{let{selection:l,doc:u}=s,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?s.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:Z.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},a={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Ef()||OE()?a:o},addProseMirrorPlugins(){return[new j({key:new Q("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:a,from:i,to:s}=t.selection,l=Z.atStart(t.doc).from,u=Z.atEnd(t.doc).to;if(a||!(i===l&&s===u)||!Su(n.doc))return;let f=n.tr,p=Cf({state:n,transaction:f}),{commands:h}=new wf({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),oL=ae.create({name:"paste",addProseMirrorPlugins(){return[new j({key:new Q("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),aL=ae.create({name:"tabindex",addProseMirrorPlugins(){return[new j({key:new Q("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),iL=ae.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Ss(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new j({key:new Q("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),qB=class ws{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0)return;n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new ws(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new ws(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new ws(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,i=this.pos+r+(a?0:1);if(i<0||i>this.resolvedPos.doc.nodeSize-2)return;let s=this.resolvedPos.doc.resolve(i);if(!o&&s.depth<=this.depth)return;let l=new ws(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new ws(s,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let a=o.node.attrs,i=Object.keys(n);for(let s=0;s{r&&o.length>0||(i.node.type.name===t&&a.every(l=>n[l]===i.node.attrs[l])&&o.push(i),!(r&&o.length>0)&&(o=o.concat(i.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},$B=`.ProseMirror { position: relative; } @@ -282,101 +282,101 @@ img.ProseMirror-separator { .ProseMirror-focused .ProseMirror-gapcursor { display: block; -}`;function iP(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var LS=class extends K8{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:_8,createMappablePosition:S8},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=sS(t,this.options.autofocus);this.editorState=Id.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=iP(oP,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=fS(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[NS,_S.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),SS,MS,RS,DS,TS,OS,CS,IS.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new mf(r,this)}createCommandManager(){this.commandManager=new rf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=bb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=bb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new nu(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),a=s?.getMeta("focus"),l=s?.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Tb(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return E8(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return xa(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` +}`;function VB(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var sL=class extends NB{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:uB,createMappablePosition:cB},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:a})=>this.options.onDrop(r,o,a)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=NE(t,this.options.autofocus);this.editorState=Qd.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch{}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=VB($B,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=FE(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(o=>{let a=typeof o=="string"?`${o}$`:o.key;n=n.filter(i=>!i.key.startsWith(a))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[eL,ZE.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),JE,nL,rL,aL,QE,oL,YE,iL.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new Df(r,this)}createCommandManager(){this.commandManager=new wf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Fb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=Fb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new yu(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),a=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let i=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),s=i?.getMeta("focus"),l=i?.getMeta("blur");s&&this.emit("focus",{editor:this,event:s.event,transaction:i}),l&&this.emit("blur",{editor:this,event:l.event,transaction:i}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||a.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return jb(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return lB(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ls(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` -`,textSerializers:n={}}=e||{};return Cb(this.state.doc,{blockSeparator:t,textSerializers:{...cf(this.schema),...n}})}get isEmpty(){return au(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new rP(t,this)}get $doc(){return this.$pos(0)}};function gr(e){return new hf({find:e.find,handler:({state:t,range:n,match:r})=>{let o=be(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=t,s=r[r.length-1],a=r[0];if(s){let l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(df(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&i.delete(n.from+l,u);let f=n.from+l+s.length;i.addMark(n.from+l,f,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function PS(e){return new hf({find:e.find,handler:({state:t,range:n,match:r})=>{let o=be(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from,a=n.to,l=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=s+u;c>a?c=a:a=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,a,l)}else if(r[0]){let u=e.type.isInline?s:s-1;i.insert(u,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()},undoable:e.undoable})}function lu(e){return new hf({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),i=be(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function br(e){return new hf({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let i=be(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&sa(l,e.type,i);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));s.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&An(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}function BS(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof q){let i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(t))return!0;o-=1}return!1}function FS(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var sP={};vb(sP,{createAtomBlockMarkdownSpec:()=>aP,createBlockMarkdownSpec:()=>lP,createInlineMarkdownSpec:()=>dP,parseAttributes:()=>Rb,parseIndentedBlocks:()=>gf,renderNestedMarkdownContent:()=>uu,serializeAttributes:()=>Ob});function Rb(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function Ob(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function aP(e){let{nodeName:t,name:n,parseAttributes:r=Rb,serializeAttributes:o=Ob,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:a}=e,l=n||t,u=c=>{if(!a)return c;let d={};return a.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...i,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=r(m);if(!s.find(y=>!(y in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function lP(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=Rb,serializeAttributes:i=Ob,defaultAttributes:s={},content:a="block",allowedAttributes:l}=e,u=n||t,c=d=>{if(!l)return d;let f={};return l.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,y=""]=b,v=o(y),x=1,k=g.length,w="",E=/^:::([\w-]*)(\s.*)?/gm,_=d.slice(k);for(E.lastIndex=0;;){let T=E.exec(_);if(T===null)break;let C=T.index,H=T[1];if(!((h=T[2])!=null&&h.endsWith(":::"))){if(H)x+=1;else if(x-=1,x===0){let K=_.slice(0,C);w=K.trim();let F=d.slice(0,k+C+T[0].length),U=[];if(w)if(a==="block")for(U=p.blockTokens(K),U.forEach(M=>{M.text&&(!M.tokens||M.tokens.length===0)&&(M.tokens=p.inlineTokens(M.text))});U.length>0;){let M=U[U.length-1];if(M.type==="paragraph"&&(!M.text||M.text.trim()===""))U.pop();else break}else U=p.inlineTokens(w);return{type:t,raw:F,attributes:v,content:w,tokens:U}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=i(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` +`,textSerializers:n={}}=e||{};return Kb(this.state.doc,{blockSeparator:t,textSerializers:{...Af(this.schema),...n}})}get isEmpty(){return Su(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new qB(t,this)}get $doc(){return this.$pos(0)}};function br(e){return new Rf({find:e.find,handler:({state:t,range:n,match:r})=>{let o=ge(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:a}=t,i=r[r.length-1],s=r[0];if(i){let l=s.search(/\S/),u=n.from+s.indexOf(i),c=u+i.length;if(Tf(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;cn.from&&a.delete(n.from+l,u);let f=n.from+l+i.length;a.addMark(n.from+l,f,e.type.create(o||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function lL(e){return new Rf({find:e.find,handler:({state:t,range:n,match:r})=>{let o=ge(e.getAttributes,void 0,r)||{},{tr:a}=t,i=n.from,s=n.to,l=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=i+u;c>s?c=s:s=c+r[1].length;let d=r[0][r[0].length-1];a.insertText(d,i+r[0].length-1),a.replaceWith(c,s,l)}else if(r[0]){let u=e.type.isInline?i:i-1;a.insert(u,e.type.create(o)).delete(a.mapping.map(i),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function Eu(e){return new Rf({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),a=ge(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function xr(e){return new Rf({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let a=ge(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),u=l&&fs(l,e.type,a);if(!u)return null;if(i.wrap(l,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));i.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,a).run()}let c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&Tn(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&i.join(n.from-1)},undoable:e.undoable})}function uL(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof $){let a=r.index();return r.parent.canReplaceWith(a,a+1,t)}let o=r.depth;for(;o>=0;){let a=r.index(o);if(r.node(o).contentMatchAt(a).matchType(t))return!0;o-=1}return!1}function cL(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var WB={};Ub(WB,{createAtomBlockMarkdownSpec:()=>GB,createBlockMarkdownSpec:()=>KB,createInlineMarkdownSpec:()=>ZB,parseAttributes:()=>Yb,parseIndentedBlocks:()=>Of,renderNestedMarkdownContent:()=>Lu,serializeAttributes:()=>Qb});function Yb(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){let u=o.map(c=>c.trim().slice(1));t.class=u.join(" ")}let a=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);a&&(t.id=a[1]);let i=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(i)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function Qb(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function GB(e){let{nodeName:t,name:n,parseAttributes:r=Yb,serializeAttributes:o=Qb,defaultAttributes:a={},requiredAttributes:i=[],allowedAttributes:s}=e,l=n||t,u=c=>{if(!s)return c;let d={};return s.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...a,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=r(m);if(!i.find(x=>!(x in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=o(d),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function KB(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=Yb,serializeAttributes:a=Qb,defaultAttributes:i={},content:s="block",allowedAttributes:l}=e,u=n||t,c=d=>{if(!l)return d;let f={};return l.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){let m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else s==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...i,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,x=""]=b,y=o(x),k=1,v=g.length,C="",w=/^:::([\w-]*)(\s.*)?/gm,S=d.slice(v);for(w.lastIndex=0;;){let I=w.exec(S);if(I===null)break;let L=I.index,H=I[1];if(!((h=I[2])!=null&&h.endsWith(":::"))){if(H)k+=1;else if(k-=1,k===0){let K=S.slice(0,L);C=K.trim();let F=d.slice(0,v+L+I[0].length),U=[];if(C)if(s==="block")for(U=p.blockTokens(K),U.forEach(T=>{T.text&&(!T.tokens||T.tokens.length===0)&&(T.tokens=p.inlineTokens(T.text))});U.length>0;){let T=U[U.length-1];if(T.type==="paragraph"&&(!T.text||T.text.trim()===""))U.pop();else break}else U=p.inlineTokens(C);return{type:t,raw:F,attributes:y,content:C,tokens:U}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=a(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],` `);return`:::${u}${m} ${b} -:::`}}}function uP(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function cP(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function dP(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=uP,serializeAttributes:i=cP,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=e,u=n||t,c=f=>{if(!l)return f;let p={};return l.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(a)return p.createNode(t,h);let m=r?r(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",y="";if(a){let[,x]=b;y=x}else{let[,x,k]=b;y=x,g=k||""}let v=o(y.trim());return{type:t,raw:b[0],content:g.trim(),attributes:v}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=i(h),b=m?` ${m}`:"";return a?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function gf(e,t,n){var r,o,i,s;let a=e.split(` -`),l=[],u="",c=0,d=t.baseIndentSize||2;for(;c0)break;if(f.trim()===""){c+=1,u=`${u}${f} +:::`}}}function jB(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,o,a,i]=r;t[o]=a||i,r=n.exec(e)}return t}function XB(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function ZB(e){let{nodeName:t,name:n,getContent:r,parseAttributes:o=jB,serializeAttributes:a=XB,defaultAttributes:i={},selfClosing:s=!1,allowedAttributes:l}=e,u=n||t,c=f=>{if(!l)return f;let p={};return l.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...i,...f.attributes};if(s)return p.createNode(t,h);let m=r?r(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=s?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=s?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",x="";if(s){let[,k]=b;x=k}else{let[,k,v]=b;x=k,g=v||""}let y=o(x.trim());return{type:t,raw:b[0],content:g.trim(),attributes:y}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=a(h),b=m?` ${m}`:"";return s?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function Of(e,t,n){var r,o,a,i;let s=e.split(` +`),l=[],u="",c=0,d=t.baseIndentSize||2;for(;c0)break;if(f.trim()===""){c+=1,u=`${u}${f} `;continue}else return}let h=t.extractItemData(p),{indentLevel:m,mainContent:b}=h;u=`${u}${f} -`;let g=[b];for(c+=1;cC.trim()!=="");if(E===-1)break;if((((o=(r=a[c+1+E].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){g.push(k),u=`${u}${k} -`,c+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>m)g.push(k),u=`${u}${k} -`,c+=1;else break}let y,v=g.slice(1);if(v.length>0){let k=v.map(w=>w.slice(m+d)).join(` -`);k.trim()&&(t.customNestedParser?y=t.customNestedParser(k):y=n.blockTokens(k))}let x=t.createToken(h,y);l.push(x)}if(l.length!==0)return{items:l,raw:u}}function uu(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=e.content,a=t.renderChildren([i]),l=[`${o}${a}`];return s&&s.length>0&&s.forEach(u=>{let c=t.renderChildren([u]);if(c){let d=c.split(` +`;let g=[b];for(c+=1;cL.trim()!=="");if(w===-1)break;if((((o=(r=s[c+1+w].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){g.push(v),u=`${u}${v} +`,c+=1;continue}else break}if((((i=(a=v.match(/^(\s*)/))==null?void 0:a[1])==null?void 0:i.length)||0)>m)g.push(v),u=`${u}${v} +`,c+=1;else break}let x,y=g.slice(1);if(y.length>0){let v=y.map(C=>C.slice(m+d)).join(` +`);v.trim()&&(t.customNestedParser?x=t.customNestedParser(v):x=n.blockTokens(v))}let k=t.createToken(h,x);l.push(k)}if(l.length!==0)return{items:l,raw:u}}function Lu(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(r):n,[a,...i]=e.content,s=t.renderChildren([a]),l=[`${o}${s}`];return i&&i.length>0&&i.forEach(u=>{let c=t.renderChildren([u]);if(c){let d=c.split(` `).map(f=>f?t.indent(f):"").join(` `);l.push(d)}}),l.join(` -`)}function fP(e,t,n={}){let{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((a,l)=>{let u=i.mapping.map(l),c=i.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var te=class zS extends Ab{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new zS(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},US=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,i,s,a;let{view:l}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let y=this.dom.getBoundingClientRect(),v=c.getBoundingClientRect(),x=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,k=(s=e.offsetY)!=null?s:(i=e.nativeEvent)==null?void 0:i.offsetY;d=v.x-y.x+x,f=v.y-y.y+k}let p=this.dom.cloneNode(!0);try{let y=this.dom.getBoundingClientRect();p.style.width=`${Math.round(y.width)}px`,p.style.height=`${Math.round(y.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(a=e.dataTransfer)==null||a.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let b=q.create(l.state.doc,m),g=l.state.tr.setSelection(b);l.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),i=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:a}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,c=q.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!l&&e.target===this.dom)return e.preventDefault(),!1;if(u&&a&&!l&&h){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||i||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(sf()||aS())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function In(e){return new X8({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let i=be(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=t,a=r[r.length-1],l=r[0],u=n.to;if(a){let c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(df(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var ti=R(ge(),1),aC=R(xd(),1);var pP=Object.getOwnPropertyNames,hP=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty;function HS(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function bf(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var i=o.cache,s=i.get(n),a=i.get(r);if(s&&a)return s===r&&a===n;i.set(n,r),i.set(r,n);var l=e(n,r,o);return i.delete(n),i.delete(r),l}}function gP(e){return e?.[Symbol.toStringTag]}function $S(e){return pP(e).concat(hP(e))}var bP=Object.hasOwn||(function(e,t){return mP.call(e,t)});function Yi(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var yP="__v",vP="__o",xP="_owner",qS=Object.getOwnPropertyDescriptor,VS=Object.keys;function kP(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function wP(e,t){return Yi(e.getTime(),t.getTime())}function EP(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function _P(e,t){return e===t}function WS(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),s,a,l=0;(s=i.next())&&!s.done;){for(var u=t.entries(),c=!1,d=0;(a=u.next())&&!a.done;){if(o[d]){d++;continue}var f=s.value,p=a.value;if(n.equals(f[0],p[0],l,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;l++}return!0}var SP=Yi;function CP(e,t,n){var r=VS(e),o=r.length;if(VS(t).length!==o)return!1;for(;o-- >0;)if(!YS(e,t,n,r[o]))return!1;return!0}function cu(e,t,n){var r=$S(e),o=r.length;if($S(t).length!==o)return!1;for(var i,s,a;o-- >0;)if(i=r[o],!YS(e,t,n,i)||(s=qS(e,i),a=qS(t,i),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function TP(e,t){return Yi(e.valueOf(),t.valueOf())}function NP(e,t){return e.source===t.source&&e.flags===t.flags}function jS(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),s,a;(s=i.next())&&!s.done;){for(var l=t.values(),u=!1,c=0;(a=l.next())&&!a.done;){if(!o[c]&&n.equals(s.value,a.value,s.value,a.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function AP(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function MP(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function YS(e,t,n,r){return(r===xP||r===vP||r===yP)&&(e.$$typeof||t.$$typeof)?!0:bP(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var RP="[object Arguments]",OP="[object Boolean]",DP="[object Date]",IP="[object Error]",LP="[object Map]",PP="[object Number]",BP="[object Object]",FP="[object RegExp]",zP="[object Set]",UP="[object String]",HP="[object URL]",$P=Array.isArray,KS=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,GS=Object.assign,qP=Object.prototype.toString.call.bind(Object.prototype.toString);function VP(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,a=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual,p=e.unknownTagComparators;return function(m,b,g){if(m===b)return!0;if(m==null||b==null)return!1;var y=typeof m;if(y!==typeof b)return!1;if(y!=="object")return y==="number"?s(m,b,g):y==="function"?o(m,b,g):!1;var v=m.constructor;if(v!==b.constructor)return!1;if(v===Object)return a(m,b,g);if($P(m))return t(m,b,g);if(KS!=null&&KS(m))return d(m,b,g);if(v===Date)return n(m,b,g);if(v===RegExp)return u(m,b,g);if(v===Map)return i(m,b,g);if(v===Set)return c(m,b,g);var x=qP(m);if(x===DP)return n(m,b,g);if(x===FP)return u(m,b,g);if(x===LP)return i(m,b,g);if(x===zP)return c(m,b,g);if(x===BP)return typeof m.then!="function"&&typeof b.then!="function"&&a(m,b,g);if(x===HP)return f(m,b,g);if(x===IP)return r(m,b,g);if(x===RP)return a(m,b,g);if(x===OP||x===PP||x===UP)return l(m,b,g);if(p){var k=p[x];if(!k){var w=gP(m);w&&(k=p[w])}if(k)return k(m,b,g)}return!1}}function WP(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?cu:kP,areDatesEqual:wP,areErrorsEqual:EP,areFunctionsEqual:_P,areMapsEqual:r?HS(WS,cu):WS,areNumbersEqual:SP,areObjectsEqual:r?cu:CP,arePrimitiveWrappersEqual:TP,areRegExpsEqual:NP,areSetsEqual:r?HS(jS,cu):jS,areTypedArraysEqual:r?cu:AP,areUrlsEqual:MP,unknownTagComparators:void 0};if(n&&(o=GS({},o,n(o))),t){var i=bf(o.areArraysEqual),s=bf(o.areMapsEqual),a=bf(o.areObjectsEqual),l=bf(o.areSetsEqual);o=GS({},o,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:l})}return o}function jP(e){return function(t,n,r,o,i,s,a){return e(t,n,a)}}function KP(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,u){var c=r(),d=c.cache,f=d===void 0?t?new WeakMap:void 0:d,p=c.meta;return n(l,u,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var s={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,u){return n(l,u,s)}}var JS=Qo(),LW=Qo({strict:!0}),PW=Qo({circular:!0}),BW=Qo({circular:!0,strict:!0}),FW=Qo({createInternalComparator:function(){return Yi}}),zW=Qo({strict:!0,createInternalComparator:function(){return Yi}}),UW=Qo({circular:!0,createInternalComparator:function(){return Yi}}),HW=Qo({circular:!0,createInternalComparator:function(){return Yi},strict:!0});function Qo(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,s=i===void 0?!1:i,a=WP(e),l=VP(a),u=r?r(l):jP(l);return KP({circular:n,comparator:l,createState:o,equals:u,strict:s})}var ni=R(ge(),1),lC=R(eC(),1),dC=R(j(),1),fu=R(ge(),1),mC=R(j(),1),bC=R(ge(),1),yC=R(j(),1);var xC=R(ge(),1),Ib=R(ge(),1),kC=R(Xs(),1),wC=R(j(),1),h5=R(j(),1);var ka=R(ge(),1),EC=R(j(),1),n5=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},r5=({contentComponent:e})=>{let t=(0,iC.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,oo.jsx)(oo.Fragment,{children:Object.values(t)})};function o5(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:oC.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var i5=class extends ei.default.Component{constructor(e){var t;super(e),this.editorContentRef=ei.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(e.view.dom),e.setOptions({element:t}),e.contentComponent=o5(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.firstChild))return;let n=document.createElement("div");n.append(t.view.dom),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsx)("div",{ref:n5(t,this.editorContentRef),...n}),e?.contentComponent&&(0,oo.jsx)(r5,{contentComponent:e.contentComponent})]})}},s5=(0,ei.forwardRef)((e,t)=>{let n=ei.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return ei.default.createElement(i5,{key:n,innerRef:t,...e})}),sC=ei.default.memo(s5),a5=typeof window<"u"?ni.useLayoutEffect:ni.useEffect,l5=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function Lb(e){var t;let[n]=(0,ni.useState)(()=>new l5(e.editor)),r=(0,lC.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:JS);return a5(()=>n.watch(e.editor),[e.editor,n]),(0,ni.useDebugValue)(r),r}var tC=!1,Db=typeof window>"u",u5=Db||!!(typeof window<"u"&&window.next),c5=class uC{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Db||u5){if(tC)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Db&&tC)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new LS(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?uC.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function cC(e={},t=[]){let n=(0,ti.useRef)(e);n.current=e;let[r]=(0,ti.useState)(()=>new c5(n)),o=(0,aC.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,ti.useDebugValue)(o),(0,ti.useEffect)(r.onRender(t)),Lb({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),o}var fC=(0,du.createContext)({editor:null}),KW=fC.Consumer,vf=()=>(0,du.useContext)(fC);var pC=(0,fu.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var hC=()=>(0,fu.useContext)(pC);function gC({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=hC();return(0,mC.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var vC=bC.default.forwardRef((e,t)=>{let{onDragStart:n}=hC(),r=e.as||"div";return(0,yC.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function nC(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function rC(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function d5(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function f5(e){if(nC(e)||rC(e))return!0;if(d5(e)){let t=e.type;if(t)return nC(t)||rC(t)}return!1}function p5(){try{if(Ib.version)return parseInt(Ib.version.split(".")[0],10)>=19}catch{}return!1}var Pb=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,kC.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=p5(),i=f5(t),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=a=>{this.ref=a}),this.reactElement=(0,wC.jsx)(t,{...s}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},GW=xC.default.createContext({markViewContentRef:()=>{}});var m5=class extends US{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:(0,ka.createRef)()};if(!this.component.displayName){let l=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=l(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},o=this.component,i=(0,ka.memo)(l=>(0,EC.jsx)(pC.Provider,{value:r,children:(0,ka.createElement)(o,l)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Pb(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=va(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function _C(e,t){return n=>n.editor.contentComponent?new m5(e,n,t):{}}var wa=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var g5=/^\s*>\s$/,SC=te.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return wa("blockquote",{...re(this.options.HTMLAttributes,e),children:wa("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let a=t.renderChildren([o]).split(` -`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(` +`)}function JB(e,t,n={}){let{state:r}=t,{doc:o,tr:a}=r,i=e;o.descendants((s,l)=>{let u=a.mapping.map(l),c=a.mapping.map(l)+s.nodeSize,d=null;if(s.marks.forEach(p=>{if(p!==i)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});a.removeMark(u,c,e.type),a.addMark(u,c,p)}}),a.docChanged&&t.view.dispatch(a)}var te=class dL extends Zb{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new dL(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},fL=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,a,i,s;let{view:l}=this.editor,u=e.target,c=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){let x=this.dom.getBoundingClientRect(),y=c.getBoundingClientRect(),k=(o=e.offsetX)!=null?o:(r=e.nativeEvent)==null?void 0:r.offsetX,v=(i=e.offsetY)!=null?i:(a=e.nativeEvent)==null?void 0:a.offsetY;d=y.x-x.x+k,f=y.y-x.y+v}let p=this.dom.cloneNode(!0);try{let x=this.dom.getBoundingClientRect();p.style.width=`${Math.round(x.width)}px`,p.style.height=`${Math.round(x.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(s=e.dataTransfer)==null||s.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let b=$.create(l.state.doc,m),g=l.state.tr.setSelection(b);l.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;let o=e.type.startsWith("drag"),a=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!a&&!o)return!0;let{isEditable:s}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,c=$.isSelectable(this.node),d=e.type==="copy",f=e.type==="paste",p=e.type==="cut",h=e.type==="mousedown";if(!u&&c&&o&&e.target===this.dom&&e.preventDefault(),u&&o&&!l&&e.target===this.dom)return e.preventDefault(),!1;if(u&&s&&!l&&h){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||a||d||f||p||h&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Ef()||RE())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!="number")return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function On(e){return new BB({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let a=ge(e.getAttributes,void 0,r,o);if(a===!1||a===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0],u=n.to;if(s){let c=l.search(/\S/),d=n.from+l.indexOf(s),f=d+s.length;if(Tf(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;fn.from&&i.delete(n.from+c,d),u=n.from+c+s.length,i.addMark(n.from+c,u,e.type.create(a||{})),i.removeStoredMark(e.type)}}})}var aa=M(pe(),1),TL=M(zd(),1);var{getOwnPropertyNames:YB,getOwnPropertySymbols:QB}=Object,{hasOwnProperty:eF}=Object.prototype;function e1(e,t){return function(r,o,a){return e(r,o,a)&&t(r,o,a)}}function Pf(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);let{cache:a}=o,i=a.get(n),s=a.get(r);if(i&&s)return i===r&&s===n;a.set(n,r),a.set(r,n);let l=e(n,r,o);return a.delete(n),a.delete(r),l}}function tF(e){return e?.[Symbol.toStringTag]}function pL(e){return YB(e).concat(QB(e))}var nF=Object.hasOwn||((e,t)=>eF.call(e,t));function Qa(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var rF="__v",oF="__o",aF="_owner",{getOwnPropertyDescriptor:hL,keys:mL}=Object;function iF(e,t){return e.byteLength===t.byteLength&&Bf(new Uint8Array(e),new Uint8Array(t))}function sF(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function lF(e,t){return e.byteLength===t.byteLength&&Bf(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function uF(e,t){return Qa(e.getTime(),t.getTime())}function cF(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function dF(e,t){return e===t}function gL(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),a=e.entries(),i,s,l=0;for(;(i=a.next())&&!i.done;){let u=t.entries(),c=!1,d=0;for(;(s=u.next())&&!s.done;){if(o[d]){d++;continue}let f=i.value,p=s.value;if(n.equals(f[0],p[0],l,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;l++}return!0}var fF=Qa;function pF(e,t,n){let r=mL(e),o=r.length;if(mL(t).length!==o)return!1;for(;o-- >0;)if(!xL(e,t,n,r[o]))return!1;return!0}function Iu(e,t,n){let r=pL(e),o=r.length;if(pL(t).length!==o)return!1;let a,i,s;for(;o-- >0;)if(a=r[o],!xL(e,t,n,a)||(i=hL(e,a),s=hL(t,a),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function hF(e,t){return Qa(e.valueOf(),t.valueOf())}function mF(e,t){return e.source===t.source&&e.flags===t.flags}function bL(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let o=new Array(r),a=e.values(),i,s;for(;(i=a.next())&&!i.done;){let l=t.values(),u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!o[c]&&n.equals(i.value,s.value,i.value,s.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function Bf(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function gF(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function xL(e,t,n,r){return(r===aF||r===oF||r===rF)&&(e.$$typeof||t.$$typeof)?!0:nF(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var bF="[object ArrayBuffer]",xF="[object Arguments]",yF="[object Boolean]",kF="[object DataView]",vF="[object Date]",CF="[object Error]",wF="[object Map]",SF="[object Number]",EF="[object Object]",LF="[object RegExp]",IF="[object Set]",_F="[object String]",AF={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},TF="[object URL]",MF=Object.prototype.toString;function NF({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:h}){return function(b,g,x){if(b===g)return!0;if(b==null||g==null)return!1;let y=typeof b;if(y!==typeof g)return!1;if(y!=="object")return y==="number"?s(b,g,x):y==="function"?a(b,g,x):!1;let k=b.constructor;if(k!==g.constructor)return!1;if(k===Object)return l(b,g,x);if(Array.isArray(b))return t(b,g,x);if(k===Date)return r(b,g,x);if(k===RegExp)return c(b,g,x);if(k===Map)return i(b,g,x);if(k===Set)return d(b,g,x);let v=MF.call(b);if(v===vF)return r(b,g,x);if(v===LF)return c(b,g,x);if(v===wF)return i(b,g,x);if(v===IF)return d(b,g,x);if(v===EF)return typeof b.then!="function"&&typeof g.then!="function"&&l(b,g,x);if(v===TF)return p(b,g,x);if(v===CF)return o(b,g,x);if(v===xF)return l(b,g,x);if(AF[v])return f(b,g,x);if(v===bF)return e(b,g,x);if(v===kF)return n(b,g,x);if(v===yF||v===SF||v===_F)return u(b,g,x);if(h){let C=h[v];if(!C){let w=tF(b);w&&(C=h[w])}if(C)return C(b,g,x)}return!1}}function RF({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:iF,areArraysEqual:n?Iu:sF,areDataViewsEqual:lF,areDatesEqual:uF,areErrorsEqual:cF,areFunctionsEqual:dF,areMapsEqual:n?e1(gL,Iu):gL,areNumbersEqual:fF,areObjectsEqual:n?Iu:pF,arePrimitiveWrappersEqual:hF,areRegExpsEqual:mF,areSetsEqual:n?e1(bL,Iu):bL,areTypedArraysEqual:n?e1(Bf,Iu):Bf,areUrlsEqual:gF,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let o=Pf(r.areArraysEqual),a=Pf(r.areMapsEqual),i=Pf(r.areObjectsEqual),s=Pf(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:i,areSetsEqual:s})}return r}function DF(e){return function(t,n,r,o,a,i,s){return e(t,n,s)}}function OF({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(s,l){let{cache:u=e?new WeakMap:void 0,meta:c}=n();return t(s,l,{cache:u,equals:r,meta:c,strict:o})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};let a={cache:void 0,equals:r,meta:void 0,strict:o};return function(s,l){return t(s,l,a)}}var yL=ra(),wK=ra({strict:!0}),SK=ra({circular:!0}),EK=ra({circular:!0,strict:!0}),LK=ra({createInternalComparator:()=>Qa}),IK=ra({strict:!0,createInternalComparator:()=>Qa}),_K=ra({circular:!0,createInternalComparator:()=>Qa}),AK=ra({circular:!0,createInternalComparator:()=>Qa,strict:!0});function ra(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,a=RF(e),i=NF(a),s=n?n(i):DF(i);return OF({circular:t,comparator:i,createState:r,equals:s,strict:o})}var ia=M(pe(),1),ML=M(wL(),1),DL=M(G(),1),Au=M(pe(),1),FL=M(G(),1),UL=M(pe(),1),HL=M(G(),1);var $L=M(pe(),1),n1=M(pe(),1),VL=M(ts(),1),WL=M(G(),1),n8=M(G(),1);var Is=M(pe(),1),GL=M(G(),1),VF=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},WF=({contentComponent:e})=>{let t=(0,_L.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,ao.jsx)(ao.Fragment,{children:Object.values(t)})};function GF(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:IL.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var KF=class extends oa.default.Component{constructor(e){var t;super(e),this.editorContentRef=oa.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=GF(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)("div",{ref:VF(t,this.editorContentRef),...n}),e?.contentComponent&&(0,ao.jsx)(WF,{contentComponent:e.contentComponent})]})}},jF=(0,oa.forwardRef)((e,t)=>{let n=oa.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return oa.default.createElement(KF,{key:n,innerRef:t,...e})}),AL=oa.default.memo(jF),XF=typeof window<"u"?ia.useLayoutEffect:ia.useEffect,ZF=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function r1(e){var t;let[n]=(0,ia.useState)(()=>new ZF(e.editor)),r=(0,ML.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:yL);return XF(()=>n.watch(e.editor),[e.editor,n]),(0,ia.useDebugValue)(r),r}var SL=!1,t1=typeof window>"u",JF=t1||!!(typeof window<"u"&&window.next),YF=class NL{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(t1||JF){if(SL)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&t1&&SL)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,a;return(a=(o=this.options.current).onBeforeCreate)==null?void 0:a.call(o,...r)},onBlur:(...r)=>{var o,a;return(a=(o=this.options.current).onBlur)==null?void 0:a.call(o,...r)},onCreate:(...r)=>{var o,a;return(a=(o=this.options.current).onCreate)==null?void 0:a.call(o,...r)},onDestroy:(...r)=>{var o,a;return(a=(o=this.options.current).onDestroy)==null?void 0:a.call(o,...r)},onFocus:(...r)=>{var o,a;return(a=(o=this.options.current).onFocus)==null?void 0:a.call(o,...r)},onSelectionUpdate:(...r)=>{var o,a;return(a=(o=this.options.current).onSelectionUpdate)==null?void 0:a.call(o,...r)},onTransaction:(...r)=>{var o,a;return(a=(o=this.options.current).onTransaction)==null?void 0:a.call(o,...r)},onUpdate:(...r)=>{var o,a;return(a=(o=this.options.current).onUpdate)==null?void 0:a.call(o,...r)},onContentError:(...r)=>{var o,a;return(a=(o=this.options.current).onContentError)==null?void 0:a.call(o,...r)},onDrop:(...r)=>{var o,a;return(a=(o=this.options.current).onDrop)==null?void 0:a.call(o,...r)},onPaste:(...r)=>{var o,a;return(a=(o=this.options.current).onPaste)==null?void 0:a.call(o,...r)},onDelete:(...r)=>{var o,a;return(a=(o=this.options.current).onDelete)==null?void 0:a.call(o,...r)}};return new sL(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,a)=>{var i;return o===((i=n.extensions)==null?void 0:i[a])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?NL.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function RL(e={},t=[]){let n=(0,aa.useRef)(e);n.current=e;let[r]=(0,aa.useState)(()=>new YF(n)),o=(0,TL.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,aa.useDebugValue)(o),(0,aa.useEffect)(r.onRender(t)),r1({editor:o,selector:({transactionNumber:a})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&a===0?0:a+1}),o}var OL=(0,_u.createContext)({editor:null}),OK=OL.Consumer,zf=()=>(0,_u.useContext)(OL);var PL=(0,Au.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var BL=()=>(0,Au.useContext)(PL);function zL({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=BL();return(0,FL.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var qL=UL.default.forwardRef((e,t)=>{let{onDragStart:n}=BL(),r=e.as||"div";return(0,HL.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function EL(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function LL(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function QF(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function e8(e){if(EL(e)||LL(e))return!0;if(QF(e)){let t=e.type;if(t)return EL(t)||LL(t)}return!1}function t8(){try{if(n1.version)return parseInt(n1.version.split(".")[0],10)>=19}catch{}return!1}var o1=class{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,VL.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=t8(),a=e8(t),i={...n};i.ref&&!(o||a)&&delete i.ref,!i.ref&&(o||a)&&(i.ref=s=>{this.ref=s}),this.reactElement=(0,WL.jsx)(t,{...i}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;(e=t?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},PK=$L.default.createContext({markViewContentRef:()=>{}});var r8=class extends fL{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:(0,Is.createRef)()};if(!this.component.displayName){let l=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=l(this.extension.name)}let r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},o=this.component,a=(0,Is.memo)(l=>(0,GL.jsx)(PL.Provider,{value:r,children:(0,Is.createElement)(o,l)}));a.displayName="ReactNodeView";let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);let{className:s=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new o1(a,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${s}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let o=this.node,a=this.decorations,i=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:i,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){let t=this.editor.extensionManager.attributes,n=Es(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function KL(e,t){return n=>n.editor.contentComponent?new r8(e,n,t):{}}var _s=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]};var o8=/^\s*>\s$/,jL=te.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return _s("blockquote",{...oe(this.options.HTMLAttributes,e),children:_s("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",r=[];return e.content.forEach(o=>{let s=t.renderChildren([o]).split(` +`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(s.join(` `))}),r.join(` ${n} -`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[br({find:g5,type:this.type})]}});var b5=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,y5=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,v5=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,x5=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,CC=it.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return wa("strong",{...re(this.options.HTMLAttributes,e),children:wa("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[gr({find:b5,type:this.type}),gr({find:v5,type:this.type})]},addPasteRules(){return[In({find:y5,type:this.type}),In({find:x5,type:this.type})]}});var k5=/(^|[^`])`([^`]+)`(?!`)$/,w5=/(^|[^`])`([^`]+)`(?!`)/g,TC=it.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[gr({find:k5,type:this.type})]},addPasteRules(){return[In({find:w5,type:this.type})]}});var Bb=4,E5=/^```([a-z]+)?[\s\n]$/,_5=/^~~~([a-z]+)?[\s\n]$/,Fb=te.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Bb,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",re(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` +`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[xr({find:o8,type:this.type})]}});var a8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,i8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,s8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,l8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,XL=it.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return _s("strong",{...oe(this.options.HTMLAttributes,e),children:_s("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[br({find:a8,type:this.type}),br({find:s8,type:this.type})]},addPasteRules(){return[On({find:i8,type:this.type}),On({find:l8,type:this.type})]}});var u8=/(^|[^`])`([^`]+)`(?!`)$/,c8=/(^|[^`])`([^`]+)`(?!`)/g,ZL=it.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",oe(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[br({find:u8,type:this.type})]},addPasteRules(){return[On({find:c8,type:this.type})]}});var a1=4,d8=/^```([a-z]+)?[\s\n]$/,f8=/^~~~([a-z]+)?[\s\n]$/,i1=te.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:a1,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let a=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",oe(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="",o=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${o}`,t.renderChildren(e.content),"```"].join(` `):r=`\`\`\`${o} -\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Bb,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let a=" ".repeat(n);return s?e.commands.insertContent(a):e.commands.command(({tr:l})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` +\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:a1,{state:r}=e,{selection:o}=r,{$from:a,empty:i}=o;if(a.parent.type!==this.type)return!1;let s=" ".repeat(n);return i?e.commands.insertContent(s):e.commands.command(({tr:l})=>{let{from:u,to:c}=o,p=r.doc.textBetween(u,c,` `,` `).split(` -`).map(h=>a+h).join(` -`);return l.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:Bb,{state:r}=e,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?e.commands.command(({tr:a})=>{var l;let{pos:u}=i,c=i.start(),d=i.end(),p=r.doc.textBetween(c,d,` +`).map(h=>s+h).join(` +`);return l.replaceWith(u,c,r.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:a1,{state:r}=e,{selection:o}=r,{$from:a,empty:i}=o;return a.parent.type!==this.type?!1:i?e.commands.command(({tr:s})=>{var l;let{pos:u}=a,c=a.start(),d=a.end(),p=r.doc.textBetween(c,d,` `,` `).split(` -`),h=0,m=0,b=u-c;for(let w=0;w=b){h=w;break}m+=p[w].length+1}let y=((l=p[h].match(/^ */))==null?void 0:l[0])||"",v=Math.min(y.length,n);if(v===0)return!0;let x=c;for(let w=0;w{let{from:l,to:u}=o,f=r.doc.textBetween(l,u,` +`),h=0,m=0,b=u-c;for(let C=0;C=b){h=C;break}m+=p[C].length+1}let x=((l=p[h].match(/^ */))==null?void 0:l[0])||"",y=Math.min(x.length,n);if(y===0)return!0;let k=c;for(let C=0;C{let{from:l,to:u}=o,f=r.doc.textBetween(l,u,` `,` `).split(` `).map(p=>{var h;let m=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(m.length,n);return p.slice(b)}).join(` -`);return a.replaceWith(l,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` +`);return s.replaceWith(l,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(` -`);return!i||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let a=o.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(J.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[lu({find:E5,type:this.type,getAttributes:e=>({language:e[1]})}),lu({find:_5,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new G({key:new Q("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,` -`));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(V.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),NC=Fb;var AC=te.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`);return!a||!i?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:a}=n;if(!a||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let s=o.after();return s===void 0?!1:r.nodeAt(s)?e.commands.command(({tr:u})=>(u.setSelection(Z.near(r.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[Eu({find:d8,type:this.type,getAttributes:e=>({language:e[1]})}),Eu({find:f8,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new j({key:new Q("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=o?.mode;if(!n||!a)return!1;let{tr:i,schema:s}=e.state,l=s.text(n.replace(/\r\n?/g,` +`));return i.replaceSelectionWith(this.type.create({language:a},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(V.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}}),JL=i1;var YL=te.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):""});var MC=te.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",re(this.options.HTMLAttributes,e)]},renderText(){return` +`):""});var QL=te.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",oe(this.options.HTMLAttributes,e)]},renderText(){return` `},renderMarkdown:()=>` -`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&s){let d=l.filter(f=>a.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var RC=te.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,re(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>lu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var OC=te.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",re(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!BS(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return ff(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:a})=>{if(a){let{$to:l}=s.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?s.setSelection(V.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection(q.create(s.doc,l.pos)):s.setSelection(V.create(s.doc,l.pos));else{let c=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(V.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[PS({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var S5=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,C5=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,T5=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,N5=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,DC=it.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",re(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[gr({find:S5,type:this.type}),gr({find:T5,type:this.type})]},addPasteRules(){return[In({find:C5,type:this.type}),In({find:N5,type:this.type})]}});var A5="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",M5="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Wb="numeric",jb="ascii",Kb="alpha",mu="asciinumeric",hu="alphanumeric",Gb="domain",UC="emoji",R5="scheme",O5="slashscheme",zb="whitespace";function D5(e,t){return e in t||(t[e]=[]),t[e]}function Ji(e,t,n){t[Wb]&&(t[mu]=!0,t[hu]=!0),t[jb]&&(t[mu]=!0,t[Kb]=!0),t[mu]&&(t[hu]=!0),t[Kb]&&(t[hu]=!0),t[hu]&&(t[Gb]=!0),t[UC]&&(t[Gb]=!0);for(let r in t){let o=D5(r,n);o.indexOf(e)<0&&o.push(e)}}function I5(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function an(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}an.groups={};an.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Je=(e,t,n,r,o)=>e.tr(t,n,r,o),IC=(e,t,n,r,o)=>e.ts(t,n,r,o),L=(e,t,n,r,o)=>e.tt(t,n,r,o),ao="WORD",Yb="UWORD",HC="ASCIINUMERICAL",$C="ALPHANUMERICAL",ku="LOCALHOST",Jb="TLD",Zb="UTLD",Ef="SCHEME",Ea="SLASH_SCHEME",Qb="NUM",Xb="WS",e1="NL",gu="OPENBRACE",bu="CLOSEBRACE",_f="OPENBRACKET",Sf="CLOSEBRACKET",Cf="OPENPAREN",Tf="CLOSEPAREN",Nf="OPENANGLEBRACKET",Af="CLOSEANGLEBRACKET",Mf="FULLWIDTHLEFTPAREN",Rf="FULLWIDTHRIGHTPAREN",Of="LEFTCORNERBRACKET",Df="RIGHTCORNERBRACKET",If="LEFTWHITECORNERBRACKET",Lf="RIGHTWHITECORNERBRACKET",Pf="FULLWIDTHLESSTHAN",Bf="FULLWIDTHGREATERTHAN",Ff="AMPERSAND",zf="APOSTROPHE",Uf="ASTERISK",oi="AT",Hf="BACKSLASH",$f="BACKTICK",qf="CARET",ii="COLON",t1="COMMA",Vf="DOLLAR",yr="DOT",Wf="EQUALS",n1="EXCLAMATION",Pn="HYPHEN",yu="PERCENT",jf="PIPE",Kf="PLUS",Gf="POUND",vu="QUERY",r1="QUOTE",qC="FULLWIDTHMIDDLEDOT",o1="SEMI",vr="SLASH",xu="TILDE",Yf="UNDERSCORE",VC="EMOJI",Jf="SYM",WC=Object.freeze({__proto__:null,ALPHANUMERICAL:$C,AMPERSAND:Ff,APOSTROPHE:zf,ASCIINUMERICAL:HC,ASTERISK:Uf,AT:oi,BACKSLASH:Hf,BACKTICK:$f,CARET:qf,CLOSEANGLEBRACKET:Af,CLOSEBRACE:bu,CLOSEBRACKET:Sf,CLOSEPAREN:Tf,COLON:ii,COMMA:t1,DOLLAR:Vf,DOT:yr,EMOJI:VC,EQUALS:Wf,EXCLAMATION:n1,FULLWIDTHGREATERTHAN:Bf,FULLWIDTHLEFTPAREN:Mf,FULLWIDTHLESSTHAN:Pf,FULLWIDTHMIDDLEDOT:qC,FULLWIDTHRIGHTPAREN:Rf,HYPHEN:Pn,LEFTCORNERBRACKET:Of,LEFTWHITECORNERBRACKET:If,LOCALHOST:ku,NL:e1,NUM:Qb,OPENANGLEBRACKET:Nf,OPENBRACE:gu,OPENBRACKET:_f,OPENPAREN:Cf,PERCENT:yu,PIPE:jf,PLUS:Kf,POUND:Gf,QUERY:vu,QUOTE:r1,RIGHTCORNERBRACKET:Df,RIGHTWHITECORNERBRACKET:Lf,SCHEME:Ef,SEMI:o1,SLASH:vr,SLASH_SCHEME:Ea,SYM:Jf,TILDE:xu,TLD:Jb,UNDERSCORE:Yf,UTLD:Zb,UWORD:Yb,WORD:ao,WS:Xb}),io=/[a-z]/,pu=/\p{L}/u,Ub=/\p{Emoji}/u;var so=/\d/,Hb=/\s/;var LC="\r",$b=` -`,L5="\uFE0F",P5="\u200D",qb="\uFFFC",xf=null,kf=null;function B5(e=[]){let t={};an.groups=t;let n=new an;xf==null&&(xf=PC(A5)),kf==null&&(kf=PC(M5)),L(n,"'",zf),L(n,"{",gu),L(n,"}",bu),L(n,"[",_f),L(n,"]",Sf),L(n,"(",Cf),L(n,")",Tf),L(n,"<",Nf),L(n,">",Af),L(n,"\uFF08",Mf),L(n,"\uFF09",Rf),L(n,"\u300C",Of),L(n,"\u300D",Df),L(n,"\u300E",If),L(n,"\u300F",Lf),L(n,"\uFF1C",Pf),L(n,"\uFF1E",Bf),L(n,"&",Ff),L(n,"*",Uf),L(n,"@",oi),L(n,"`",$f),L(n,"^",qf),L(n,":",ii),L(n,",",t1),L(n,"$",Vf),L(n,".",yr),L(n,"=",Wf),L(n,"!",n1),L(n,"-",Pn),L(n,"%",yu),L(n,"|",jf),L(n,"+",Kf),L(n,"#",Gf),L(n,"?",vu),L(n,'"',r1),L(n,"/",vr),L(n,";",o1),L(n,"~",xu),L(n,"_",Yf),L(n,"\\",Hf),L(n,"\u30FB",qC);let r=Je(n,so,Qb,{[Wb]:!0});Je(r,so,r);let o=Je(r,io,HC,{[mu]:!0}),i=Je(r,pu,$C,{[hu]:!0}),s=Je(n,io,ao,{[jb]:!0});Je(s,so,o),Je(s,io,s),Je(o,so,o),Je(o,io,o);let a=Je(n,pu,Yb,{[Kb]:!0});Je(a,io),Je(a,so,i),Je(a,pu,a),Je(i,so,i),Je(i,io),Je(i,pu,i);let l=L(n,$b,e1,{[zb]:!0}),u=L(n,LC,Xb,{[zb]:!0}),c=Je(n,Hb,Xb,{[zb]:!0});L(n,qb,c),L(u,$b,l),L(u,qb,c),Je(u,Hb,c),L(c,LC),L(c,$b),Je(c,Hb,c),L(c,qb,c);let d=Je(n,Ub,VC,{[UC]:!0});L(d,"#"),Je(d,Ub,d),L(d,L5,d);let f=L(d,P5);L(f,"#"),Je(f,Ub,d);let p=[[io,s],[so,o]],h=[[io,null],[pu,a],[so,i]];for(let m=0;mm[0]>b[0]?1:-1);for(let m=0;m=0?y[Gb]=!0:io.test(b)?so.test(b)?y[mu]=!0:y[jb]=!0:y[Wb]=!0,IC(n,b,b,y)}return IC(n,"localhost",ku,{ascii:!0}),n.jd=new an(Jf),{start:n,tokens:Object.assign({groups:t},WC)}}function jC(e,t){let n=F5(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s=0&&(d+=n[s].length,f++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=f,u-=d,o.push({t:c.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function F5(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function ri(e,t,n,r,o){let i,s=t.length;for(let a=0;a=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}var wu={defaultProtocol:"http",events:null,format:BC,formatHref:BC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function i1(e,t=null){let n=Object.assign({},wu);e&&(n=Object.assign(n,e instanceof i1?e.o:e));let r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=wu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:o,attributes:s,content:i,eventListeners:d}}};function Zf(e,t){class n extends KC{constructor(o,i){super(o,i),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var FC=Zf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),zC=Zf("text"),z5=Zf("nl"),wf=Zf("url",{isLink:!0,toHref(e=wu.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==ku&&e[1].t===ii}});var Ln=e=>new an(e);function U5({groups:e}){let t=e.domain.concat([Ff,Uf,oi,Hf,$f,qf,Vf,Wf,Pn,Qb,yu,jf,Kf,Gf,vr,Jf,xu,Yf]),n=[zf,ii,t1,yr,n1,yu,vu,r1,o1,Nf,Af,gu,bu,Sf,_f,Cf,Tf,Mf,Rf,Of,Df,If,Lf,Pf,Bf],r=[Ff,zf,Uf,Hf,$f,qf,Vf,Wf,Pn,gu,bu,yu,jf,Kf,Gf,vu,vr,Jf,xu,Yf],o=Ln(),i=L(o,xu);ae(i,r,i),ae(i,e.domain,i);let s=Ln(),a=Ln(),l=Ln();ae(o,e.domain,s),ae(o,e.scheme,a),ae(o,e.slashscheme,l),ae(s,r,i),ae(s,e.domain,s);let u=L(s,oi);L(i,oi,u),L(a,oi,u),L(l,oi,u);let c=L(i,yr);ae(c,r,i),ae(c,e.domain,i);let d=Ln();ae(u,e.domain,d),ae(d,e.domain,d);let f=L(d,yr);ae(f,e.domain,d);let p=Ln(FC);ae(f,e.tld,p),ae(f,e.utld,p),L(u,ku,p);let h=L(d,Pn);L(h,Pn,h),ae(h,e.domain,d),ae(p,e.domain,d),L(p,yr,f),L(p,Pn,h);let m=L(p,ii);ae(m,e.numeric,FC);let b=L(s,Pn),g=L(s,yr);L(b,Pn,b),ae(b,e.domain,s),ae(g,r,i),ae(g,e.domain,s);let y=Ln(wf);ae(g,e.tld,y),ae(g,e.utld,y),ae(y,e.domain,s),ae(y,r,i),L(y,yr,g),L(y,Pn,b),L(y,oi,u);let v=L(y,ii),x=Ln(wf);ae(v,e.numeric,x);let k=Ln(wf),w=Ln();ae(k,t,k),ae(k,n,w),ae(w,t,k),ae(w,n,w),L(y,vr,k),L(x,vr,k);let E=L(a,ii),_=L(l,ii),T=L(_,vr),C=L(T,vr);ae(a,e.domain,s),L(a,yr,g),L(a,Pn,b),ae(l,e.domain,s),L(l,yr,g),L(l,Pn,b),ae(E,e.domain,k),L(E,vr,k),L(E,vu,k),ae(C,e.domain,k),ae(C,t,k),L(C,vr,k);let H=[[gu,bu],[_f,Sf],[Cf,Tf],[Nf,Af],[Mf,Rf],[Of,Df],[If,Lf],[Pf,Bf]];for(let K=0;K=0&&f++,o++,c++;if(f<0)o-=c,o0&&(i.push(Vb(zC,t,s)),s=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);i.push(Vb(p,t,h))}}return s.length>0&&i.push(Vb(zC,t,s)),i}function Vb(e,t,n){let r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}var $5=typeof console<"u"&&console&&console.warn||(()=>{}),q5="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ie={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function GC(){return an.groups={},Ie.scanner=null,Ie.parser=null,Ie.tokenQueue=[],Ie.pluginQueue=[],Ie.customSchemes=[],Ie.initialized=!1,Ie}function s1(e,t=!1){if(Ie.initialized&&$5(`linkifyjs: already initialized - will not register custom scheme "${e}" ${q5}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. +`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:a}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,l=a||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&i){let d=l.filter(f=>s.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var eI=te.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,oe(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,o="#".repeat(r);return e.content?`${o} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Eu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var tI=te.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",oe(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!uL(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,o=e();return Mf(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:a,tr:i,dispatch:s})=>{if(s){let{$to:l}=i.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection(V.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection($.create(i.doc,l.pos)):i.setSelection(V.create(i.doc,l.pos));else{let c=a.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c?.create();d&&(i.insert(u,d),i.setSelection(V.create(i.doc,u+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[lL({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var p8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,h8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,m8=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,g8=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,nI=it.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",oe(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[br({find:p8,type:this.type}),br({find:m8,type:this.type})]},addPasteRules(){return[On({find:h8,type:this.type}),On({find:g8,type:this.type})]}});var b8="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",x8="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",p1="numeric",h1="ascii",m1="alpha",Nu="asciinumeric",Mu="alphanumeric",g1="domain",uI="emoji",y8="scheme",k8="slashscheme",s1="whitespace";function v8(e,t){return e in t||(t[e]=[]),t[e]}function ei(e,t,n){t[p1]&&(t[Nu]=!0,t[Mu]=!0),t[h1]&&(t[Nu]=!0,t[m1]=!0),t[Nu]&&(t[Mu]=!0),t[m1]&&(t[Mu]=!0),t[Mu]&&(t[g1]=!0),t[uI]&&(t[g1]=!0);for(let r in t){let o=v8(r,n);o.indexOf(e)<0&&o.push(e)}}function C8(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function ln(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}ln.groups={};ln.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Je=(e,t,n,r,o)=>e.tr(t,n,r,o),rI=(e,t,n,r,o)=>e.ts(t,n,r,o),O=(e,t,n,r,o)=>e.tt(t,n,r,o),lo="WORD",b1="UWORD",cI="ASCIINUMERICAL",dI="ALPHANUMERICAL",Fu="LOCALHOST",x1="TLD",y1="UTLD",$f="SCHEME",As="SLASH_SCHEME",v1="NUM",k1="WS",C1="NL",Ru="OPENBRACE",Du="CLOSEBRACE",Vf="OPENBRACKET",Wf="CLOSEBRACKET",Gf="OPENPAREN",Kf="CLOSEPAREN",jf="OPENANGLEBRACKET",Xf="CLOSEANGLEBRACKET",Zf="FULLWIDTHLEFTPAREN",Jf="FULLWIDTHRIGHTPAREN",Yf="LEFTCORNERBRACKET",Qf="RIGHTCORNERBRACKET",ep="LEFTWHITECORNERBRACKET",tp="RIGHTWHITECORNERBRACKET",np="FULLWIDTHLESSTHAN",rp="FULLWIDTHGREATERTHAN",op="AMPERSAND",ap="APOSTROPHE",ip="ASTERISK",la="AT",sp="BACKSLASH",lp="BACKTICK",up="CARET",ua="COLON",w1="COMMA",cp="DOLLAR",yr="DOT",dp="EQUALS",S1="EXCLAMATION",Bn="HYPHEN",Ou="PERCENT",fp="PIPE",pp="PLUS",hp="POUND",Pu="QUERY",E1="QUOTE",fI="FULLWIDTHMIDDLEDOT",L1="SEMI",kr="SLASH",Bu="TILDE",mp="UNDERSCORE",pI="EMOJI",gp="SYM",hI=Object.freeze({__proto__:null,ALPHANUMERICAL:dI,AMPERSAND:op,APOSTROPHE:ap,ASCIINUMERICAL:cI,ASTERISK:ip,AT:la,BACKSLASH:sp,BACKTICK:lp,CARET:up,CLOSEANGLEBRACKET:Xf,CLOSEBRACE:Du,CLOSEBRACKET:Wf,CLOSEPAREN:Kf,COLON:ua,COMMA:w1,DOLLAR:cp,DOT:yr,EMOJI:pI,EQUALS:dp,EXCLAMATION:S1,FULLWIDTHGREATERTHAN:rp,FULLWIDTHLEFTPAREN:Zf,FULLWIDTHLESSTHAN:np,FULLWIDTHMIDDLEDOT:fI,FULLWIDTHRIGHTPAREN:Jf,HYPHEN:Bn,LEFTCORNERBRACKET:Yf,LEFTWHITECORNERBRACKET:ep,LOCALHOST:Fu,NL:C1,NUM:v1,OPENANGLEBRACKET:jf,OPENBRACE:Ru,OPENBRACKET:Vf,OPENPAREN:Gf,PERCENT:Ou,PIPE:fp,PLUS:pp,POUND:hp,QUERY:Pu,QUOTE:E1,RIGHTCORNERBRACKET:Qf,RIGHTWHITECORNERBRACKET:tp,SCHEME:$f,SEMI:L1,SLASH:kr,SLASH_SCHEME:As,SYM:gp,TILDE:Bu,TLD:x1,UNDERSCORE:mp,UTLD:y1,UWORD:b1,WORD:lo,WS:k1}),io=/[a-z]/,Tu=/\p{L}/u,l1=/\p{Emoji}/u;var so=/\d/,u1=/\s/;var oI="\r",c1=` +`,w8="\uFE0F",S8="\u200D",d1="\uFFFC",Uf=null,Hf=null;function E8(e=[]){let t={};ln.groups=t;let n=new ln;Uf==null&&(Uf=aI(b8)),Hf==null&&(Hf=aI(x8)),O(n,"'",ap),O(n,"{",Ru),O(n,"}",Du),O(n,"[",Vf),O(n,"]",Wf),O(n,"(",Gf),O(n,")",Kf),O(n,"<",jf),O(n,">",Xf),O(n,"\uFF08",Zf),O(n,"\uFF09",Jf),O(n,"\u300C",Yf),O(n,"\u300D",Qf),O(n,"\u300E",ep),O(n,"\u300F",tp),O(n,"\uFF1C",np),O(n,"\uFF1E",rp),O(n,"&",op),O(n,"*",ip),O(n,"@",la),O(n,"`",lp),O(n,"^",up),O(n,":",ua),O(n,",",w1),O(n,"$",cp),O(n,".",yr),O(n,"=",dp),O(n,"!",S1),O(n,"-",Bn),O(n,"%",Ou),O(n,"|",fp),O(n,"+",pp),O(n,"#",hp),O(n,"?",Pu),O(n,'"',E1),O(n,"/",kr),O(n,";",L1),O(n,"~",Bu),O(n,"_",mp),O(n,"\\",sp),O(n,"\u30FB",fI);let r=Je(n,so,v1,{[p1]:!0});Je(r,so,r);let o=Je(r,io,cI,{[Nu]:!0}),a=Je(r,Tu,dI,{[Mu]:!0}),i=Je(n,io,lo,{[h1]:!0});Je(i,so,o),Je(i,io,i),Je(o,so,o),Je(o,io,o);let s=Je(n,Tu,b1,{[m1]:!0});Je(s,io),Je(s,so,a),Je(s,Tu,s),Je(a,so,a),Je(a,io),Je(a,Tu,a);let l=O(n,c1,C1,{[s1]:!0}),u=O(n,oI,k1,{[s1]:!0}),c=Je(n,u1,k1,{[s1]:!0});O(n,d1,c),O(u,c1,l),O(u,d1,c),Je(u,u1,c),O(c,oI),O(c,c1),Je(c,u1,c),O(c,d1,c);let d=Je(n,l1,pI,{[uI]:!0});O(d,"#"),Je(d,l1,d),O(d,w8,d);let f=O(d,S8);O(f,"#"),Je(f,l1,d);let p=[[io,i],[so,o]],h=[[io,null],[Tu,s],[so,a]];for(let m=0;mm[0]>b[0]?1:-1);for(let m=0;m=0?x[g1]=!0:io.test(b)?so.test(b)?x[Nu]=!0:x[h1]=!0:x[p1]=!0,rI(n,b,b,x)}return rI(n,"localhost",Fu,{ascii:!0}),n.jd=new ln(gp),{start:n,tokens:Object.assign({groups:t},hI)}}function mI(e,t){let n=L8(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,o=[],a=0,i=0;for(;i=0&&(d+=n[i].length,f++),u+=n[i].length,a+=n[i].length,i++;a-=d,i-=f,u-=d,o.push({t:c.t,v:t.slice(a-u,a),s:a-u,e:a})}return o}function L8(e){let t=[],n=e.length,r=0;for(;r56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}function sa(e,t,n,r,o){let a,i=t.length;for(let s=0;s=0;)a++;if(a>0){t.push(n.join(""));for(let i=parseInt(e.substring(r,r+a),10);i>0;i--)n.pop();r+=a}else n.push(e[r]),r++}return t}var zu={defaultProtocol:"http",events:null,format:iI,formatHref:iI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function I1(e,t=null){let n=Object.assign({},zu);e&&(n=Object.assign(n,e instanceof I1?e.o:e));let r=n.ignoreTags,o=[];for(let a=0;an?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=zu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),a=this.toFormattedString(e),i={},s=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return i.href=r,s&&(i.class=s),l&&(i.target=l),u&&(i.rel=u),c&&Object.assign(i,c),{tagName:o,attributes:i,content:a,eventListeners:d}}};function bp(e,t){class n extends gI{constructor(o,a){super(o,a),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var sI=bp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),lI=bp("text"),I8=bp("nl"),qf=bp("url",{isLink:!0,toHref(e=zu.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Fu&&e[1].t===ua}});var Pn=e=>new ln(e);function _8({groups:e}){let t=e.domain.concat([op,ip,la,sp,lp,up,cp,dp,Bn,v1,Ou,fp,pp,hp,kr,gp,Bu,mp]),n=[ap,ua,w1,yr,S1,Ou,Pu,E1,L1,jf,Xf,Ru,Du,Wf,Vf,Gf,Kf,Zf,Jf,Yf,Qf,ep,tp,np,rp],r=[op,ap,ip,sp,lp,up,cp,dp,Bn,Ru,Du,Ou,fp,pp,hp,Pu,kr,gp,Bu,mp],o=Pn(),a=O(o,Bu);se(a,r,a),se(a,e.domain,a);let i=Pn(),s=Pn(),l=Pn();se(o,e.domain,i),se(o,e.scheme,s),se(o,e.slashscheme,l),se(i,r,a),se(i,e.domain,i);let u=O(i,la);O(a,la,u),O(s,la,u),O(l,la,u);let c=O(a,yr);se(c,r,a),se(c,e.domain,a);let d=Pn();se(u,e.domain,d),se(d,e.domain,d);let f=O(d,yr);se(f,e.domain,d);let p=Pn(sI);se(f,e.tld,p),se(f,e.utld,p),O(u,Fu,p);let h=O(d,Bn);O(h,Bn,h),se(h,e.domain,d),se(p,e.domain,d),O(p,yr,f),O(p,Bn,h);let m=O(p,ua);se(m,e.numeric,sI);let b=O(i,Bn),g=O(i,yr);O(b,Bn,b),se(b,e.domain,i),se(g,r,a),se(g,e.domain,i);let x=Pn(qf);se(g,e.tld,x),se(g,e.utld,x),se(x,e.domain,i),se(x,r,a),O(x,yr,g),O(x,Bn,b),O(x,la,u);let y=O(x,ua),k=Pn(qf);se(y,e.numeric,k);let v=Pn(qf),C=Pn();se(v,t,v),se(v,n,C),se(C,t,v),se(C,n,C),O(x,kr,v),O(k,kr,v);let w=O(s,ua),S=O(l,ua),I=O(S,kr),L=O(I,kr);se(s,e.domain,i),O(s,yr,g),O(s,Bn,b),se(l,e.domain,i),O(l,yr,g),O(l,Bn,b),se(w,e.domain,v),O(w,kr,v),O(w,Pu,v),se(L,e.domain,v),se(L,t,v),O(L,kr,v);let H=[[Ru,Du],[Vf,Wf],[Gf,Kf],[jf,Xf],[Zf,Jf],[Yf,Qf],[ep,tp],[np,rp]];for(let K=0;K=0&&f++,o++,c++;if(f<0)o-=c,o0&&(a.push(f1(lI,t,i)),i=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);a.push(f1(p,t,h))}}return i.length>0&&a.push(f1(lI,t,i)),a}function f1(e,t,n){let r=n[0].s,o=n[n.length-1].e,a=t.slice(r,o);return new e(a,n)}var T8=typeof console<"u"&&console&&console.warn||(()=>{}),M8="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Oe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function bI(){return ln.groups={},Oe.scanner=null,Oe.parser=null,Oe.tokenQueue=[],Oe.pluginQueue=[],Oe.customSchemes=[],Oe.initialized=!1,Oe}function _1(e,t=!1){if(Oe.initialized&&T8(`linkifyjs: already initialized - will not register custom scheme "${e}" ${M8}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);Ie.customSchemes.push([e,t])}function V5(){Ie.scanner=B5(Ie.customSchemes);for(let e=0;e{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,a=wb(n.doc,[...t]);if(Nb(a).forEach(({newRange:u})=>{let c=dS(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!j5.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(W5).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=Xf(h).map(g=>g.toObject(e.defaultProtocol));if(!G5(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{df(g.from,g.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function J5(e){return new G({key:new Q("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;a=f.find(p=>p.nodeName==="A")}if(!a)return s;let l=Tb(t.state,e.type.name),u=(o=a?.href)!=null?o:l.href,c=(i=a?.target)!=null?i:l.target;a&&u&&(window.open(u,c),s=!0)}return s}}})}function Z5(e){return new G({key:new Q("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:i}=t,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let u=Qf(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function Zi(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(K5,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var l1=it.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){s1(e);return}s1(e.scheme,e.optionalSlashes)})},onDestroy(){GC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Zi(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Zi(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Zi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",re(this.options.HTMLAttributes,e),0]:["a",re(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Zi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Zi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[In({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=Qf(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Zi(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(Y5({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Zi(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(J5({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Z5({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),YC=l1;var X5=Object.defineProperty,Q5=(e,t)=>{for(var n in t)X5(e,n,{get:t[n],enumerable:!0})},eB="listItem",JC="textStyle",ZC=/^\s*([-+*])\s$/,d1=te.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eB,this.editor.getAttributes(JC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=br({find:ZC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=br({find:ZC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(JC),editor:this.editor})),[e]}}),f1=te.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=e.tokens.slice(1),a=t.parseChildren(s);n.push(...a)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>uu(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tB={};Q5(tB,{findListItemPos:()=>Eu,getNextListDepth:()=>p1,handleBackspace:()=>u1,handleDelete:()=>c1,hasListBefore:()=>tT,hasListItemAfter:()=>nB,hasListItemBefore:()=>nT,listItemHasSubList:()=>rT,nextListIsDeeper:()=>oT,nextListIsHigher:()=>iT});var Eu=(e,t)=>{let{$from:n}=t.selection,r=Ye(e,t.schema),o=null,i=n.depth,s=n.pos,a=null;for(;i>0&&a===null;)o=n.node(i),o.type===r?a=i:(i-=1,s-=1);return a===null?null:{$pos:t.doc.resolve(s),depth:a}},p1=(e,t)=>{let n=Eu(e,t);if(!n)return!1;let[,r]=gS(t,e,n.$pos.pos+4);return r},tT=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},nT=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},rT=(e,t,n)=>{if(!n)return!1;let r=Ye(e,t.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},u1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!mr(e.state,t)&&tT(e.state,t,n)){let{$anchor:a}=e.state.selection,l=e.state.doc.resolve(a.before()-1),u=[];l.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(l.start()+c.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!mr(e.state,t)||!yS(e.state))return!1;let r=Eu(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=rT(t,e.state,i);return nT(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},oT=(e,t)=>{let n=p1(e,t),r=Eu(e,t);return!r||!n?!1:n>r.depth},iT=(e,t)=>{let n=p1(e,t),r=Eu(e,t);return!r||!n?!1:n{if(!mr(e.state,t)||!bS(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:oT(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():iT(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},nB=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},h1=oe.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&c1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&c1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&u1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&u1(e,n,r)&&(t=!0)}),t}}}}),XC=/^(\s*)(\d+)\.\s+(.*)$/,rB=/^\s/;function oB(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=sT(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` -`)})}o.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return o}function iB(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=t.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=t.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var sB="listItem",QC="textStyle",eT=/^(\d+)\.\s$/,m1=te.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",re(this.options.HTMLAttributes,n),0]:["ol",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?iB(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +3. "-" cannot repeat`);Oe.customSchemes.push([e,t])}function N8(){Oe.scanner=E8(Oe.customSchemes);for(let e=0;e{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),a=t.some(u=>u.getMeta("preventAutolink"));if(!o||a)return;let{tr:i}=r,s=$b(n.doc,[...t]);if(Xb(s).forEach(({newRange:u})=>{let c=BE(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!D8.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(R8).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=xp(h).map(g=>g.toObject(e.defaultProtocol));if(!P8(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{Tf(g.from,g.to,r.doc).some(x=>x.mark.type===e.type)||i.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!i.steps.length)return i}})}function F8(e){return new j({key:new Q("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,a;if(r.button!==0||!t.editable)return!1;let i=!1;if(e.enableClickSelection&&(i=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let d=r.target,f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;s=f.find(p=>p.nodeName==="A")}if(!s)return i;let l=jb(t.state,e.type.name),u=(o=s?.href)!=null?o:l.href,c=(a=s?.target)!=null?a:l.target;s&&u&&(window.open(u,c),i=!0)}return i}}})}function z8(e){return new j({key:new Q("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:o}=e,{state:a}=t,{selection:i}=a,{empty:s}=i;if(s)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let u=yp(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||o!==void 0&&!o(u.href)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function ti(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(O8,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var T1=it.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate),this.options.protocols.forEach(e=>{if(typeof e=="string"){_1(e);return}_1(e.scheme,e.optionalSlashes)})},onDestroy(){bI()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!ti(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!ti(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!ti(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",oe(this.options.HTMLAttributes,e),0]:["a",oe(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;let r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ti(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!ti(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[On({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=yp(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:i=>!!ti(i,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(a=>{this.options.shouldAutoLink(a.value)&&t.push({text:a.value,data:{href:a.href},index:a.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(B8({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ti(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(F8({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(z8({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),xI=T1;var U8=Object.defineProperty,H8=(e,t)=>{for(var n in t)U8(e,n,{get:t[n],enumerable:!0})},q8="listItem",yI="textStyle",kI=/^\s*([-+*])\s$/,R1=te.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",oe(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(q8,this.editor.getAttributes(yI)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=xr({find:kI,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xr({find:kI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(yI),editor:this.editor})),[e]}}),D1=te.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",oe(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(o=>o.type==="paragraph"))n=t.parseChildren(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let i=e.tokens.slice(1),s=t.parseChildren(i);n.push(...s)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>Lu(e,t,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$8={};H8($8,{findListItemPos:()=>Uu,getNextListDepth:()=>O1,handleBackspace:()=>M1,handleDelete:()=>N1,hasListBefore:()=>SI,hasListItemAfter:()=>V8,hasListItemBefore:()=>EI,listItemHasSubList:()=>LI,nextListIsDeeper:()=>II,nextListIsHigher:()=>_I});var Uu=(e,t)=>{let{$from:n}=t.selection,r=Ze(e,t.schema),o=null,a=n.depth,i=n.pos,s=null;for(;a>0&&s===null;)o=n.node(a),o.type===r?s=a:(a-=1,i-=1);return s===null?null:{$pos:t.doc.resolve(i),depth:s}},O1=(e,t)=>{let n=Uu(e,t);if(!n)return!1;let[,r]=qE(t,e,n.$pos.pos+4);return r},SI=(e,t,n)=>{let{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),a=e.doc.resolve(o).node();return!(!a||!n.includes(a.type.name))},EI=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},LI=(e,t,n)=>{if(!n)return!1;let r=Ze(e,t.schema),o=!1;return n.descendants(a=>{a.type===r&&(o=!0)}),o},M1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!gr(e.state,t)&&SI(e.state,t,n)){let{$anchor:s}=e.state.selection,l=e.state.doc.resolve(s.before()-1),u=[];l.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(l.start()+c.pos+1);return e.chain().cut({from:s.start()-1,to:s.end()+1},d.end()).joinForward().run()}if(!gr(e.state,t)||!VE(e.state))return!1;let r=Uu(t,e.state);if(!r)return!1;let a=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),i=LI(t,e.state,a);return EI(t,e.state)&&!i?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},II=(e,t)=>{let n=O1(e,t),r=Uu(e,t);return!r||!n?!1:n>r.depth},_I=(e,t)=>{let n=O1(e,t),r=Uu(e,t);return!r||!n?!1:n{if(!gr(e.state,t)||!$E(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:II(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():_I(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},V8=(e,t)=>{var n;let{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},P1=ae.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&N1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&N1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&M1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&M1(e,n,r)&&(t=!0)}),t}}}}),vI=/^(\s*)(\d+)\.\s+(.*)$/,W8=/^\s/;function G8(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=AI(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` +`)})}o.push({type:"list_item",raw:i.raw,tokens:u}),a=d}else a+=1}return o}function K8(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...t.parseChildren([o]));else if(o.type==="text"&&o.tokens){let a=t.parseChildren([o]);r.push({type:"paragraph",content:a})}else{let a=t.parseChildren([o]);a.length>0&&r.push(...a)}}),{type:"listItem",content:r}})}var j8="listItem",CI="textStyle",wI=/^(\d+)\.\s$/,B1=te.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",oe(this.options.HTMLAttributes,n),0]:["ol",oe(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,r=e.items?K8(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` `):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=t?.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;let o=e.split(` -`),[i,s]=oB(o);if(i.length===0)return;let a=sT(i,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:a,raw:o.slice(0,s).join(` -`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(sB,this.editor.getAttributes(QC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=br({find:eT,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=br({find:eT,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(QC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),aB=/^\s*(\[([( |x])?\])\s$/,ep=te.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",re(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return uu(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),u=c=>{var d,f;a.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,a.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,i.append(a,s),o.append(i,l),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,a.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[br({find:aB,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),tp=te.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",re(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` -`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=i=>{let s=gf(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=gf(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Gj=oe.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(d1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(f1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(h1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(m1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(ep.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(tp.configure(this.options.taskList)),e}});var aT=te.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",re(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var lB=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,uB=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,lT=it.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",re(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[gr({find:lB,type:this.type})]},addPasteRules(){return[In({find:uB,type:this.type})]}});var uT=te.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var cT=it.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",re(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function dT(e={}){return new G({view(t){return new g1(t,e)}})}var g1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,a=i.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*a;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(r.left-u)/s+"px",this.element.style.top=(r.top-c)/a+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Rd(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var Ft=class e extends J{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):J.near(r)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new b1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!cB(t)||!dB(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)0){i=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!q.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=t.doc.resolve(o);if(e.valid(a))return a}return null}}};Ft.prototype.visible=!1;Ft.findFrom=Ft.findGapCursorFrom;J.jsonID("gapcursor",Ft);var b1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Ft.valid(n)?new Ft(n):J.near(n)}};function fT(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function cB(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||fT(o.type))return!0;if(o.inlineContent)return!1}}return!0}function dB(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||fT(o.type))return!0;if(o.inlineContent)return!1}}return!0}function pT(){return new G({props:{decorations:mB,createSelectionBetween(e,t,n){return t.pos==n.pos&&Ft.valid(n)?new Ft(n):null},handleClick:pB,handleKeyDown:fB,handleDOMEvents:{beforeinput:hB}}})}var fB=iu({ArrowLeft:np("horiz",-1),ArrowRight:np("horiz",1),ArrowUp:np("vert",-1),ArrowDown:np("vert",1)});function np(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof V){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Ft.findGapCursorFrom(a,t,l);return u?(o&&o(r.tr.setSelection(new Ft(u))),!0):!1}}function pB(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Ft.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&q.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Ft(r))),!0)}function hB(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Ft))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=N.empty;for(let s=r.length-1;s>=0;s--)o=N.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new B(o,0,0));return i.setSelection(V.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function mB(e){if(!(e.selection instanceof Ft))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",_e.create(e.doc,[ze.widget(e.selection.head,t,{key:"gapcursor"})])}var rp=200,Et=function(){};Et.prototype.append=function(t){return t.length?(t=Et.from(t),!this.length&&t||t.length=n?Et.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Et.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Et.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Et.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};Et.from=function(t){return t instanceof Et?t:t&&t.length?new hT(t):Et.empty};var hT=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var l=i;l=s;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=rp)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=rp)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(Et);Et.empty=new hT([]);var gB=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(Et),y1=Et;var bB=500,Qi=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new xr(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new xr(h,void 0,void 0,u.length+c.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let c=0;cvB&&(a=yB(a,u),s-=u),new e(a.append(i),s)}remapping(t,n){let r=new Wl;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new xr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(l+1,p));b&&a++,r.push(new xr(h,m,b))}else r.push(new xr(h))},o);let u=[];for(let f=n;fbB&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new xr(u.invert(),l,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new e(y1.from(o.reverse()),i)}};Qi.empty=new Qi(y1.empty,0);function yB(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var xr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},kr=class{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},vB=20;function xB(e,t,n,r){let o=n.getMeta(Xi),i;if(o)return o.historyState;n.getMeta(EB)&&(e=new kr(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Xi))return s.getMeta(Xi).redo?new kr(e.done.addTransform(n,void 0,r,op(t)),e.undone,mT(n.mapping.maps),e.prevTime,e.prevComposition):new kr(e.done,e.undone.addTransform(n,void 0,r,op(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!kB(n,e.prevRanges)),u=s?v1(e.prevRanges,n.mapping):mT(n.mapping.maps);return new kr(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,op(t)),Qi.empty,u,n.time,a??e.prevComposition)}else return(i=n.getMeta("rebased"))?new kr(e.done.rebased(n,i),e.undone.rebased(n,i),v1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new kr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),v1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function kB(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function mT(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,s)=>t.push(i,s));return t}function v1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=Xi.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=wB(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}var k1=ip(!1,!0),w1=ip(!0,!0),xK=ip(!1,!1),kK=ip(!0,!1);var TK=oe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new G({key:new Q("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let i=this.storage.characters({node:r.doc});if(i>o){let s=i-o,a=0,l=s,u=r.tr.deleteRange(a,l);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;let a=t.selection.$head.pos,l=i-r,u=a-l,c=a;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),vT=oe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[dT(this.options)]}}),DK=oe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new G({key:new Q("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return _e.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(o>=u&&o<=u+l.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((l,u)=>{if(l.isText||!(o>=u&&o<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(ze.node(u,u+l.nodeSize,{class:this.options.className}))}),_e.create(e,i)}}})]}}),xT=oe.create({name:"gapCursor",addProseMirrorPlugins(){return[pT()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=be(Z(e,"allowGapCursor",n)))!=null?t:null}}}),E1=oe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new G({key:new Q("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let i=this.editor.isEmpty;return e.descendants((s,a)=>{let l=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&au(s);if((l||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];i&&c.push(this.options.emptyEditorClass);let d=ze.node(a,a+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),_e.create(e,o)}}})]}}),$K=oe.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new G({key:new Q("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||ff(n.selection)||e.view.dragging?null:_e.create(n.doc,[ze.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function yT({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var kT=oe.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Q(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new G({key:t,appendTransaction:(o,i,s)=>{let{doc:a,tr:l,schema:u}=s,c=t.getState(s),d=a.content.size,f=u.nodes[n];if(c)return l.insert(d,f.create())},state:{init:(o,i)=>{let s=i.tr.doc.lastChild;return!yT({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;let s=o.doc.lastChild;return!yT({node:s,types:r})}}})]}}),wT=oe.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>k1(e,t),redo:()=>({state:e,dispatch:t})=>w1(e,t)}},addProseMirrorPlugins(){return[bT(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var _B=oe.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(CC.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(SC.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(d1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(TC.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(Fb.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(AC.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(vT.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(xT.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(MC.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(RC.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(wT.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(OC.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(DC.configure(this.options.italic)),this.options.listItem!==!1&&o.push(f1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(h1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(l1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(m1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(aT.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(lT.configure(this.options.strike)),this.options.text!==!1&&o.push(uT.configure(this.options.text)),this.options.underline!==!1&&o.push(cT.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(kT.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),ET=_B;var _T=E1;var ST=tp;var CT=ep;var S1,C1;if(typeof WeakMap<"u"){let e=new WeakMap;S1=t=>e.get(t),C1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;S1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var Ze=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:g-v});break}let x=o+v*t;for(let k=0;kr&&(i+=u.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function TB(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function AB(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function er(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function dp(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=_a(t.$head)||MB(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function MB(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function T1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function RB(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function M1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function PT(e,t,n){let r=e.node(-1),o=Ze.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return s==null?null:e.node(0).resolve(i+s)}function es(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function BT(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-i);l.unshift(n.pos-i);let u=l.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=i+c+1;return new la(a.resolve(f),a.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(T1(r)&&T1(o)&&M1(r,o)){let i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?lo.rowSelection(r,o):i&&this.isColSelection()?lo.colSelection(r,o):new lo(r,o)}return V.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=Ze.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let l=o.top;l0||b>0){let g=h.attrs;if(m>0&&(g=es(g,0,m)),b>0&&(g=es(g,g.colspan-b,b)),p.lefto.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=Ze.get(r),i=t.start(-1),s=o.findCell(t.pos-i),a=o.findCell(n.pos-i),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(i+o.map[s.left])),a.bottom0&&(n=l.resolve(i+o.map[a.left])),s.bottom0)return!1;let s=o+this.$anchorCell.nodeAfter.attrs.colspan,a=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof lo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=Ze.get(r),i=t.start(-1),s=o.findCell(t.pos-i),a=o.findCell(n.pos-i),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(i+o.map[s.top*o.width])),a.right0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right{t.push(ze.node(r,r+n.nodeSize,{class:"selectedCell"}))}),_e.create(e.doc,t)}function LB({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function PB({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){let i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function BB(e,t,n){let r=(t||e).selection,o=(t||e).doc,i,s;if(r instanceof q&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=ve.create(o,r.from);else if(s=="row"){let a=o.resolve(r.from+1);i=ve.rowSelection(a,a)}else if(!n){let a=Ze.get(r.node),l=r.from+1,u=l+a.map[a.width*a.height-1];i=ve.create(o,l+1,u)}}else r instanceof V&&LB(r)?i=V.create(o,r.from):r instanceof V&&PB(r)&&(i=V.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var FB=new Q("fix-tables");function zT(e,t,n,r){let o=e.childCount,i=t.childCount;e:for(let s=0,a=0;s{o.type.spec.tableRole=="table"&&(n=zB(e,o,i,n))};return t?t.doc!=e.doc&&zT(t.doc,e.doc,0,r):e.doc.descendants(r),n}function zB(e,t,n,r){let o=Ze.get(t);if(!o.problems)return r;r||(r=e.tr);let i=[];for(let l=0;l0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;OB(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let s=0;s0&&o0&&t.map[a-1]==l||o0?-1:0;HB(t,r,o+a)&&(a=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=l+1+u.content.size,d=TT(u)?l+1:c;i.replaceWith(d+r.tableStart,c+r.tableStart,a)}i.setSelection(new ve(i.doc.resolve(l+r.tableStart))),t(i)}return!0}function D1(e,t){let n=zt(e.schema);return VB(({node:r})=>n[r.type.spec.tableRole])(e,t)}function VB(e){return(t,n)=>{let r=t.selection,o,i;if(r instanceof ve){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=AB(r.$from),!o)return!1;i=(s=_a(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let a=o.attrs,l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=wr(t),d=t.tr;for(let p=0;p{s.attrs[e]!==t&&i.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function WB(e){return function(t,n){if(!er(t))return!1;if(n){let r=zt(t.schema),o=wr(t),i=t.tr,s=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map(l=>o.table.nodeAt(l));for(let l=0;l{let p=f+i.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),r(s)}return!0}}var CG=Sa("row",{useDeprecatedLogic:!0}),TG=Sa("column",{useDeprecatedLogic:!0}),YT=Sa("cell",{useDeprecatedLogic:!0});function jB(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let i=e.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function sp(e,t){let n=e.selection;if(!(n instanceof ve))return!1;if(t){let r=e.tr,o=zt(e.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new B(o,0,0))}),r.docChanged&&t(r)}return!0}function KB(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if(i=="row")for(let l=0;l=0;s--){let{rowspan:a,colspan:l}=i.child(s).attrs;for(let u=o;u=t.length&&t.push(N.empty),n[o]r&&(f=f.type.createChecked(es(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}i.push(N.from(l))}n=i,t=o}return{width:e,height:t,rows:n}}function JB(e,t,n,r,o,i,s){let a=e.doc.type.schema,l=zt(a),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(b?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,N.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let i=n.selection;if(i instanceof ve)return up(n,r,J.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;let s=ZT(o,e,t);if(s==null)return!1;if(e=="horiz")return up(n,r,J.near(n.doc.resolve(i.head+t),t));{let a=n.doc.resolve(s),l=PT(a,e,t),u;return l?u=J.near(l,1):t<0?u=J.near(n.doc.resolve(a.before(-1)),-1):u=J.near(n.doc.resolve(a.after(-1)),1),up(n,r,u)}}}function lp(e,t){return(n,r,o)=>{if(!o)return!1;let i=n.selection,s;if(i instanceof ve)s=i;else{let l=ZT(o,e,t);if(l==null)return!1;s=new ve(n.doc.resolve(l))}let a=PT(s.$headCell,e,t);return a?up(n,r,new ve(s.$anchorCell,a)):!1}}function XB(e,t){let n=e.state.doc,r=_a(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new ve(r))),!0):!1}function QB(e,t,n){if(!er(e.state))return!1;let r=KB(n),o=e.state.selection;if(o instanceof ve){r||(r={width:1,height:1,rows:[N.from(N1(zt(e.state.schema).cell,n))]});let i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=Ze.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=YB(r,a.right-a.left,a.bottom-a.top),RT(e.state,e.dispatch,s,a,r),!0}else if(r){let i=dp(e.state),s=i.start(-1);return RT(e.state,e.dispatch,s,Ze.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function e9(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=OT(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof ve)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=_a(e.state.selection.$anchor))!=null&&((n=_1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(l,u){let c=_1(e,u),d=si.getState(e.state)==null;if(!c||!M1(l,c))if(d)c=l;else return;let f=new ve(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(si,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),si.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(si,-1))}function a(l){let u=l,c=si.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(OT(e,u.target)!=r&&(d=_1(e,t),!d))return s();d&&i(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function ZT(e,t,n){if(!(e.state.selection instanceof V))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){let s=r.before(o),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function OT(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function _1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return _a(e.state.doc.resolve(r))}var t9=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),A1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,A1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function A1(e,t,n,r,o,i){let s=0,a=!0,l=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new n9(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{let a=bn.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{r9(s,a,e,o)},mouseleave:s=>{o9(s)},mousedown:(s,a)=>{i9(s,a,t,n)}},decorations:s=>{let a=bn.getState(s);if(a&&a.activeHandle>-1)return c9(s,a.activeHandle)},nodeViews:{}}});return i}var n9=class cp{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(bn);if(r&&r.setHandle!=null)return new cp(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new cp(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return T1(t.doc.resolve(o))||(o=-1),new cp(o,n.dragging)}return n}};function r9(e,t,n,r){if(!e.editable)return;let o=bn.getState(e.state);if(o&&!o.dragging){let i=a9(t.target),s=-1;if(i){let{left:a,right:l}=i.getBoundingClientRect();t.clientX-a<=n?s=DT(e,t,"left",n):l-t.clientX<=n&&(s=DT(e,t,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){let a=e.state.doc.resolve(s),l=a.node(-1),u=Ze.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}QT(e,s)}}}function o9(e){if(!e.editable)return;let t=bn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&QT(e,-1)}function i9(e,t,n,r){var o;if(!e.editable)return!1;let i=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=bn.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let a=e.state.doc.nodeAt(s.activeHandle),l=s9(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(bn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",c);let f=bn.getState(e.state);f?.dragging&&(l9(e,f.activeHandle,IT(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(bn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=bn.getState(e.state);if(f&&f.dragging){let p=IT(f.dragging,d,n);LT(e,f.activeHandle,p,r)}}return LT(e,s.activeHandle,l,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",c),t.preventDefault(),!0}function s9(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let l=0;l{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){let i=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&i&&i[s]){let a=i[s].getAttribute("width");return a?[parseInt(a,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",re(this.options.HTMLAttributes,e),0]}}),B1=te.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",re(this.options.HTMLAttributes,e),0]}}),F1=te.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",re(this.options.HTMLAttributes,e),0]}});function L1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function tN(e,t,n,r,o,i){var s;let a=0,l=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function h9(e,t,n,r,o){let i=p9(e),s=[],a=[];for(let u=0;u{let{selection:t}=e.state;if(!m9(t))return!1;let n=0,r=Eb(t.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},g9="";function b9(e){return(e||"").replace(/\s+/g," ").trim()}function y9(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:g9;if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(b=>{let g="";b.content&&Array.isArray(b.content)&&b.content.length>1?g=b.content.map(k=>t.renderChildren(k)).join(o):g=b.content?t.renderChildren(b.content):"";let y=b9(g),v=b.type==="tableHeader";m.push({text:y,isHeader:v})}),i.push(m)});let s=i.reduce((h,m)=>Math.max(h,m.length),0);if(s===0)return"";let a=new Array(s).fill(0);i.forEach(h=>{var m;for(let b=0;ba[b]&&(a[b]=y),a[b]<3&&(a[b]=3)}});let l=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=i[0],c=u.some(h=>h.isHeader),d=` -`,f=new Array(s).fill(0).map((h,m)=>c&&u[m]&&u[m].text||"");return d+=`| ${f.map((h,m)=>l(h,a[m])).join(" | ")} | -`,d+=`| ${a.map(h=>"-".repeat(Math.max(3,h))).join(" | ")} | -`,(c?i.slice(1):i).forEach(h=>{d+=`| ${new Array(s).fill(0).map((m,b)=>l(h[b]&&h[b].text||"",a[b])).join(" | ")} | -`}),d}var v9=y9,z1=te.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:d9,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=f9(e,this.options.cellMinWidth),i=t.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let a=["table",re(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(i.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>v9(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=h9(i.schema,e,t,n);if(o){let a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(V.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>HT(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>$T(e,t),deleteColumn:()=>({state:e,dispatch:t})=>qT(e,t),addRowBefore:()=>({state:e,dispatch:t})=>WT(e,t),addRowAfter:()=>({state:e,dispatch:t})=>jT(e,t),deleteRow:()=>({state:e,dispatch:t})=>KT(e,t),deleteTable:()=>({state:e,dispatch:t})=>JT(e,t),mergeCells:()=>({state:e,dispatch:t})=>O1(e,t),splitCell:()=>({state:e,dispatch:t})=>D1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Sa("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Sa("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>YT(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>O1(e,t)?!0:D1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>GT(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>I1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>I1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&R1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=ve.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:fp,"Mod-Backspace":fp,Delete:fp,"Mod-Delete":fp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[XT({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],eN({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:be(Z(e,"tableRole",t))}}}),$G=oe.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(z1.configure(this.options.table)),this.options.tableCell!==!1&&e.push(P1.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(B1.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(F1.configure(this.options.tableRow)),e}});var EN=R(wN(),1);var bp=EN.default;function CN(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?CN(n.children,r):{text:n.value,classes:r}})}function _N(e){return e.value||e.children||[]}function uF(e){return!!bp.getLanguage(e)}function SN({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return lf(e,i=>i.type.name===t).forEach(i=>{var s;let a=i.pos+1,l=i.node.attrs.language||r,u=n.listLanguages(),c=l&&(u.includes(l)||uF(l)||(s=n.registered)!=null&&s.call(n,l))?_N(n.highlight(l,i.node.textContent)):_N(n.highlightAuto(i.node.textContent));CN(c).forEach(d=>{let f=a+d.text.length;if(d.classes.length){let p=ze.inline(a,f,{class:d.classes.join(" ")});o.push(p)}a=f})}),_e.create(e,o)}function cF(e){return typeof e=="function"}function dF({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>cF(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new G({key:new Q("lowlight"),state:{init:(o,{doc:i})=>SN({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(o,i,s,a)=>{let l=s.selection.$head.parent.type.name,u=a.selection.$head.parent.type.name,c=lf(s.doc,f=>f.type.name===e),d=lf(a.doc,f=>f.type.name===e);return o.docChanged&&([l,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?SN({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var fF=NC.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],dF({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),TN=fF;function pF(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],x={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[k,d,a,n,e.C_BLOCK_COMMENT_MODE,c,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:w.concat([{begin:/\(/,end:/\)/,keywords:x,contains:w.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"",keywords:x,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function NN(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=pF(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function AN(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],x=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...y,...v,"set","shopt",...x,...k]},contains:[p,e.SHEBANG(),h,d,i,s,g,a,l,u,c,n]}}function MN(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,a,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function RN(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],x={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},k={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[k,d,a,n,e.C_BLOCK_COMMENT_MODE,c,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:w.concat([{begin:/\(/,end:/\)/,keywords:x,contains:w.concat(["self"]),relevance:0}]),relevance:0},_={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"",keywords:x,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function ON(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],i=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:o.concat(i),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",x={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[g,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},x]}}var hF=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),mF=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],gF=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],bF=[...mF,...gF],yF=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),vF=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xF=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),kF=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function DN(e){let t=e.regex,n=hF(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+vF.join("|")+")"},{begin:":(:)?("+xF.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+kF.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:yF.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+bF.join("|")+")\\b"}]}}function IN(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function LN(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"zN(e,t,n-1))}function UN(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+zN("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,FN,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},FN,u]}}var HN="[A-Za-z$_][0-9A-Za-z$_]*",wF=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],EF=["true","false","null","undefined","NaN","Infinity"],$N=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],qN=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],VN=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_F=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],SF=[].concat(VN,$N,qN);function WN(e){let t=e.regex,n=(P,{after:W})=>{let O="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{let O=P[0].length+P.index,le=P.input[O];if(le==="<"||le===","){W.ignoreMatch();return}le===">"&&(n(P,{after:O})||W.ignoreMatch());let ke,Ct=P.input.substring(O);if(ke=Ct.match(/^\s*=/)){W.ignoreMatch();return}if((ke=Ct.match(/^\s+extends\s+/))&&ke.index===0){W.ignoreMatch();return}}},a={$pattern:HN,keyword:wF,literal:EF,built_in:SF,"variable.language":_F},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});let x=[].concat(y,f.contains),k=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...$N,...qN]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(P){return t.concat("(?!",P.join("|"),")")}let F={match:t.concat(/\b/,K([...VN,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},U={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},U,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},F,H,E,M,{match:/\$[(.]/}]}}function jN(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Aa="[0-9](_*[0-9])*",xp=`\\.(${Aa})`,kp="[0-9a-fA-F](_*[0-9a-fA-F])*",CF={className:"number",variants:[{begin:`(\\b(${Aa})((${xp})|\\.)?|(${xp}))[eE][+-]?(${Aa})[fFdD]?\\b`},{begin:`\\b(${Aa})((${xp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${xp})[fFdD]?\\b`},{begin:`\\b(${Aa})[fFdD]\\b`},{begin:`\\b0[xX]((${kp})\\.?|(${kp})?\\.(${kp}))[pP][+-]?(${Aa})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${kp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function KN(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,o]}]};o.contains.push(s);let a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},u=CF,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,a,l,s,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},u]}}var TF=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),NF=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],AF=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],MF=[...NF,...AF],RF=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),GN=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),YN=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),OF=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),DF=GN.concat(YN).sort().reverse();function JN(e){let t=TF(e),n=DF,r="and or not only",o="[\\w-]+",i="("+o+"|@\\{"+o+"\\})",s=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},u=function(v,x,k){return{className:v,begin:x,relevance:k}},c={$pattern:/[a-z-]+/,keyword:r,attribute:RF.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:c,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=a.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+OF.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:a,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+MF.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",i,0),u("selector-id","#"+i),u("selector-class","\\."+i,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+GN.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+YN.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,y,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function ZN(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function XN(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,i,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function eA(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function tA(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},s={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,i,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let y=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,s.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function nA(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),i=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(U,M)=>{M.data._beginMatch=U[1]||U[2]},"on:end":(U,M)=>{M.data._beginMatch!==U[1]&&M.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ -]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],x={keyword:g,literal:(U=>{let M=[];return U.forEach(S=>{M.push(S),S.toLowerCase()===S?M.push(S.toUpperCase()):M.push(S.toLowerCase())}),M})(b),built_in:y},k=U=>U.map(M=>M.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},E=t.concat(r,"\\b(?!\\()"),_={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},T={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:x,contains:[T,s,_,e.C_BLOCK_COMMENT_MODE,h,m,w]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(g).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(H);let K=[T,_,e.C_BLOCK_COMMENT_MODE,h,m,w],F={begin:t.concat(/#\[\s*\\?/,t.either(o,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:o},{match:i}]}]};return{case_insensitive:!1,keywords:x,contains:[F,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},s,H,_,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},w,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:x,contains:["self",F,s,_,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function rA(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function oA(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function iA(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function sA(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function aA(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,i=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[i,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:i},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function lA(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},w=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=w,m.contains=w;let C=[{begin:/^\s*=>/,starts:{end:"$",contains:w}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:w}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(u).concat(w)}}function uA(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:a,literal:l,built_in:u},illegal:""},i]}}var IF=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),LF=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],PF=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],BF=[...LF,...PF],FF=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),zF=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),UF=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),HF=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function cA(e){let t=IF(e),n=UF,r=zF,o="@[a-z-]+",i="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+BF.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+HF.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:FF.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function dA(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function fA(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(k=>!c.includes(k)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k){return t.concat(/\b/,t.either(...k.map(w=>w.replace(/\s+/,"\\s+"))),/\b/)}let v={scope:"keyword",match:y(f),relevance:0};function x(k,{exceptions:w,when:E}={}){let _=E;return w=w||[],k.map(T=>T.match(/\|\d+$/)||w.includes(T)?T:_(T)?`${T}|0`:T)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(h,{when:k=>k.length<3}),literal:i,type:a,built_in:d},contains:[{scope:"type",match:y(s)},v,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function gA(e){return e?typeof e=="string"?e:e.source:null}function Cu(e){return Ne("(?=",e,")")}function Ne(...e){return e.map(n=>gA(n)).join("")}function $F(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Jt(...e){return"("+($F(e).capture?"":"?:")+e.map(r=>gA(r)).join("|")+")"}var J1=e=>Ne(/\b/,e,/\w$/.test(e)?/\b/:/\B/),qF=["Protocol","Type"].map(J1),pA=["init","self"].map(J1),VF=["Any","Self"],G1=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],hA=["false","nil","true"],WF=["assignment","associativity","higherThan","left","lowerThan","none","right"],jF=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],mA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],bA=Jt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),yA=Jt(bA,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Y1=Ne(bA,yA,"*"),vA=Jt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ep=Jt(vA,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Er=Ne(vA,Ep,"*"),wp=Ne(/[A-Z]/,Ep,"*"),KF=["attached","autoclosure",Ne(/convention\(/,Jt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ne(/objc\(/,Er,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],GF=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function xA(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,Jt(...qF,...pA)],className:{2:"keyword"}},i={match:Ne(/\./,Jt(...G1)),relevance:0},s=G1.filter(Te=>typeof Te=="string").concat(["_|0"]),a=G1.filter(Te=>typeof Te!="string").concat(VF).map(J1),l={variants:[{className:"keyword",match:Jt(...a,...pA)}]},u={$pattern:Jt(/\b\w+/,/#\w+/),keyword:s.concat(jF),literal:hA},c=[o,i,l],d={match:Ne(/\./,Jt(...mA)),relevance:0},f={className:"built_in",match:Ne(/\b/,Jt(...mA),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:Y1},{match:`\\.(\\.|${yA})+`}]},b=[h,m],g="([0-9]_*)+",y="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},x=(Te="")=>({className:"subst",variants:[{match:Ne(/\\/,Te,/[0\\tnr"']/)},{match:Ne(/\\/,Te,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Te="")=>({className:"subst",match:Ne(/\\/,Te,/[\t ]*(?:[\r\n]|\r\n)/)}),w=(Te="")=>({className:"subst",label:"interpol",begin:Ne(/\\/,Te,/\(/),end:/\)/}),E=(Te="")=>({begin:Ne(Te,/"""/),end:Ne(/"""/,Te),contains:[x(Te),k(Te),w(Te)]}),_=(Te="")=>({begin:Ne(Te,/"/),end:Ne(/"/,Te),contains:[x(Te),w(Te)]}),T={className:"string",variants:[E(),E("#"),E("##"),E("###"),_(),_("#"),_("##"),_("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],H={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},K=Te=>{let ko=Ne(Te,/\//),ne=Ne(/\//,Te);return{begin:ko,end:ne,contains:[...C,{scope:"comment",begin:`#(?!.*${ne})`,end:/$/}]}},F={scope:"regexp",variants:[K("###"),K("##"),K("#"),H]},U={match:Ne(/`/,Er,/`/)},M={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${Ep}+`},A=[U,M,S],P={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:GF,contains:[...b,v,T]}]}},W={scope:"keyword",match:Ne(/@/,Jt(...KF),Cu(Jt(/\(/,/\s+/)))},O={scope:"meta",match:Ne(/@/,Er)},le=[P,W,O],ke={match:Cu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ne(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ep,"+")},{className:"type",match:wp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ne(/\s+&\s+/,Cu(wp)),relevance:0}]},Ct={begin://,keywords:u,contains:[...r,...c,...le,h,ke]};ke.contains.push(Ct);let Ke={match:Ne(Er,/\s*:/),keywords:"_|0",relevance:0},Tt={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Ke,...r,F,...c,...p,...b,v,T,...A,...le,ke]},xo={begin://,keywords:"repeat each",contains:[...r,ke]},ju={begin:Jt(Cu(Ne(Er,/\s*:/)),Cu(Ne(Er,/\s+/,Er,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Er}]},$a={begin:/\(/,end:/\)/,keywords:u,contains:[ju,...r,...c,...b,v,T,...le,ke,Tt],endsParent:!0,illegal:/["']/},Sh={match:[/(func|macro)/,/\s+/,Jt(U.match,Er,Y1)],className:{1:"keyword",3:"title.function"},contains:[xo,$a,t],illegal:[/\[/,/%/]},Ch={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[xo,$a,t],illegal:/\[|%/},Th={match:[/operator/,/\s+/,Y1],className:{1:"keyword",3:"title"}},Nh={begin:[/precedencegroup/,/\s+/,wp],className:{1:"keyword",3:"title"},contains:[ke],keywords:[...WF,...hA],end:/}/},ks={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ku={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},xn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Er,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[xo,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:wp},...c],relevance:0}]};for(let Te of T.variants){let ko=Te.contains.find(Gu=>Gu.label==="interpol");ko.keywords=u;let ne=[...c,...p,...b,v,T,...A];ko.contains=[...ne,{begin:/\(/,end:/\)/,contains:["self",...ne]}]}return{name:"Swift",keywords:u,contains:[...r,Sh,Ch,ks,Ku,xn,Th,Nh,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},F,...c,...p,...b,v,T,...A,...le,ke,Tt]}}var _p="[A-Za-z$_][0-9A-Za-z$_]*",kA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],wA=["true","false","null","undefined","NaN","Infinity"],EA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],_A=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],SA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],CA=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],TA=[].concat(SA,EA,_A);function YF(e){let t=e.regex,n=(P,{after:W})=>{let O="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{let O=P[0].length+P.index,le=P.input[O];if(le==="<"||le===","){W.ignoreMatch();return}le===">"&&(n(P,{after:O})||W.ignoreMatch());let ke,Ct=P.input.substring(O);if(ke=Ct.match(/^\s*=/)){W.ignoreMatch();return}if((ke=Ct.match(/^\s+extends\s+/))&&ke.index===0){W.ignoreMatch();return}}},a={$pattern:_p,keyword:kA,literal:wA,built_in:TA,"variable.language":CA},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});let x=[].concat(y,f.contains),k=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...EA,..._A]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(P){return t.concat("(?!",P.join("|"),")")}let F={match:t.concat(/\b/,K([...SA,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},U={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,_,{scope:"attr",match:r+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},U,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},F,H,E,M,{match:/\$[(.]/}]}}function NA(e){let t=e.regex,n=YF(e),r=_p,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:_p,keyword:kA.concat(l),literal:wA,built_in:TA.concat(o),"variable.language":CA},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let y=m.contains.findIndex(v=>v.label===b);if(y===-1)throw new Error("can not find mode to replace");m.contains.splice(y,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,i,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function AA(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,o),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(i,o),/ +/,t.either(s,a),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function MA(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,s,o,e.QUOTE_STRING_MODE,l,u,a]}}function RA(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(i,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,l,a,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,l,a]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function OA(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,i,s],g=[...b];return g.pop(),g.push(a),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var rs={arduino:NN,bash:AN,c:MN,cpp:RN,csharp:ON,css:DN,diff:IN,go:LN,graphql:PN,ini:BN,java:UN,javascript:WN,json:jN,kotlin:KN,less:JN,lua:ZN,makefile:XN,markdown:QN,objectivec:eA,perl:tA,php:nA,"php-template":rA,plaintext:oA,python:iA,"python-repl":sA,r:aA,ruby:lA,rust:uA,scss:cA,shell:dA,sql:fA,swift:xA,typescript:NA,vbnet:AA,wasm:MA,xml:RA,yaml:OA};var DA={},JF="hljs-";function is(e){let t=bp.newInstance();return e&&i(e),{highlight:n,highlightAuto:r,listLanguages:o,register:i,registerAlias:s,registered:a};function n(l,u,c){let d=c||DA,f=typeof d.prefix=="string"?d.prefix:JF;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Z1,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(l,u){let d=(u||DA).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function i(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&t.registerLanguage(c,l[c])}}function s(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){let d=l[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function a(l){return!!t.getLanguage(l)}}var Z1=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(s,a){return a?s+"_".repeat(a):n.options.classPrefix+s}),o=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var sy={};qa(sy,{arrayReplaceAt:()=>iy,assign:()=>Oa,escapeHtml:()=>co,escapeRE:()=>Dz,fromCodePoint:()=>Au,has:()=>wz,isMdAsciiPunct:()=>ls,isPunctChar:()=>as,isSpace:()=>de,isString:()=>Pp,isValidEntityCode:()=>Bp,isWhiteSpace:()=>ss,lib:()=>Iz,normalizeReference:()=>us,unescapeAll:()=>uo,unescapeMd:()=>Tz});var Ap={};qa(Ap,{decode:()=>Tu,encode:()=>Tp,format:()=>Ma,parse:()=>Nu});var IA={};function ZF(e){let t=IA[e];if(t)return t;t=IA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),i+=6;continue}}if((a&248)===240&&i+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="\uFFFD"}return o})}Sp.defaultChars=";/?:@&=+$,#";Sp.componentChars="";var Tu=Sp;var LA={};function XF(e){let t=LA[e];if(t)return t;t=LA[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=XF(t),o="";for(let i=0,s=e.length;i=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&l<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}Cp.defaultChars=";/?:@&=+$,-_.!~*'()#";Cp.componentChars="-_.!~*'()";var Tp=Cp;function Ma(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Np(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var QF=/^([a-z0-9.+-]+:)/i,ez=/:[0-9]*$/,tz=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,nz=["<",">",'"',"`"," ","\r",` -`," "],rz=["{","}","|","\\","^","`"].concat(nz),oz=["'"].concat(rz),PA=["%","/","?",";","#"].concat(oz),BA=["/","?","#"],iz=255,FA=/^[+a-z0-9A-Z_-]{0,63}$/,sz=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,zA={javascript:!0,"javascript:":!0},UA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function az(e,t){if(e&&e instanceof Np)return e;let n=new Np;return n.parse(e,t),n}Np.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=tz.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=QF.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&zA[s])&&(i=i.substr(2),this.slashes=!0)),!zA[s]&&(o||s&&!UA[s])){let u=-1;for(let h=0;h127?y+="x":y+=g[v];if(!y.match(FA)){let v=h.slice(0,m),x=h.slice(m+1),k=g.match(sz);k&&(v.push(k[1]),x.unshift(k[2])),x.length&&(i=x.join(".")+i),this.hostname=v.join(".");break}}}}this.hostname.length>iz&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));let l=i.indexOf("?");return l!==-1&&(this.search=i.substr(l),i=i.slice(0,l)),i&&(this.pathname=i),UA[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Np.prototype.parseHost=function(e){let t=ez.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Nu=az;var X1={};qa(X1,{Any:()=>Mp,Cc:()=>Rp,Cf:()=>HA,P:()=>Ra,S:()=>Op,Z:()=>Dp});var Mp=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Rp=/[\0-\x1F\x7F-\x9F]/;var HA=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Ra=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Op=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Dp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var $A=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var qA=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Q1,lz=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]]),ey=(Q1=String.fromCodePoint)!==null&&Q1!==void 0?Q1:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function ty(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=lz.get(e))!==null&&t!==void 0?t:e}var mt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(mt||(mt={}));var uz=32,li;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(li||(li={}));function ny(e){return e>=mt.ZERO&&e<=mt.NINE}function cz(e){return e>=mt.UPPER_A&&e<=mt.UPPER_F||e>=mt.LOWER_A&&e<=mt.LOWER_F}function dz(e){return e>=mt.UPPER_A&&e<=mt.UPPER_Z||e>=mt.LOWER_A&&e<=mt.LOWER_Z||ny(e)}function fz(e){return e===mt.EQUALS||dz(e)}var ht;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ht||(ht={}));var _r;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(_r||(_r={}));var Ip=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ht.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_r.Strict}startEntity(t){this.decodeMode=t,this.state=ht.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ht.EntityStart:return t.charCodeAt(n)===mt.NUM?(this.state=ht.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ht.NamedEntity,this.stateNamedEntity(t,n));case ht.NumericStart:return this.stateNumericStart(t,n);case ht.NumericDecimal:return this.stateNumericDecimal(t,n);case ht.NumericHex:return this.stateNumericHex(t,n);case ht.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|uz)===mt.LOWER_X?(this.state=ht.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ht.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,i!==0){if(s===mt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_r.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&li.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~li.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case ht.NamedEntity:return this.result!==0&&(this.decodeMode!==_r.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ht.NumericDecimal:return this.emitNumericEntity(0,2);case ht.NumericHex:return this.emitNumericEntity(0,3);case ht.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ht.EntityStart:return 0}}};function VA(e){let t="",n=new Ip(e,r=>t+=ey(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);let u=n.write(o,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}let l=t+o.slice(s);return t="",l}}function pz(e,t,n,r){let o=(t&li.BRANCH_LENGTH)>>7,i=t&li.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){let l=r-i;return l<0||l>=o?-1:e[n+l]-1}let s=n,a=s+o-1;for(;s<=a;){let l=s+a>>>1,u=e[l];if(ur)a=l-1;else return e[l+o]}return-1}var hz=VA($A),XJ=VA(qA);function ui(e,t=_r.Legacy){return hz(e,t)}function Lp(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function ry(e,t){return function(r){let o,i=0,s="";for(;o=e.exec(r);)i!==o.index&&(s+=r.substring(i,o.index)),s+=t.get(o[0].charCodeAt(0)),i=o.index+1;return s+r.substring(i)}}var WA=ry(/[&<>'"]/g,gz),jA=ry(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),KA=ry(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var GA;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(GA||(GA={}));var YA;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(YA||(YA={}));function xz(e){return Object.prototype.toString.call(e)}function Pp(e){return xz(e)==="[object String]"}var kz=Object.prototype.hasOwnProperty;function wz(e,t){return kz.call(e,t)}function Oa(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function iy(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Bp(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Au(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var XA=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Ez=/&([a-z#][a-z0-9]{1,31});/gi,_z=new RegExp(XA.source+"|"+Ez.source,"gi"),Sz=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Cz(e,t){if(t.charCodeAt(0)===35&&Sz.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Bp(r)?Au(r):e}let n=ui(e);return n!==e?n:e}function Tz(e){return e.indexOf("\\")<0?e:e.replace(XA,"$1")}function uo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(_z,function(t,n,r){return n||Cz(t,r)})}var Nz=/[&<>"]/,Az=/[&<>"]/g,Mz={"&":"&","<":"<",">":">",'"':"""};function Rz(e){return Mz[e]}function co(e){return Nz.test(e)?e.replace(Az,Rz):e}var Oz=/[.?*+^$[\]\\(){}|-]/g;function Dz(e){return e.replace(Oz,"\\$&")}function de(e){switch(e){case 9:case 32:return!0}return!1}function ss(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function as(e){return Ra.test(e)||Op.test(e)}function ls(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function us(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var Iz={mdurl:Ap,ucmicro:X1};var cy={};qa(cy,{parseLinkDestination:()=>ly,parseLinkLabel:()=>ay,parseLinkTitle:()=>uy});function ay(e,t,n){let r,o,i,s,a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=uo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function uy(e,t,n,r){let o,i=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i"+co(i.content)+""};Sr.code_block=function(e,t,n,r,o){let i=e[t];return""+co(e[t].content)+` -`};Sr.fence=function(e,t,n,r,o){let i=e[t],s=i.info?uo(i.info).trim():"",a="",l="";if(s){let c=s.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(i.content,a,l)||co(i.content):u=co(i.content),u.indexOf("${u} -`}return`
${u}
-`};Sr.image=function(e,t,n,r,o){let i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};Sr.hardbreak=function(e,t,n){return n.xhtmlOut?`
+`),[a,i]=G8(o);if(a.length===0)return;let s=AI(a,0,n);return s.length===0?void 0:{type:"list",ordered:!0,start:((r=a[0])==null?void 0:r.number)||1,items:s,raw:o.slice(0,i).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(j8,this.editor.getAttributes(CI)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=xr({find:wI,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xr({find:wI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(CI)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),X8=/^\s*(\[([( |x])?\])\s$/,kp=te.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",oe(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let o=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return Lu(e,t,o)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),a=document.createElement("label"),i=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),u=c=>{var d,f;s.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,c,s.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};return u(e),a.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,i),o.append(a,l),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,u(c),!0)}}},addInputRules(){return[xr({find:X8,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),vp=te.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",oe(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let r=a=>{let i=Of(a,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,l)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:l}),customNestedParser:r},n);return i?[{type:"taskList",raw:i.raw,items:i.items}]:n.blockTokens(a)},o=Of(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,i)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:i}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Pj=ae.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(R1.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(D1.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(P1.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(B1.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(kp.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(vp.configure(this.options.taskList)),e}});var TI=te.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",oe(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Z8=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,J8=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,MI=it.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",oe(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[br({find:Z8,type:this.type})]},addPasteRules(){return[On({find:J8,type:this.type})]}});var NI=te.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var RI=it.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",oe(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!o)return;let a=o[2].trim();return{type:"underline",raw:o[0],text:a,tokens:n.inlineTokens(a)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function DI(e={}){return new j({view(t){return new F1(t,e)}})}var F1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let a=i=>{this[o](i)};return t.dom.addEventListener(o,a),{name:o,handler:a}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,a=o.getBoundingClientRect(),i=a.width/o.offsetWidth,s=a.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*s;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*i;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(r.left-u)/i+"px",this.element.style.top=(r.top-c)/s+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,a=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!a){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=Zd(this.editorView.state.doc,i,this.editorView.dragging.slice);s!=null&&(i=s)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var zt=class e extends Z{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):Z.near(r)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new z1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!Y8(t)||!Q8(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,a=null;for(let i=t.depth;;i--){let s=t.node(i);if(n>0?t.indexAfter(i)0){a=s.child(n>0?t.indexAfter(i):t.index(i)-1);break}else if(i==0)return null;o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}for(;;){let i=n>0?a.firstChild:a.lastChild;if(!i){if(a.isAtom&&!a.isText&&!$.isSelectable(a)){t=t.doc.resolve(o+a.nodeSize*n),r=!1;continue e}break}a=i,o+=n;let s=t.doc.resolve(o);if(e.valid(s))return s}return null}}};zt.prototype.visible=!1;zt.findFrom=zt.findGapCursorFrom;Z.jsonID("gapcursor",zt);var z1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return zt.valid(n)?new zt(n):Z.near(n)}};function OI(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Y8(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||OI(o.type))return!0;if(o.inlineContent)return!1}}return!0}function Q8(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||OI(o.type))return!0;if(o.inlineContent)return!1}}return!0}function PI(){return new j({props:{decorations:r5,createSelectionBetween(e,t,n){return t.pos==n.pos&&zt.valid(n)?new zt(n):null},handleClick:t5,handleKeyDown:e5,handleDOMEvents:{beforeinput:n5}}})}var e5=Cu({ArrowLeft:Cp("horiz",-1),ArrowRight:Cp("horiz",1),ArrowUp:Cp("vert",-1),ArrowDown:Cp("vert",1)});function Cp(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,a){let i=r.selection,s=t>0?i.$to:i.$from,l=i.empty;if(i instanceof V){if(!a.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(t>0?s.after():s.before())}let u=zt.findGapCursorFrom(s,t,l);return u?(o&&o(r.tr.setSelection(new zt(u))),!0):!1}}function t5(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!zt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&$.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new zt(r))),!0)}function n5(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof zt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=_.empty;for(let i=r.length-1;i>=0;i--)o=_.from(r[i].createAndFill(null,o));let a=e.state.tr.replace(n.pos,n.pos,new B(o,0,0));return a.setSelection(V.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function r5(e){if(!(e.selection instanceof zt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ee.create(e.doc,[Ue.widget(e.selection.head,t,{key:"gapcursor"})])}var wp=200,St=function(){};St.prototype.append=function(t){return t.length?(t=St.from(t),!this.length&&t||t.length=n?St.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};St.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};St.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};St.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(a,i){return o.push(t(a,i))},n,r),o};St.from=function(t){return t instanceof St?t:t&&t.length?new BI(t):St.empty};var BI=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,a){return o==0&&a==this.length?this:new t(this.values.slice(o,a))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,a,i,s){for(var l=a;l=i;l--)if(o(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=wp)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=wp)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(St);St.empty=new BI([]);var o5=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rs&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,a)-s,i+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,a,i){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(a,s)-s,i+s)===!1||a=a?this.right.slice(r-a,o-a):this.left.slice(r,a).append(this.right.slice(0,o-a))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(St),U1=St;var a5=500,ri=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,a;n&&(o=this.remapping(r,this.items.length),a=o.maps.length);let i=t.tr,s,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),a=o.maps.length),a--,c.push(d);return}if(o){c.push(new vr(d.map));let p=d.step.map(o.slice(a)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],u.push(new vr(h,void 0,void 0,u.length+c.length))),a--,h&&o.appendMap(h,a)}else i.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(a)):d.selection,l=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:s}}addTransform(t,n,r,o){let a=[],i=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let c=0;cs5&&(s=i5(s,u),i-=u),new e(s.append(a),i)}remapping(t,n){let r=new lu;return this.items.forEach((o,a)=>{let i=o.mirrorOffset!=null&&a-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,i)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new vr(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),a=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=a.getMirror(--l);if(p==null)return;i=Math.min(i,p);let h=a.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(a.slice(l+1,p));b&&s++,r.push(new vr(h,m,b))}else r.push(new vr(h))},o);let u=[];for(let f=n;fa5&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],a=0;return this.items.forEach((i,s)=>{if(s>=t)o.push(i),i.selection&&a++;else if(i.step){let l=i.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=i.selection&&i.selection.map(n.slice(r));c&&a++;let d=new vr(u.invert(),l,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else i.map&&r--},this.items.length,0),new e(U1.from(o.reverse()),a)}};ri.empty=new ri(U1.empty,0);function i5(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var vr=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Cr=class{constructor(t,n,r,o,a){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=a}},s5=20;function l5(e,t,n,r){let o=n.getMeta(ni),a;if(o)return o.historyState;n.getMeta(d5)&&(e=new Cr(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(ni))return i.getMeta(ni).redo?new Cr(e.done.addTransform(n,void 0,r,Sp(t)),e.undone,FI(n.mapping.maps),e.prevTime,e.prevComposition):new Cr(e.done,e.undone.addTransform(n,void 0,r,Sp(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!i&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!u5(n,e.prevRanges)),u=i?H1(e.prevRanges,n.mapping):FI(n.mapping.maps);return new Cr(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Sp(t)),ri.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new Cr(e.done.rebased(n,a),e.undone.rebased(n,a),H1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Cr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),H1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function u5(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let a=0;a=t[a]&&(n=!0)}),n}function FI(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,a,i)=>t.push(a,i));return t}function H1(e,t){if(!e)return null;let n=[];for(let r=0;r{let o=ni.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let a=c5(o,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var $1=Ep(!1,!0),V1=Ep(!0,!0),lX=Ep(!1,!1),uX=Ep(!0,!1);var mX=ae.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new j({key:new Q("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let o=this.options.limit;if(o==null||o===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>o){let i=a-o,s=0,l=i,u=r.tr.deleteRange(s,l);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;let o=this.storage.characters({node:n.doc}),a=this.storage.characters({node:t.doc});if(a<=r||o>r&&a>r&&a<=o)return!0;if(o>r&&a>r&&a>o||!t.getMeta("paste"))return!1;let s=t.selection.$head.pos,l=a-r,u=s-l,c=s;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>r)}})]}}),qI=ae.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[DI(this.options)]}}),vX=ae.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new j({key:new Q("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,a=[];if(!n||!r)return Ee.create(e,[]);let i=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(o>=u&&o<=u+l.nodeSize-1))return!1;i+=1});let s=0;return e.descendants((l,u)=>{if(l.isText||!(o>=u&&o<=u+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&i-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";a.push(Ue.node(u,u+l.nodeSize,{class:this.options.className}))}),Ee.create(e,a)}}})]}}),$I=ae.create({name:"gapCursor",addProseMirrorPlugins(){return[PI()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=ge(J(e,"allowGapCursor",n)))!=null?t:null}}}),W1=ae.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new j({key:new Q("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let a=this.editor.isEmpty;return e.descendants((i,s)=>{let l=r>=s&&r<=s+i.nodeSize,u=!i.isLeaf&&Su(i);if((l||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];a&&c.push(this.options.emptyEditorClass);let d=Ue.node(s,s+i.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:i,pos:s,hasAnchor:l}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),Ee.create(e,o)}}})]}}),TX=ae.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new j({key:new Q("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Mf(n.selection)||e.view.dragging?null:Ee.create(n.doc,[Ue.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function HI({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var VI=ae.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Q(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new j({key:t,appendTransaction:(o,a,i)=>{let{doc:s,tr:l,schema:u}=i,c=t.getState(i),d=s.content.size,f=u.nodes[n];if(c)return l.insert(d,f.create())},state:{init:(o,a)=>{let i=a.tr.doc.lastChild;return!HI({node:i,types:r})},apply:(o,a)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return a;let i=o.doc.lastChild;return!HI({node:i,types:r})}}})]}}),WI=ae.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>$1(e,t),redo:()=>({state:e,dispatch:t})=>V1(e,t)}},addProseMirrorPlugins(){return[UI(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var f5=ae.create({name:"starterKit",addExtensions(){var e,t,n,r;let o=[];return this.options.bold!==!1&&o.push(XL.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(jL.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(R1.configure(this.options.bulletList)),this.options.code!==!1&&o.push(ZL.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(i1.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(YL.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(qI.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push($I.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(QL.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(eI.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(WI.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(tI.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(nI.configure(this.options.italic)),this.options.listItem!==!1&&o.push(D1.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(P1.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&o.push(T1.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&o.push(B1.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(TI.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(MI.configure(this.options.strike)),this.options.text!==!1&&o.push(NI.configure(this.options.text)),this.options.underline!==!1&&o.push(RI.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(VI.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),GI=f5;var KI=W1;var jI=vp;var XI=kp;var K1,j1;if(typeof WeakMap<"u"){let e=new WeakMap;K1=t=>e.get(t),j1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;K1=r=>{for(let o=0;o(n==10&&(n=0),e[n++]=r,e[n++]=o)}var Ye=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:g-y});break}let k=o+y*t;for(let v=0;vr&&(a+=u.attrs.colspan)}}for(let i=0;i1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function m5(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function b5(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function tr(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Mp(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Ts(t.$head)||x5(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function x5(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function X1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function y5(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Y1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function a_(e,t,n){let r=e.node(-1),o=Ye.get(r),a=e.start(-1),i=o.nextCell(e.pos-a,t,n);return i==null?null:e.node(0).resolve(a+i)}function oi(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function i_(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;oc!=n.pos-a);l.unshift(n.pos-a);let u=l.map(c=>{let d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=a+c+1;return new hs(s.resolve(f),s.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(X1(r)&&X1(o)&&Y1(r,o)){let a=this.$anchorCell.node(-1)!=r.node(-1);return a&&this.isRowSelection()?uo.rowSelection(r,o):a&&this.isColSelection()?uo.colSelection(r,o):new uo(r,o)}return V.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=Ye.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),a={},i=[];for(let l=o.top;l0||b>0){let g=h.attrs;if(m>0&&(g=oi(g,0,m)),b>0&&(g=oi(g,g.colspan-b,b)),p.lefto.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=Ye.get(r),a=t.start(-1),i=o.findCell(t.pos-a),s=o.findCell(n.pos-a),l=t.node(0);return i.top<=s.top?(i.top>0&&(t=l.resolve(a+o.map[i.left])),s.bottom0&&(n=l.resolve(a+o.map[s.left])),i.bottom0)return!1;let i=o+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==n.width}eq(t){return t instanceof uo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=Ye.get(r),a=t.start(-1),i=o.findCell(t.pos-a),s=o.findCell(n.pos-a),l=t.node(0);return i.left<=s.left?(i.left>0&&(t=l.resolve(a+o.map[i.top*o.width])),s.right0&&(n=l.resolve(a+o.map[s.top*o.width])),i.right{t.push(Ue.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Ee.create(e.doc,t)}function w5({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(o+1)=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function S5({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let a=e.node(o);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){n=a;break}}for(let o=t.depth;o>0;o--){let a=t.node(o);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){r=a;break}}return n!==r&&t.parentOffset===0}function E5(e,t,n){let r=(t||e).selection,o=(t||e).doc,a,i;if(r instanceof $&&(i=r.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")a=ke.create(o,r.from);else if(i=="row"){let s=o.resolve(r.from+1);a=ke.rowSelection(s,s)}else if(!n){let s=Ye.get(r.node),l=r.from+1,u=l+s.map[s.width*s.height-1];a=ke.create(o,l+1,u)}}else r instanceof V&&w5(r)?a=V.create(o,r.from):r instanceof V&&S5(r)&&(a=V.create(o,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}var L5=new Q("fix-tables");function l_(e,t,n,r){let o=e.childCount,a=t.childCount;e:for(let i=0,s=0;i{o.type.spec.tableRole=="table"&&(n=I5(e,o,a,n))};return t?t.doc!=e.doc&&l_(t.doc,e.doc,0,r):e.doc.descendants(r),n}function I5(e,t,n,r){let o=Ye.get(t);if(!o.problems)return r;r||(r=e.tr);let a=[];for(let l=0;l0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b0?-1:0;k5(t,r,o+a)&&(a=o==0||o==t.width?null:0);for(let i=0;i0&&o0&&t.map[s-1]==l||o0?-1:0;A5(t,r,o+s)&&(s=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u0&&o0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o0&&n[a]==n[a-1]||r.right0&&n[o]==n[o-e]||r.bottom0){let c=l+1+u.content.size,d=ZI(u)?l+1:c;a.replaceWith(d+r.tableStart,c+r.tableStart,s)}a.setSelection(new ke(a.doc.resolve(l+r.tableStart))),t(a)}return!0}function tx(e,t){let n=Ut(e.schema);return N5(({node:r})=>n[r.type.spec.tableRole])(e,t)}function N5(e){return(t,n)=>{let r=t.selection,o,a;if(r instanceof ke){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{var i;if(o=b5(r.$from),!o)return!1;a=(i=Ts(r.$from))===null||i===void 0?void 0:i.pos}if(o==null||a==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let s=o.attrs,l=[],u=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});let c=wr(t),d=t.tr;for(let p=0;p{i.attrs[e]!==t&&a.setNodeMarkup(s,null,{...i.attrs,[e]:t})}):a.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function R5(e){return function(t,n){if(!tr(t))return!1;if(n){let r=Ut(t.schema),o=wr(t),a=t.tr,i=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=i.map(l=>o.table.nodeAt(l));for(let l=0;l{let p=f+a.tableStart,h=i.doc.nodeAt(p);h&&i.setNodeMarkup(p,d,h.attrs)}),r(i)}return!0}}var hZ=Ms("row",{useDeprecatedLogic:!0}),mZ=Ms("column",{useDeprecatedLogic:!0}),x_=Ms("cell",{useDeprecatedLogic:!0});function D5(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let a=e.node(-1).child(r),i=a.lastChild;if(i)return o-1-i.nodeSize;o-=a.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Lp(e,t){let n=e.selection;if(!(n instanceof ke))return!1;if(t){let r=e.tr,o=Ut(e.schema).cell.createAndFill().content;n.forEachCell((a,i)=>{a.content.eq(o)||r.replace(r.mapping.map(i+1),r.mapping.map(i+a.nodeSize-1),new B(o,0,0))}),r.docChanged&&t(r)}return!0}function O5(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),a=o.type.spec.tableRole,i=o.type.schema,s=[];if(a=="row")for(let l=0;l=0;i--){let{rowspan:s,colspan:l}=a.child(i).attrs;for(let u=o;u=t.length&&t.push(_.empty),n[o]r&&(f=f.type.createChecked(oi(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;po&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}a.push(_.from(l))}n=a,t=o}return{width:e,height:t,rows:n}}function F5(e,t,n,r,o,a,i){let s=e.doc.type.schema,l=Ut(s),u,c;if(o>t.width)for(let d=0,f=0;dt.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(b?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,_.from(d)),p=[];for(let h=t.height;h{if(!o)return!1;let a=n.selection;if(a instanceof ke)return Ap(n,r,Z.near(a.$headCell,t));if(e!="horiz"&&!a.empty)return!1;let i=k_(o,e,t);if(i==null)return!1;if(e=="horiz")return Ap(n,r,Z.near(n.doc.resolve(a.head+t),t));{let s=n.doc.resolve(i),l=a_(s,e,t),u;return l?u=Z.near(l,1):t<0?u=Z.near(n.doc.resolve(s.before(-1)),-1):u=Z.near(n.doc.resolve(s.after(-1)),1),Ap(n,r,u)}}}function _p(e,t){return(n,r,o)=>{if(!o)return!1;let a=n.selection,i;if(a instanceof ke)i=a;else{let l=k_(o,e,t);if(l==null)return!1;i=new ke(n.doc.resolve(l))}let s=a_(i.$headCell,e,t);return s?Ap(n,r,new ke(i.$anchorCell,s)):!1}}function U5(e,t){let n=e.state.doc,r=Ts(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new ke(r))),!0):!1}function H5(e,t,n){if(!tr(e.state))return!1;let r=O5(n),o=e.state.selection;if(o instanceof ke){r||(r={width:1,height:1,rows:[_.from(Z1(Ut(e.state.schema).cell,n))]});let a=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=Ye.get(a).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=B5(r,s.right-s.left,s.bottom-s.top),e_(e.state,e.dispatch,i,s,r),!0}else if(r){let a=Mp(e.state),i=a.start(-1);return e_(e.state,e.dispatch,i,Ye.get(a.node(-1)).findCell(a.pos-i),r),!0}else return!1}function q5(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=t_(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof ke)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=Ts(e.state.selection.$anchor))!=null&&((n=G1(e,t))===null||n===void 0?void 0:n.pos)!=o.pos)a(o,t),t.preventDefault();else if(!r)return;function a(l,u){let c=G1(e,u),d=ca.getState(e.state)==null;if(!c||!Y1(l,c))if(d)c=l;else return;let f=new ke(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(ca,l.pos),e.dispatch(p)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",s),ca.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(ca,-1))}function s(l){let u=l,c=ca.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(t_(e,u.target)!=r&&(d=G1(e,t),!d))return i();d&&a(d,u)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",s)}function k_(e,t,n){if(!(e.state.selection instanceof V))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){let i=r.before(o),s=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?i:null}}return null}function t_(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function G1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let r=n.inside>=0?n.inside:n.pos;return Ts(e.state.doc.resolve(r))}var $5=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),J1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,J1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function J1(e,t,n,r,o,a){let i=0,s=!0,l=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;dnew r(d,n,f)),new V5(-1,!1)},apply(i,s){return s.apply(i)}},props:{attributes:i=>{let s=xn.getState(i);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(i,s)=>{W5(i,s,e,o)},mouseleave:i=>{G5(i)},mousedown:(i,s)=>{K5(i,s,t,n)}},decorations:i=>{let s=xn.getState(i);if(s&&s.activeHandle>-1)return Y5(i,s.activeHandle)},nodeViews:{}}});return a}var V5=class Tp{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(xn);if(r&&r.setHandle!=null)return new Tp(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Tp(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return X1(t.doc.resolve(o))||(o=-1),new Tp(o,n.dragging)}return n}};function W5(e,t,n,r){if(!e.editable)return;let o=xn.getState(e.state);if(o&&!o.dragging){let a=X5(t.target),i=-1;if(a){let{left:s,right:l}=a.getBoundingClientRect();t.clientX-s<=n?i=n_(e,t,"left",n):l-t.clientX<=n&&(i=n_(e,t,"right",n))}if(i!=o.activeHandle){if(!r&&i!==-1){let s=e.state.doc.resolve(i),l=s.node(-1),u=Ye.get(l),c=s.start(-1);if(u.colCount(s.pos-c)+s.nodeAfter.attrs.colspan-1==u.width-1)return}C_(e,i)}}}function G5(e){if(!e.editable)return;let t=xn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&C_(e,-1)}function K5(e,t,n,r){var o;if(!e.editable)return!1;let a=(o=e.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,i=xn.getState(e.state);if(!i||i.activeHandle==-1||i.dragging)return!1;let s=e.state.doc.nodeAt(i.activeHandle),l=j5(e,i.activeHandle,s.attrs);e.dispatch(e.state.tr.setMeta(xn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){a.removeEventListener("mouseup",u),a.removeEventListener("mousemove",c);let f=xn.getState(e.state);f?.dragging&&(Z5(e,f.activeHandle,r_(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(xn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=xn.getState(e.state);if(f&&f.dragging){let p=r_(f.dragging,d,n);o_(e,f.activeHandle,p,r)}}return o_(e,i.activeHandle,l,r),a.addEventListener("mouseup",u),a.addEventListener("mousemove",c),t.preventDefault(),!0}function j5(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let a=e.domAtPos(t),i=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let l=0;l{var t,n;let r=e.getAttribute("colwidth"),o=r?r.split(",").map(a=>parseInt(a,10)):null;if(!o){let a=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),i=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(i&&i>-1&&a&&a[i]){let s=a[i].getAttribute("width");return s?[parseInt(s,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",oe(this.options.HTMLAttributes,e),0]}}),ax=te.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",oe(this.options.HTMLAttributes,e),0]}}),ix=te.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",oe(this.options.HTMLAttributes,e),0]}});function rx(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function S_(e,t,n,r,o,a){var i;let s=0,l=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function nz(e,t,n,r,o){let a=tz(e),i=[],s=[];for(let u=0;u{let{selection:t}=e.state;if(!rz(t))return!1;let n=0,r=Vb(t.ranges[0].$from,a=>a.type.name==="table");return r?.node.descendants(a=>{if(a.type.name==="table")return!1;["tableCell","tableHeader"].includes(a.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},oz="";function az(e){return(e||"").replace(/\s+/g," ").trim()}function iz(e,t,n={}){var r;let o=(r=n.cellLineSeparator)!=null?r:oz;if(!e||!e.content||e.content.length===0)return"";let a=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(b=>{let g="";b.content&&Array.isArray(b.content)&&b.content.length>1?g=b.content.map(v=>t.renderChildren(v)).join(o):g=b.content?t.renderChildren(b.content):"";let x=az(g),y=b.type==="tableHeader";m.push({text:x,isHeader:y})}),a.push(m)});let i=a.reduce((h,m)=>Math.max(h,m.length),0);if(i===0)return"";let s=new Array(i).fill(0);a.forEach(h=>{var m;for(let b=0;bs[b]&&(s[b]=x),s[b]<3&&(s[b]=3)}});let l=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=a[0],c=u.some(h=>h.isHeader),d=` +`,f=new Array(i).fill(0).map((h,m)=>c&&u[m]&&u[m].text||"");return d+=`| ${f.map((h,m)=>l(h,s[m])).join(" | ")} | +`,d+=`| ${s.map(h=>"-".repeat(Math.max(3,h))).join(" | ")} | +`,(c?a.slice(1):a).forEach(h=>{d+=`| ${new Array(i).fill(0).map((m,b)=>l(h[b]&&h[b].text||"",s[b])).join(" | ")} | +`}),d}var sz=iz,sx=te.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Q5,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=ez(e,this.options.cellMinWidth),a=t.style;function i(){return a||(r?`width: ${r}`:`min-width: ${o}`)}let s=["table",oe(this.options.HTMLAttributes,t,{style:i()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},s]:s},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(o=>{r.push(t.createNode("tableHeader",{},[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach(a=>{o.push(t.createNode("tableCell",{},[{type:"paragraph",content:t.parseInline(a.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>sz(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:a})=>{let i=nz(a.schema,e,t,n);if(o){let s=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection(V.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>c_(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>d_(e,t),deleteColumn:()=>({state:e,dispatch:t})=>f_(e,t),addRowBefore:()=>({state:e,dispatch:t})=>h_(e,t),addRowAfter:()=>({state:e,dispatch:t})=>m_(e,t),deleteRow:()=>({state:e,dispatch:t})=>g_(e,t),deleteTable:()=>({state:e,dispatch:t})=>y_(e,t),mergeCells:()=>({state:e,dispatch:t})=>ex(e,t),splitCell:()=>({state:e,dispatch:t})=>tx(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Ms("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Ms("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>x_(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>ex(e,t)?!0:tx(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>b_(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>nx(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>nx(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&Q1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=ke.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Np,"Mod-Backspace":Np,Delete:Np,"Mod-Delete":Np}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[v_({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],w_({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:ge(J(e,"tableRole",t))}}}),TZ=ae.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(sx.configure(this.options.table)),this.options.tableCell!==!1&&e.push(ox.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(ax.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(ix.configure(this.options.tableRow)),e}});var G_=M(W_(),1);var Bp=G_.default;function X_(e,t=[]){return e.flatMap(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?X_(n.children,r):{text:n.value,classes:r}})}function K_(e){return e.value||e.children||[]}function Jz(e){return!!Bp.getLanguage(e)}function j_({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return If(e,a=>a.type.name===t).forEach(a=>{var i;let s=a.pos+1,l=a.node.attrs.language||r,u=n.listLanguages(),c=l&&(u.includes(l)||Jz(l)||(i=n.registered)!=null&&i.call(n,l))?K_(n.highlight(l,a.node.textContent)):K_(n.highlightAuto(a.node.textContent));X_(c).forEach(d=>{let f=s+d.text.length;if(d.classes.length){let p=Ue.inline(s,f,{class:d.classes.join(" ")});o.push(p)}s=f})}),Ee.create(e,o)}function Yz(e){return typeof e=="function"}function Qz({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>Yz(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new j({key:new Q("lowlight"),state:{init:(o,{doc:a})=>j_({doc:a,name:e,lowlight:t,defaultLanguage:n}),apply:(o,a,i,s)=>{let l=i.selection.$head.parent.type.name,u=s.selection.$head.parent.type.name,c=If(i.doc,f=>f.type.name===e),d=If(s.doc,f=>f.type.name===e);return o.docChanged&&([l,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?j_({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):a.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var e9=JL.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],Qz({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),Z_=e9;function t9(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},v={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},C=[v,d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:C.concat([{begin:/\(/,end:/\)/,keywords:k,contains:C.concat(["self"]),relevance:0}]),relevance:0},S={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"",keywords:k,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function J_(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=t9(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Y_(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(s);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],v=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...x,...y,"set","shopt",...k,...v]},contains:[p,e.SHEBANG(),h,d,a,i,g,s,l,u,c,n]}}function Q_(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},y={begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function eA(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},v={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},C=[v,d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:C.concat([{begin:/\(/,end:/\)/,keywords:k,contains:C.concat(["self"]),relevance:0}]),relevance:0},S={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"",keywords:k,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function tA(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],i={keyword:o.concat(a),built_in:t,literal:r},s=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:i},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},s]},y=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:i,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},s,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+y+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:i,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,relevance:0,contains:[g,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k]}}var n9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),r9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],o9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a9=[...r9,...o9],i9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),s9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),l9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),u9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function nA(e){let t=e.regex,n=n9(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",a=/@-?\w[\w]*(-\w+)*/,i="[a-zA-Z-][a-zA-Z0-9_-]*",s=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+i,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+s9.join("|")+")"},{begin:":(:)?("+l9.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+u9.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...s,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...s,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:i9.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...s,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+a9.join("|")+")\\b"}]}}function rA(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function oA(e){let a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"lA(e,t,n-1))}function uA(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",r=n+lA("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,sA,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},sA,u]}}var cA="[A-Za-z$_][0-9A-Za-z$_]*",c9=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],d9=["true","false","null","undefined","NaN","Infinity"],dA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],fA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],pA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],f9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],p9=[].concat(pA,dA,fA);function hA(e){let t=e.regex,n=(P,{after:W})=>{let N="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{let N=P[0].length+P.index,le=P.input[N];if(le==="<"||le===","){W.ignoreMatch();return}le===">"&&(n(P,{after:N})||W.ignoreMatch());let Ce,It=P.input.substring(N);if(Ce=It.match(/^\s*=/)){W.ignoreMatch();return}if((Ce=It.match(/^\s+extends\s+/))&&Ce.index===0){W.ignoreMatch();return}}},s={$pattern:cA,keyword:c9,literal:d9,built_in:p9,"variable.language":f9},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(y)});let k=[].concat(x,f.contains),v=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(k)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...dA,...fA]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(P){return t.concat("(?!",P.join("|"),")")}let F={match:t.concat(/\b/,K([...pA,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},U={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},T={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,x,{match:/\$\d+/},d,S,{scope:"attr",match:r+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},U,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},F,H,w,T,{match:/\$[(.]/}]}}function mA(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Os="[0-9](_*[0-9])*",Up=`\\.(${Os})`,Hp="[0-9a-fA-F](_*[0-9a-fA-F])*",h9={className:"number",variants:[{begin:`(\\b(${Os})((${Up})|\\.)?|(${Up}))[eE][+-]?(${Os})[fFdD]?\\b`},{begin:`\\b(${Os})((${Up})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Up})[fFdD]?\\b`},{begin:`\\b(${Os})[fFdD]\\b`},{begin:`\\b0[xX]((${Hp})\\.?|(${Hp})?\\.(${Hp}))[pP][+-]?(${Os})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Hp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function gA(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},i={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,o]}]};o.contains.push(i);let s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(i,{className:"string"}),"self"]}]},u=h9,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,s,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,l,i,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,l]},i,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},u]}}var m9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),g9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],b9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],x9=[...g9,...b9],y9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),bA=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xA=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),k9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),v9=bA.concat(xA).sort().reverse();function yA(e){let t=m9(e),n=v9,r="and or not only",o="[\\w-]+",a="("+o+"|@\\{"+o+"\\})",i=[],s=[],l=function(y){return{className:"string",begin:"~?"+y+".*?"+y}},u=function(y,k,v){return{className:y,begin:k,relevance:v}},c={$pattern:/[a-z-]+/,keyword:r,attribute:y9.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=s.concat({begin:/\{/,end:/\}/,contains:i}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+k9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+x9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",a,0),u("selector-id","#"+a),u("selector-class","\\."+a,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+bA.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+xA.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},x={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,x,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function kA(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function vA(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},s=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,s,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,a,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,l,i,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function wA(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,s={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:s,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function SA(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},i={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,a,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let x=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),i,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=h,i.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function EA(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),i={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(U,T)=>{T.data._beginMatch=U[1]||U[2]},"on:end":(U,T)=>{T.data._beginMatch!==U[1]&&T.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ +]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],k={keyword:g,literal:(U=>{let T=[];return U.forEach(E=>{T.push(E),E.toLowerCase()===E?T.push(E.toUpperCase()):T.push(E.toLowerCase())}),T})(b),built_in:x},v=U=>U.map(T=>T.replace(/\|\d+$/,"")),C={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",v(x).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),S={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},I={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[I,i,S,e.C_BLOCK_COMMENT_MODE,h,m,C]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",v(g).join("\\b|"),"|",v(x).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(H);let K=[I,S,e.C_BLOCK_COMMENT_MODE,h,m,C],F={begin:t.concat(/#\[\s*\\?/,t.either(o,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:o},{match:a}]}]};return{case_insensitive:!1,keywords:k,contains:[F,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},i,H,S,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},C,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:k,contains:["self",F,i,S,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function LA(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function IA(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function _A(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:s,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:s,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function AA(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function TA(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function MA(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),i={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:i},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:i}]},C=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:i},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=C,m.contains=C;let L=[{begin:/^\s*=>/,starts:{end:"$",contains:C}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:i,contains:C}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(u).concat(C)}}function NA(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",s=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:s,literal:l,built_in:u},illegal:""},a]}}var C9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),w9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],S9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],E9=[...w9,...S9],L9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),I9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),_9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),A9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function RA(e){let t=C9(e),n=_9,r=I9,o="@[a-z-]+",a="and or not only",s={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+E9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},s,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+A9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,s,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:L9.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},s,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function DA(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function OA(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],s=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(v=>!c.includes(v)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(v){return t.concat(/\b/,t.either(...v.map(C=>C.replace(/\s+/,"\\s+"))),/\b/)}let y={scope:"keyword",match:x(f),relevance:0};function k(v,{exceptions:C,when:w}={}){let S=w;return C=C||[],v.map(I=>I.match(/\|\d+$/)||C.includes(I)?I:S(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(h,{when:v=>v.length<3}),literal:a,type:s,built_in:d},contains:[{scope:"type",match:x(i)},y,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function zA(e){return e?typeof e=="string"?e:e.source:null}function $u(e){return Ae("(?=",e,")")}function Ae(...e){return e.map(n=>zA(n)).join("")}function T9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Jt(...e){return"("+(T9(e).capture?"":"?:")+e.map(r=>zA(r)).join("|")+")"}var xx=e=>Ae(/\b/,e,/\w$/.test(e)?/\b/:/\B/),M9=["Protocol","Type"].map(xx),PA=["init","self"].map(xx),N9=["Any","Self"],gx=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],BA=["false","nil","true"],R9=["assignment","associativity","higherThan","left","lowerThan","none","right"],D9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],FA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],UA=Jt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),HA=Jt(UA,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),bx=Ae(UA,HA,"*"),qA=Jt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),$p=Jt(qA,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Sr=Ae(qA,$p,"*"),qp=Ae(/[A-Z]/,$p,"*"),O9=["attached","autoclosure",Ae(/convention\(/,Jt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ae(/objc\(/,Sr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],P9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function $A(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,Jt(...M9,...PA)],className:{2:"keyword"}},a={match:Ae(/\./,Jt(...gx)),relevance:0},i=gx.filter(_e=>typeof _e=="string").concat(["_|0"]),s=gx.filter(_e=>typeof _e!="string").concat(N9).map(xx),l={variants:[{className:"keyword",match:Jt(...s,...PA)}]},u={$pattern:Jt(/\b\w+/,/#\w+/),keyword:i.concat(D9),literal:BA},c=[o,a,l],d={match:Ae(/\./,Jt(...FA)),relevance:0},f={className:"built_in",match:Ae(/\b/,Jt(...FA),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:bx},{match:`\\.(\\.|${HA})+`}]},b=[h,m],g="([0-9]_*)+",x="([0-9a-fA-F]_*)+",y={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},k=(_e="")=>({className:"subst",variants:[{match:Ae(/\\/,_e,/[0\\tnr"']/)},{match:Ae(/\\/,_e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),v=(_e="")=>({className:"subst",match:Ae(/\\/,_e,/[\t ]*(?:[\r\n]|\r\n)/)}),C=(_e="")=>({className:"subst",label:"interpol",begin:Ae(/\\/,_e,/\(/),end:/\)/}),w=(_e="")=>({begin:Ae(_e,/"""/),end:Ae(/"""/,_e),contains:[k(_e),v(_e),C(_e)]}),S=(_e="")=>({begin:Ae(_e,/"/),end:Ae(/"/,_e),contains:[k(_e),C(_e)]}),I={className:"string",variants:[w(),w("#"),w("##"),w("###"),S(),S("#"),S("##"),S("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],H={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},K=_e=>{let Co=Ae(_e,/\//),ne=Ae(/\//,_e);return{begin:Co,end:ne,contains:[...L,{scope:"comment",begin:`#(?!.*${ne})`,end:/$/}]}},F={scope:"regexp",variants:[K("###"),K("##"),K("#"),H]},U={match:Ae(/`/,Sr,/`/)},T={className:"variable",match:/\$\d+/},E={className:"variable",match:`\\$${$p}+`},A=[U,T,E],P={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:P9,contains:[...b,y,I]}]}},W={scope:"keyword",match:Ae(/@/,Jt(...O9),$u(Jt(/\(/,/\s+/)))},N={scope:"meta",match:Ae(/@/,Sr)},le=[P,W,N],Ce={match:$u(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ae(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,$p,"+")},{className:"type",match:qp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ae(/\s+&\s+/,$u(qp)),relevance:0}]},It={begin://,keywords:u,contains:[...r,...c,...le,h,Ce]};Ce.contains.push(It);let je={match:Ae(Sr,/\s*:/),keywords:"_|0",relevance:0},_t={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",je,...r,F,...c,...p,...b,y,I,...A,...le,Ce]},vo={begin://,keywords:"repeat each",contains:[...r,Ce]},uc={begin:Jt($u(Ae(Sr,/\s*:/)),$u(Ae(Sr,/\s+/,Sr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Sr}]},js={begin:/\(/,end:/\)/,keywords:u,contains:[uc,...r,...c,...b,y,I,...le,Ce,_t],endsParent:!0,illegal:/["']/},Wh={match:[/(func|macro)/,/\s+/,Jt(U.match,Sr,bx)],className:{1:"keyword",3:"title.function"},contains:[vo,js,t],illegal:[/\[/,/%/]},Gh={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[vo,js,t],illegal:/\[|%/},Kh={match:[/operator/,/\s+/,bx],className:{1:"keyword",3:"title"}},jh={begin:[/precedencegroup/,/\s+/,qp],className:{1:"keyword",3:"title"},contains:[Ce],keywords:[...R9,...BA],end:/}/},Si={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},cc={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},vn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Sr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[vo,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:qp},...c],relevance:0}]};for(let _e of I.variants){let Co=_e.contains.find(dc=>dc.label==="interpol");Co.keywords=u;let ne=[...c,...p,...b,y,I,...A];Co.contains=[...ne,{begin:/\(/,end:/\)/,contains:["self",...ne]}]}return{name:"Swift",keywords:u,contains:[...r,Wh,Gh,Si,cc,vn,Kh,jh,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},F,...c,...p,...b,y,I,...A,...le,Ce,_t]}}var Vp="[A-Za-z$_][0-9A-Za-z$_]*",VA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],WA=["true","false","null","undefined","NaN","Infinity"],GA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],KA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],jA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],XA=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ZA=[].concat(jA,GA,KA);function B9(e){let t=e.regex,n=(P,{after:W})=>{let N="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{let N=P[0].length+P.index,le=P.input[N];if(le==="<"||le===","){W.ignoreMatch();return}le===">"&&(n(P,{after:N})||W.ignoreMatch());let Ce,It=P.input.substring(N);if(Ce=It.match(/^\s*=/)){W.ignoreMatch();return}if((Ce=It.match(/^\s+extends\s+/))&&Ce.index===0){W.ignoreMatch();return}}},s={$pattern:Vp,keyword:VA,literal:WA,built_in:ZA,"variable.language":XA},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(y)});let k=[].concat(x,f.contains),v=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(k)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},w={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...GA,...KA]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(P){return t.concat("(?!",P.join("|"),")")}let F={match:t.concat(/\b/,K([...jA,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},U={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},T={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,x,{match:/\$\d+/},d,S,{scope:"attr",match:r+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},U,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},F,H,w,T,{match:/\$[(.]/}]}}function JA(e){let t=e.regex,n=B9(e),r=Vp,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},i={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Vp,keyword:VA.concat(l),literal:WA,built_in:ZA.concat(o),"variable.language":XA},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let x=m.contains.findIndex(y=>y.label===b);if(x===-1)throw new Error("can not find mode to replace");m.contains.splice(x,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,a,i,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",s);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function YA(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,o),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,i,/ *#/)},{begin:t.concat(/# */,t.either(a,o),/ +/,t.either(i,s),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function QA(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},i={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},s={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,i,o,e.QUOTE_STRING_MODE,l,u,s]}}function eT(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,l,s,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,i,l,s]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function tT(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},i={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},s=e.inherit(i,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,a,i],g=[...b];return g.pop(),g.push(s),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var si={arduino:J_,bash:Y_,c:Q_,cpp:eA,csharp:tA,css:nA,diff:rA,go:oA,graphql:aA,ini:iA,java:uA,javascript:hA,json:mA,kotlin:gA,less:yA,lua:kA,makefile:vA,markdown:CA,objectivec:wA,perl:SA,php:EA,"php-template":LA,plaintext:IA,python:_A,"python-repl":AA,r:TA,ruby:MA,rust:NA,scss:RA,shell:DA,sql:OA,swift:$A,typescript:JA,vbnet:YA,wasm:QA,xml:eT,yaml:tT};var nT={},F9="hljs-";function li(e){let t=Bp.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:o,register:a,registerAlias:i,registered:s};function n(l,u,c){let d=c||nT,f=typeof d.prefix=="string"?d.prefix:F9;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:yx,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(l,u){let d=(u||nT).subset||o(),f=-1,p=0,h;for(;++fp&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function a(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&t.registerLanguage(c,l[c])}}function i(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){let d=l[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function s(l){return!!t.getLanguage(l)}}var yx=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(i,s){return s?i+"_".repeat(s):n.options.classPrefix+i}),o=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var _x={};Xs(_x,{arrayReplaceAt:()=>Ix,assign:()=>Fs,escapeHtml:()=>fo,escapeRE:()=>vU,fromCodePoint:()=>Gu,has:()=>cU,isMdAsciiPunct:()=>di,isPunctChar:()=>ci,isSpace:()=>de,isString:()=>nh,isValidEntityCode:()=>rh,isWhiteSpace:()=>ui,lib:()=>CU,normalizeReference:()=>fi,unescapeAll:()=>co,unescapeMd:()=>mU});var Xp={};Xs(Xp,{decode:()=>Vu,encode:()=>Kp,format:()=>Ps,parse:()=>Wu});var rT={};function z9(e){let t=rT[e];if(t)return t;t=rT[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n=55296&&c<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(c),a+=6;continue}}if((s&248)===240&&a+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),a+=9;continue}}o+="\uFFFD"}return o})}Wp.defaultChars=";/?:@&=+$,#";Wp.componentChars="";var Vu=Wp;var oT={};function U9(e){let t=oT[e];if(t)return t;t=oT[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let r=U9(t),o="";for(let a=0,i=e.length;a=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1=56320&&l<=57343){o+=encodeURIComponent(e[a]+e[a+1]),a++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[a])}return o}Gp.defaultChars=";/?:@&=+$,-_.!~*'()#";Gp.componentChars="-_.!~*'()";var Kp=Gp;function Ps(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function jp(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var H9=/^([a-z0-9.+-]+:)/i,q9=/:[0-9]*$/,$9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,V9=["<",">",'"',"`"," ","\r",` +`," "],W9=["{","}","|","\\","^","`"].concat(V9),G9=["'"].concat(W9),aT=["%","/","?",";","#"].concat(G9),iT=["/","?","#"],K9=255,sT=/^[+a-z0-9A-Z_-]{0,63}$/,j9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,lT={javascript:!0,"javascript:":!0},uT={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function X9(e,t){if(e&&e instanceof jp)return e;let n=new jp;return n.parse(e,t),n}jp.prototype.parse=function(e,t){let n,r,o,a=e;if(a=a.trim(),!t&&e.split("#").length===1){let u=$9.exec(a);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let i=H9.exec(a);if(i&&(i=i[0],n=i.toLowerCase(),this.protocol=i,a=a.substr(i.length)),(t||i||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=a.substr(0,2)==="//",o&&!(i&&lT[i])&&(a=a.substr(2),this.slashes=!0)),!lT[i]&&(o||i&&!uT[i])){let u=-1;for(let h=0;h127?x+="x":x+=g[y];if(!x.match(sT)){let y=h.slice(0,m),k=h.slice(m+1),v=g.match(j9);v&&(y.push(v[1]),k.unshift(v[2])),k.length&&(a=k.join(".")+a),this.hostname=y.join(".");break}}}}this.hostname.length>K9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf("#");s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let l=a.indexOf("?");return l!==-1&&(this.search=a.substr(l),a=a.slice(0,l)),a&&(this.pathname=a),uT[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};jp.prototype.parseHost=function(e){let t=q9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Wu=X9;var kx={};Xs(kx,{Any:()=>Zp,Cc:()=>Jp,Cf:()=>cT,P:()=>Bs,S:()=>Yp,Z:()=>Qp});var Zp=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Jp=/[\0-\x1F\x7F-\x9F]/;var cT=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Bs=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Yp=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Qp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var dT=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var fT=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var vx,Z9=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]]),Cx=(vx=String.fromCodePoint)!==null&&vx!==void 0?vx:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function wx(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Z9.get(e))!==null&&t!==void 0?t:e}var gt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(gt||(gt={}));var J9=32,fa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(fa||(fa={}));function Sx(e){return e>=gt.ZERO&&e<=gt.NINE}function Y9(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function Q9(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Sx(e)}function eU(e){return e===gt.EQUALS||Q9(e)}var mt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(mt||(mt={}));var Er;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Er||(Er={}));var eh=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Er.Strict}startEntity(t){this.decodeMode=t,this.state=mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case mt.EntityStart:return t.charCodeAt(n)===gt.NUM?(this.state=mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=mt.NamedEntity,this.stateNamedEntity(t,n));case mt.NumericStart:return this.stateNumericStart(t,n);case mt.NumericDecimal:return this.stateNumericDecimal(t,n);case mt.NumericHex:return this.stateNumericHex(t,n);case mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|J9)===gt.LOWER_X?(this.state=mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let a=r-n;this.result=this.result*Math.pow(o,a)+parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){let r=n;for(;n>14;for(;n>14,a!==0){if(i===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Er.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&fa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~fa.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case mt.NamedEntity:return this.result!==0&&(this.decodeMode!==Er.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mt.NumericDecimal:return this.emitNumericEntity(0,2);case mt.NumericHex:return this.emitNumericEntity(0,3);case mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mt.EntityStart:return 0}}};function pT(e){let t="",n=new eh(e,r=>t+=Cx(r));return function(o,a){let i=0,s=0;for(;(s=o.indexOf("&",s))>=0;){t+=o.slice(i,s),n.startEntity(a);let u=n.write(o,s+1);if(u<0){i=s+n.end();break}i=s+u,s=u===0?i+1:i}let l=t+o.slice(i);return t="",l}}function tU(e,t,n,r){let o=(t&fa.BRANCH_LENGTH)>>7,a=t&fa.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){let l=r-a;return l<0||l>=o?-1:e[n+l]-1}let i=n,s=i+o-1;for(;i<=s;){let l=i+s>>>1,u=e[l];if(ur)s=l-1;else return e[l+o]}return-1}var nU=pT(dT),UY=pT(fT);function pa(e,t=Er.Legacy){return nU(e,t)}function th(e){for(let t=1;te.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Ex(e,t){return function(r){let o,a=0,i="";for(;o=e.exec(r);)a!==o.index&&(i+=r.substring(a,o.index)),i+=t.get(o[0].charCodeAt(0)),a=o.index+1;return i+r.substring(a)}}var hT=Ex(/[&<>'"]/g,oU),mT=Ex(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),gT=Ex(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var bT;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(bT||(bT={}));var xT;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(xT||(xT={}));function lU(e){return Object.prototype.toString.call(e)}function nh(e){return lU(e)==="[object String]"}var uU=Object.prototype.hasOwnProperty;function cU(e,t){return uU.call(e,t)}function Fs(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Ix(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function rh(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Gu(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var vT=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,dU=/&([a-z#][a-z0-9]{1,31});/gi,fU=new RegExp(vT.source+"|"+dU.source,"gi"),pU=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function hU(e,t){if(t.charCodeAt(0)===35&&pU.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return rh(r)?Gu(r):e}let n=pa(e);return n!==e?n:e}function mU(e){return e.indexOf("\\")<0?e:e.replace(vT,"$1")}function co(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(fU,function(t,n,r){return n||hU(t,r)})}var gU=/[&<>"]/,bU=/[&<>"]/g,xU={"&":"&","<":"<",">":">",'"':"""};function yU(e){return xU[e]}function fo(e){return gU.test(e)?e.replace(bU,yU):e}var kU=/[.?*+^$[\]\\(){}|-]/g;function vU(e){return e.replace(kU,"\\$&")}function de(e){switch(e){case 9:case 32:return!0}return!1}function ui(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ci(e){return Bs.test(e)||Yp.test(e)}function di(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function fi(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var CU={mdurl:Xp,ucmicro:kx};var Nx={};Xs(Nx,{parseLinkDestination:()=>Tx,parseLinkLabel:()=>Ax,parseLinkTitle:()=>Mx});function Ax(e,t,n){let r,o,a,i,s=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos32))return a;if(r===41){if(i===0)break;i--}o++}return t===o||i!==0||(a.str=co(e.slice(t,o)),a.pos=o,a.ok=!0),a}function Mx(e,t,n,r){let o,a=t,i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)i.str=r.str,i.marker=r.marker;else{if(a>=n)return i;let s=e.charCodeAt(a);if(s!==34&&s!==39&&s!==40)return i;t++,a++,s===40&&(s=41),i.marker=s}for(;a"+fo(a.content)+""};Lr.code_block=function(e,t,n,r,o){let a=e[t];return""+fo(e[t].content)+` +`};Lr.fence=function(e,t,n,r,o){let a=e[t],i=a.info?co(a.info).trim():"",s="",l="";if(i){let c=i.split(/(\s+)/g);s=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(a.content,s,l)||fo(a.content):u=fo(a.content),u.indexOf("${u} +`}return`
${u}
+`};Lr.image=function(e,t,n,r,o){let a=e[t];return a.attrs[a.attrIndex("alt")][1]=o.renderInlineAsText(a.children,n,r),o.renderToken(e,t,n)};Lr.hardbreak=function(e,t,n){return n.xhtmlOut?`
`:`
-`};Sr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
+`};Lr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};Sr.text=function(e,t){return co(e[t].content)};Sr.html_block=function(e,t){return e[t].content};Sr.html_inline=function(e,t){return e[t].content};function Da(){this.rules=Oa({},Sr)}Da.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n -`:">",i};Da.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let i=0,s=e.length;i=0&&(r=this.attrs[n][1]),r};Ia.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var fo=Ia;function e3(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}e3.prototype.Token=fo;var t3=e3;var Lz=/\r\n?|\n/g,Pz=/\0/g;function dy(e){let t;t=e.src.replace(Lz,` -`),t=t.replace(Pz,"\uFFFD"),e.src=t}function fy(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function py(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function Fz(e){return/^<\/a\s*>/i.test(e)}function hy(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;s--){let a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(Bz(a.content)&&i>0&&i--,Fz(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){let l=a.content,u=e.md.linkify.match(l),c=[],d=a.level,f=0;u.length>0&&u[0].index===0&&s>0&&o[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let k=new e.Token("text","",0);k.content=l.slice(f,g),k.level=d,c.push(k)}let y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let v=new e.Token("text","",0);v.content=b,v.level=d,c.push(v);let x=new e.Token("link_close","a",-1);x.level=--d,x.markup="linkify",x.info="auto",c.push(x),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(Uz,$z)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Vz(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&n3.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function my(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(zz.test(e.tokens[t].content)&&qz(e.tokens[t].children),n3.test(e.tokens[t].content)&&Vz(e.tokens[t].children))}var Wz=/['"]/,r3=/['"]/g,o3="\u2019";function Fp(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function jz(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,i.type!=="text")continue;let a=i.content,l=0,u=a.length;e:for(;l=0)h=a.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(i.content=Fp(i.content,c.index,o3));continue}if(f)for(n=r.length-1;n>=0;n--){let x=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!Wz.test(e.tokens[t].content)||jz(e.tokens[t].children,e)}function by(e){let t,n,r=e.tokens,o=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};Cr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Cr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!de(this.src.charCodeAt(--t)))return t+1;return t};Cr.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Cr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let i=new Array(n-t);for(let s=0,a=t;ar?i[s]=new Array(l-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};Cr.prototype.Token=fo;var s3=Cr;var Kz=65536;function xy(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function a3(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;let s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;let a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!de(a)||s===45&&de(a))return!1;for(;i=4)return!1;u=a3(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let x=0;x=4||(u=a3(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),v+=d-u.length,v>Kz))break;if(o===t+2){let w=e.push("tbody_open","tbody",1);w.map=y=[t+2,0]}let k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let w=0;w=4){r++,o=r;continue}break}e.line=o;let i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+` -`,i.map=[t,e.line],!0}function Ey(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;let s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let l=o-a;if(l<3)return!1;let u=e.src.slice(a,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o=4)&&(o=e.skipChars(o,s),!(o-a=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let a=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=i)break;if(e.src.charCodeAt(o++)===62&&!v){let k=e.sCount[h]+1,w,E;e.src.charCodeAt(o)===32?(o++,k++,E=!1,w=!0):e.src.charCodeAt(o)===9?(w=!0,(e.bsCount[h]+k)%4===3?(o++,k++,E=!1):E=!0):w=!1;let _=k;for(a.push(e.bMarks[h]),e.bMarks[h]=o;o=i,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(w?1:0),u.push(e.sCount[h]),e.sCount[h]=_-k,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let x=!1;for(let k=0,w=d.length;k";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=f,g[1]=e.line;for(let v=0;v=4)return!1;let i=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(c=!0);let d,f,p;if((p=u3(e,l))>=0){if(d=!0,s=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=l3(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);let b=[l,0];a.map=b,a.markup=String.fromCharCode(h);let g=!1,y=e.md.block.ruler.getRules("list"),v=e.parentType;for(e.parentType="list";l=o?E=1:E=k-x,E>4&&(E=1);let _=x+E;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);let T=[l,0];a.map=T,d&&(a.info=e.src.slice(s,p-1));let C=e.tight,H=e.tShift[l],K=e.sCount[l],F=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[l]=w-e.bMarks[l],e.sCount[l]=k,w>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||g)&&(u=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=F,e.tShift[l]=H,e.sCount[l]=K,e.tight=C,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),l=e.line,T[1]=l,l>=n||e.sCount[l]=4)break;let U=!1;for(let M=0,S=y.length;M=4||e.src.charCodeAt(o)!==91)return!1;function a(y){let v=e.lineMax;if(y>=v||e.isEmpty(y))return null;let x=!1;if(e.sCount[y]-e.blkIndent>3&&(x=!0),e.sCount[y]<0&&(x=!0),!x){let E=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let T=!1;for(let C=0,H=E.length;C"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=s),!0):!1}var c3=["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"];var Yz="[a-zA-Z_:][a-zA-Z0-9:._-]*",Jz="[^\"'=<>`\\x00-\\x20]+",Zz="'[^']*'",Xz='"[^"]*"',Qz="(?:"+Jz+"|"+Zz+"|"+Xz+")",e7="(?:\\s+"+Yz+"(?:\\s*=\\s*"+Qz+")?)",d3="<[A-Za-z][A-Za-z0-9\\-]*"+e7+"*\\s*\\/?>",f3="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",t7="",n7="<[?][\\s\\S]*?[?]>",r7="]*>",o7="",p3=new RegExp("^(?:"+d3+"|"+f3+"|"+t7+"|"+n7+"|"+r7+"|"+o7+")"),h3=new RegExp("^(?:"+d3+"|"+f3+")");var La=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(h3.source+"\\s*$"),/^$/,!1]];function Ny(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o6||oo&&de(e.src.charCodeAt(l-1))&&(i=l),e.line=t+1;let u=e.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,i).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function My(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(p=h))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[i]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[s]=i){e.line=n;break}let l=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Mu.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,i=e;for(;i0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(s7);if(!o)return!1;let i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");let l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let u=e.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(a);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=a.length-i.length,!0}function Iy(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){Ly[e.charCodeAt(0)]=1});function Py(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&a<=57343&&(i+=e.src[n+1],n++)}let s="\\"+i;if(!t){let a=e.push("text_special","",0);o<256&&Ly[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function By(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let i=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";let u=e.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function c7(e){let t=e.tokens_meta,n=e.tokens_meta.length;y3(e,e.delimiters);for(let r=0;r=d)return!1;if(l=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?h=o.pos:s="",l=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[us(r)],!i)return e.pos=c,!1;s=i.href,a=i.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function Hy(e,t){let n,r,o,i,s,a,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;for(u=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?i=a.pos:c=""),u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?o=e.src.slice(u,i++):i=h+1):i=h+1,o||(o=e.src.slice(p,h)),s=e.env.references[us(o)],!s)return e.pos=d,!1;c=s.href,l=s.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,l&&g.push(["title",l])}return e.pos=i,e.posMax=f,!0}var d7=/^([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])?)*)$/,f7=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function $y(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let i=e.src.slice(r+1,n);if(f7.test(i)){let s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(d7.test(i)){let s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function p7(e){return/^\s]/i.test(e)}function h7(e){return/^<\/a\s*>/i.test(e)}function m7(e){let t=e|32;return t>=97&&t<=122}function qy(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!m7(o))return!1;let i=e.src.slice(r).match(p3);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=i[0],p7(s.content)&&e.linkLevel++,h7(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var g7=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,b7=/^&([a-z][a-z0-9]{1,31});/i;function Vy(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(g7);if(i){if(!t){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=Bp(s)?Au(s):Au(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(b7);if(i){let s=ui(i[0]);if(s!==i[0]){if(!t){let a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function v3(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,i=[];for(let s=0;sl;u-=i[u]+1){let d=e[u];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,a.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function Wy(e){let t=e.tokens_meta,n=e.tokens_meta.length;v3(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};Ru.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ru.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let i=this.ruler2.getRules(""),s=i.length;for(let a=0;a|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Yy(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function $p(e){return Object.prototype.toString.call(e)}function y7(e){return $p(e)==="[object String]"}function v7(e){return $p(e)==="[object Object]"}function x7(e){return $p(e)==="[object RegExp]"}function w3(e){return $p(e)==="[object Function]"}function k7(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var _3={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function w7(e){return Object.keys(e||{}).reduce(function(t,n){return t||_3.hasOwnProperty(n)},!1)}var E7={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},_7="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",S7="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function C7(e){e.__index__=-1,e.__text_cache__=""}function T7(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function E3(){return function(e,t){t.normalize(e)}}function Hp(e){let t=e.re=k3(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(_7),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function i(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){let l=e.__schemas__[a];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[a]=u,v7(l)){x7(l.validate)?u.validate=T7(l.validate):w3(l.validate)?u.validate=l.validate:i(a,l),w3(l.normalize)?u.normalize=l.normalize:l.normalize?i(a,l):u.normalize=E3();return}if(y7(l)){o.push(a);return}i(a,l)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:E3()};let s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(k7).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),C7(e)}function N7(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function Jy(e,t){let n=new N7(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function yn(e,t){if(!(this instanceof yn))return new yn(e,t);t||w7(e)&&(t=e,e={}),this.__opts__=Yy({},_3,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Yy({},E7,e),this.__compiled__={},this.__tlds__=S7,this.__tlds_replaced__=!1,this.re={},Hp(this)}yn.prototype.add=function(t,n){return this.__schemas__[t]=n,Hp(this),this};yn.prototype.set=function(t){return this.__opts__=Yy(this.__opts__,t),this};yn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,i,s,a,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],l.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};yn.prototype.pretest=function(t){return this.re.pretest.test(t)};yn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};yn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Jy(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(Jy(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};yn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,Jy(this,0)):null};yn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Hp(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Hp(this),this)};yn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};yn.prototype.onCompile=function(){};var S3=yn;var A7=/^xn--/,M7=/[^\0-\x7F]/,R7=/[\x2E\u3002\uFF0E\uFF61]/g,O7={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Zy=35,Tr=Math.floor,Xy=String.fromCharCode;function ci(e){throw new RangeError(O7[e])}function D7(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function T3(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(R7,".");let o=e.split("."),i=D7(o,t).join(".");return r+i}function N3(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),L7=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},C3=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},A3=function(e,t,n){let r=0;for(e=n?Tr(e/700):e>>1,e+=Tr(e/t);e>Zy*26>>1;r+=36)e=Tr(e/Zy);return Tr(r+(Zy+1)*e/(e+38))},M3=function(e){let t=[],n=e.length,r=0,o=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let a=0;a=128&&ci("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a=n&&ci("invalid-input");let f=L7(e.charCodeAt(a++));f>=36&&ci("invalid-input"),f>Tr((2147483647-r)/c)&&ci("overflow"),r+=f*c;let p=d<=i?1:d>=i+26?26:d-i;if(fTr(2147483647/h)&&ci("overflow"),c*=h}let u=t.length+1;i=A3(r-l,u,l==0),Tr(r/u)>2147483647-o&&ci("overflow"),o+=Tr(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},R3=function(e){let t=[];e=N3(e);let n=e.length,r=128,o=0,i=72;for(let l of e)l<128&&t.push(Xy(l));let s=t.length,a=s;for(s&&t.push("-");a=r&&cTr((2147483647-o)/u)&&ci("overflow"),o+=(l-r)*u,r=l;for(let c of e)if(c2147483647&&ci("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=i?1:f>=i+26?26:f-i;if(d=0))try{t.hostname=Qy.toASCII(t.hostname)}catch{}return Tp(Ma(t))}function V7(e){let t=Nu(e,!0);if(t.hostname&&(!t.protocol||L3.indexOf(t.protocol)>=0))try{t.hostname=Qy.toUnicode(t.hostname)}catch{}return Tu(Ma(t),Tu.defaultChars+"%")}function Bn(e,t){if(!(this instanceof Bn))return new Bn(e,t);t||Pp(e)||(t=e||{},e="default"),this.inline=new x3,this.block=new m3,this.core=new i3,this.renderer=new QA,this.linkify=new S3,this.validateLink=$7,this.normalizeLink=q7,this.normalizeLinkText=V7,this.utils=sy,this.helpers=Oa({},cy),this.options={},this.configure(e),t&&this.set(t)}Bn.prototype.set=function(e){return Oa(this.options,e),this};Bn.prototype.configure=function(e){let t=this;if(Pp(e)){let n=e;if(e=z7[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Bn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Bn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Bn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Bn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Bn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Bn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Bn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Pa=Bn;var W7=new Vo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function j7(e,t){if(e.isText&&t.isText&&fe.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var nv=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:fe.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks),s;o&&(s=j7(o,i))?r[r.length-1]=s:r.push(i)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{s.openNode(i,Ou(o,a,l,u)),s.addText(P3(a.content)),s.closeNode()}:(n[r+"_open"]=(s,a,l,u)=>s.openNode(i,Ou(o,a,l,u)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=e.nodeType(o.node);n[r]=(s,a,l,u)=>s.addNode(i,Ou(o,a,l,u))}else if(o.mark){let i=e.marks[o.mark];ev(o,r)?n[r]=(s,a,l,u)=>{s.openMark(i.create(Ou(o,a,l,u))),s.addText(P3(a.content)),s.closeMark(i)}:(n[r+"_open"]=(s,a,l,u)=>s.openMark(i.create(Ou(o,a,l,u))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)ev(o,r)?n[r]=tv:(n[r+"_open"]=tv,n[r+"_close"]=tv);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var rv=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=K7(t,r)}parse(t,n={}){let r=new nv(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function B3(e,t){for(;++t({tight:B3(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:B3(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),G7={open:"",close:"",mixable:!0},ov=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new Du(this.nodes,this.marks,n);return r.renderContent(t),r.out}},nr=new ov({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` +`};Lr.text=function(e,t){return fo(e[t].content)};Lr.html_block=function(e,t){return e[t].content};Lr.html_inline=function(e,t){return e[t].content};function zs(){this.rules=Fs({},Lr)}zs.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n +`:">",a};zs.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let a=0,i=e.length;a=0&&(r=this.attrs[n][1]),r};Us.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var po=Us;function wT(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}wT.prototype.Token=po;var ST=wT;var wU=/\r\n?|\n/g,SU=/\0/g;function Rx(e){let t;t=e.src.replace(wU,` +`),t=t.replace(SU,"\uFFFD"),e.src=t}function Dx(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Ox(e){let t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function LU(e){return/^<\/a\s*>/i.test(e)}function Px(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;i--){let s=o[i];if(s.type==="link_close"){for(i--;o[i].level!==s.level&&o[i].type!=="link_open";)i--;continue}if(s.type==="html_inline"&&(EU(s.content)&&a>0&&a--,LU(s.content)&&a++),!(a>0)&&s.type==="text"&&e.md.linkify.test(s.content)){let l=s.content,u=e.md.linkify.match(l),c=[],d=s.level,f=0;u.length>0&&u[0].index===0&&i>0&&o[i-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){let v=new e.Token("text","",0);v.content=l.slice(f,g),v.level=d,c.push(v)}let x=new e.Token("link_open","a",1);x.attrs=[["href",m]],x.level=d++,x.markup="linkify",x.info="auto",c.push(x);let y=new e.Token("text","",0);y.content=b,y.level=d,c.push(y);let k=new e.Token("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",c.push(k),f=u[p].lastIndex}if(f=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(_U,TU)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function NU(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&ET.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Bx(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(IU.test(e.tokens[t].content)&&MU(e.tokens[t].children),ET.test(e.tokens[t].content)&&NU(e.tokens[t].children))}var RU=/['"]/,LT=/['"]/g,IT="\u2019";function oh(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function DU(e,t){let n,r=[];for(let o=0;o=0&&!(r[n].level<=i);n--);if(r.length=n+1,a.type!=="text")continue;let s=a.content,l=0,u=s.length;e:for(;l=0)h=s.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(a.content=oh(a.content,c.index,IT));continue}if(f)for(n=r.length-1;n>=0;n--){let k=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!RU.test(e.tokens[t].content)||DU(e.tokens[t].children,e)}function zx(e){let t,n,r=e.tokens,o=r.length;for(let a=0;a0&&this.level++,this.tokens.push(r),r};Ir.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ir.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!de(this.src.charCodeAt(--t)))return t+1;return t};Ir.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ir.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let a=new Array(n-t);for(let i=0,s=t;sr?a[i]=new Array(l-r+1).join(" ")+this.src.slice(c,d):a[i]=this.src.slice(c,d)}return a.join("")};Ir.prototype.Token=po;var AT=Ir;var OU=65536;function qx(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function TT(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),a=!1,i=0,s="";for(;rn)return!1;let o=t+1;if(e.sCount[o]=4)return!1;let a=e.bMarks[o]+e.tShift[o];if(a>=e.eMarks[o])return!1;let i=e.src.charCodeAt(a++);if(i!==124&&i!==45&&i!==58||a>=e.eMarks[o])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!de(s)||i===45&&de(s))return!1;for(;a=4)return!1;u=TT(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let k=0;k=4||(u=TT(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),y+=d-u.length,y>OU))break;if(o===t+2){let C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}let v=e.push("tr_open","tr",1);v.map=[o,o+1];for(let C=0;C=4){r++,o=r;continue}break}e.line=o;let a=e.push("code_block","code",0);return a.content=e.getLines(t,o,4+e.blkIndent,!1)+` +`,a.map=[t,e.line],!0}function Wx(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>a)return!1;let i=e.src.charCodeAt(o);if(i!==126&&i!==96)return!1;let s=o;o=e.skipChars(o,i);let l=o-s;if(l<3)return!1;let u=e.src.slice(s,o),c=e.src.slice(o,a);if(i===96&&c.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],o=4)&&(o=e.skipChars(o,i),!(o-s=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let s=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h=a)break;if(e.src.charCodeAt(o++)===62&&!y){let v=e.sCount[h]+1,C,w;e.src.charCodeAt(o)===32?(o++,v++,w=!1,C=!0):e.src.charCodeAt(o)===9?(C=!0,(e.bsCount[h]+v)%4===3?(o++,v++,w=!1):w=!0):C=!1;let S=v;for(s.push(e.bMarks[h]),e.bMarks[h]=o;o=a,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(C?1:0),u.push(e.sCount[h]),e.sCount[h]=S-v,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let k=!1;for(let v=0,C=d.length;v";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=i,e.parentType=f,g[1]=e.line;for(let y=0;y=4)return!1;let a=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(a++);if(i!==42&&i!==45&&i!==95)return!1;let s=1;for(;a=r)return-1;let a=e.src.charCodeAt(o++);if(a<48||a>57)return-1;for(;;){if(o>=r)return-1;if(a=e.src.charCodeAt(o++),a>=48&&a<=57){if(o-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return o=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(c=!0);let d,f,p;if((p=NT(e,l))>=0){if(d=!0,i=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(i,p-1)),c&&f!==1)return!1}else if((p=MT(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(s=e.push("ordered_list_open","ol",1),f!==1&&(s.attrs=[["start",f]])):s=e.push("bullet_list_open","ul",1);let b=[l,0];s.map=b,s.markup=String.fromCharCode(h);let g=!1,x=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";l=o?w=1:w=v-k,w>4&&(w=1);let S=k+w;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(h);let I=[l,0];s.map=I,d&&(s.info=e.src.slice(i,p-1));let L=e.tight,H=e.tShift[l],K=e.sCount[l],F=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[l]=C-e.bMarks[l],e.sCount[l]=v,C>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||g)&&(u=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=F,e.tShift[l]=H,e.sCount[l]=K,e.tight=L,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(h),l=e.line,I[1]=l,l>=n||e.sCount[l]=4)break;let U=!1;for(let T=0,E=x.length;T=4||e.src.charCodeAt(o)!==91)return!1;function s(x){let y=e.lineMax;if(x>=y||e.isEmpty(x))return null;let k=!1;if(e.sCount[x]-e.blkIndent>3&&(k=!0),e.sCount[x]<0&&(k=!0),!k){let w=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let I=!1;for(let L=0,H=w.length;L"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=i),!0):!1}var RT=["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"];var BU="[a-zA-Z_:][a-zA-Z0-9:._-]*",FU="[^\"'=<>`\\x00-\\x20]+",zU="'[^']*'",UU='"[^"]*"',HU="(?:"+FU+"|"+zU+"|"+UU+")",qU="(?:\\s+"+BU+"(?:\\s*=\\s*"+HU+")?)",DT="<[A-Za-z][A-Za-z0-9\\-]*"+qU+"*\\s*\\/?>",OT="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",$U="",VU="<[?][\\s\\S]*?[?]>",WU="]*>",GU="",PT=new RegExp("^(?:"+DT+"|"+OT+"|"+$U+"|"+VU+"|"+WU+"|"+GU+")"),BT=new RegExp("^(?:"+DT+"|"+OT+")");var Hs=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(BT.source+"\\s*$"),/^$/,!1]];function Zx(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let i=e.src.slice(o,a),s=0;for(;s=4)return!1;let i=e.src.charCodeAt(o);if(i!==35||o>=a)return!1;let s=1;for(i=e.src.charCodeAt(++o);i===35&&o6||oo&&de(e.src.charCodeAt(l-1))&&(a=l),e.line=t+1;let u=e.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,a).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(s),-1);return d.markup="########".slice(0,s),!0}function Yx(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let a=0,i,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s],h=e.eMarks[s];if(p=h))){a=i===61?1:2;break}}if(e.sCount[s]<0)continue;let f=!1;for(let p=0,h=r.length;p3||e.sCount[a]<0)continue;let u=!1;for(let c=0,d=r.length;c=n||e.sCount[i]=a){e.line=n;break}let l=e.line,u=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),i=e.line,i0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Ku.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,a=e;for(;a0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(jU);if(!o)return!1;let a=o[1],i=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!i)return!1;let s=i.url;if(s.length<=a.length)return!1;s=s.replace(/\*+$/,"");let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let u=e.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=s.length-a.length,!0}function ny(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let a=r-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){ry[e.charCodeAt(0)]=1});function oy(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&s<=57343&&(a+=e.src[n+1],n++)}let i="\\"+a;if(!t){let s=e.push("text_special","",0);o<256&&ry[o]!==0?s.content=a:s.content=i,s.markup=i,s.info="escape"}return e.pos=n+1,!0}function ay(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let a=e.posMax;for(;n=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let a=t[o.end],i=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===a.token+1,s=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=i?"strong_open":"em_open",l.tag=i?"strong":"em",l.nesting=1,l.markup=i?s+s:s,l.content="";let u=e.tokens[a.token];u.type=i?"strong_close":"em_close",u.tag=i?"strong":"em",u.nesting=-1,u.markup=i?s+s:s,u.content="",i&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function YU(e){let t=e.tokens_meta,n=e.tokens_meta.length;HT(e,e.delimiters);for(let r=0;r=d)return!1;if(l=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(i=e.md.normalizeLink(o.str),e.md.validateLink(i)?h=o.pos:i="",l=h;h=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),a=e.env.references[fi(r)],!a)return e.pos=c,!1;i=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",i]];m.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function uy(e,t){let n,r,o,a,i,s,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(a=h+1,a=f)return!1;for(u=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?a=s.pos:c=""),u=a;a=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a=0?o=e.src.slice(u,a++):a=h+1):a=h+1,o||(o=e.src.slice(p,h)),i=e.env.references[fi(o)],!i)return e.pos=d,!1;c=i.href,l=i.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,l&&g.push(["title",l])}return e.pos=a,e.posMax=f,!0}var QU=/^([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])?)*)$/,e7=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function cy(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let i=e.src.charCodeAt(n);if(i===60)return!1;if(i===62)break}let a=e.src.slice(r+1,n);if(e7.test(a)){let i=e.md.normalizeLink(a);if(!e.md.validateLink(i))return!1;if(!t){let s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=a.length+2,!0}if(QU.test(a)){let i=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(i))return!1;if(!t){let s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=a.length+2,!0}return!1}function t7(e){return/^\s]/i.test(e)}function n7(e){return/^<\/a\s*>/i.test(e)}function r7(e){let t=e|32;return t>=97&&t<=122}function dy(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!r7(o))return!1;let a=e.src.slice(r).match(PT);if(!a)return!1;if(!t){let i=e.push("html_inline","",0);i.content=a[0],t7(i.content)&&e.linkLevel++,n7(i.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var o7=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,a7=/^&([a-z][a-z0-9]{1,31});/i;function fy(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let a=e.src.slice(n).match(o7);if(a){if(!t){let i=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),s=e.push("text_special","",0);s.content=rh(i)?Gu(i):Gu(65533),s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}else{let a=e.src.slice(n).match(a7);if(a){let i=pa(a[0]);if(i!==a[0]){if(!t){let s=e.push("text_special","",0);s.content=i,s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function qT(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,a=[];for(let i=0;il;u-=a[u]+1){let d=e[u];if(d.marker===s.marker&&d.open&&d.end<0){let f=!1;if((d.close||s.open)&&(d.length+s.length)%3===0&&(d.length%3!==0||s.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?a[u-1]+1:0;a[i]=i-u+p,a[u]=p,s.open=!1,d.end=i,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function py(e){let t=e.tokens_meta,n=e.tokens_meta.length;qT(e.delimiters);for(let r=0;r0&&r++,o[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,a[t]=e.pos};ju.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ju.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let a=this.ruler2.getRules(""),i=a.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function by(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function lh(e){return Object.prototype.toString.call(e)}function i7(e){return lh(e)==="[object String]"}function s7(e){return lh(e)==="[object Object]"}function l7(e){return lh(e)==="[object RegExp]"}function WT(e){return lh(e)==="[object Function]"}function u7(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var KT={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function c7(e){return Object.keys(e||{}).reduce(function(t,n){return t||KT.hasOwnProperty(n)},!1)}var d7={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},f7="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",p7="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function h7(e){e.__index__=-1,e.__text_cache__=""}function m7(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function GT(){return function(e,t){t.normalize(e)}}function sh(e){let t=e.re=VT(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(f7),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function a(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){let l=e.__schemas__[s];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[s]=u,s7(l)){l7(l.validate)?u.validate=m7(l.validate):WT(l.validate)?u.validate=l.validate:a(s,l),WT(l.normalize)?u.normalize=l.normalize:l.normalize?a(s,l):u.normalize=GT();return}if(i7(l)){o.push(s);return}a(s,l)}),o.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:GT()};let i=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(u7).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),h7(e)}function g7(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function xy(e,t){let n=new g7(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function yn(e,t){if(!(this instanceof yn))return new yn(e,t);t||c7(e)&&(t=e,e={}),this.__opts__=by({},KT,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=by({},d7,e),this.__compiled__={},this.__tlds__=p7,this.__tlds_replaced__=!1,this.re={},sh(this)}yn.prototype.add=function(t,n){return this.__schemas__[t]=n,sh(this),this};yn.prototype.set=function(t){return this.__opts__=by(this.__opts__,t),this};yn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,a,i,s,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(a=this.testSchemaAt(t,n[2],l.lastIndex),a){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(o=t.match(this.re.email_fuzzy))!==null&&(i=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s))),this.__index__>=0};yn.prototype.pretest=function(t){return this.re.pretest.test(t)};yn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};yn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(xy(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(xy(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};yn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,xy(this,0)):null};yn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,a){return r!==a[o-1]}).reverse(),sh(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,sh(this),this)};yn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};yn.prototype.onCompile=function(){};var jT=yn;var b7=/^xn--/,x7=/[^\0-\x7F]/,y7=/[\x2E\u3002\uFF0E\uFF61]/g,k7={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yy=35,_r=Math.floor,ky=String.fromCharCode;function ha(e){throw new RangeError(k7[e])}function v7(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function ZT(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(y7,".");let o=e.split("."),a=v7(o,t).join(".");return r+a}function JT(e){let t=[],n=0,r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),w7=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},XT=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},YT=function(e,t,n){let r=0;for(e=n?_r(e/700):e>>1,e+=_r(e/t);e>yy*26>>1;r+=36)e=_r(e/yy);return _r(r+(yy+1)*e/(e+38))},QT=function(e){let t=[],n=e.length,r=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(let s=0;s=128&&ha("not-basic"),t.push(e.charCodeAt(s));for(let s=i>0?i+1:0;s=n&&ha("invalid-input");let f=w7(e.charCodeAt(s++));f>=36&&ha("invalid-input"),f>_r((2147483647-r)/c)&&ha("overflow"),r+=f*c;let p=d<=a?1:d>=a+26?26:d-a;if(f_r(2147483647/h)&&ha("overflow"),c*=h}let u=t.length+1;a=YT(r-l,u,l==0),_r(r/u)>2147483647-o&&ha("overflow"),o+=_r(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},eM=function(e){let t=[];e=JT(e);let n=e.length,r=128,o=0,a=72;for(let l of e)l<128&&t.push(ky(l));let i=t.length,s=i;for(i&&t.push("-");s=r&&c_r((2147483647-o)/u)&&ha("overflow"),o+=(l-r)*u,r=l;for(let c of e)if(c2147483647&&ha("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=a?1:f>=a+26?26:f-a;if(d=0))try{t.hostname=vy.toASCII(t.hostname)}catch{}return Kp(Ps(t))}function N7(e){let t=Wu(e,!0);if(t.hostname&&(!t.protocol||oM.indexOf(t.protocol)>=0))try{t.hostname=vy.toUnicode(t.hostname)}catch{}return Vu(Ps(t),Vu.defaultChars+"%")}function Fn(e,t){if(!(this instanceof Fn))return new Fn(e,t);t||nh(e)||(t=e||{},e="default"),this.inline=new $T,this.block=new FT,this.core=new _T,this.renderer=new CT,this.linkify=new jT,this.validateLink=T7,this.normalizeLink=M7,this.normalizeLinkText=N7,this.utils=_x,this.helpers=Fs({},Nx),this.options={},this.configure(e),t&&this.set(t)}Fn.prototype.set=function(e){return Fs(this.options,e),this};Fn.prototype.configure=function(e){let t=this;if(nh(e)){let n=e;if(e=I7[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Fn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Fn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Fn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Fn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Fn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Fn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Fn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var qs=Fn;var R7=new jo({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function D7(e,t){if(e.isText&&t.isText&&fe.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var Sy=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:fe.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],a=this.schema.text(t,n.marks),i;o&&(i=D7(o,a))?r[r.length-1]=i:r.push(a)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n{i.openNode(a,Xu(o,s,l,u)),i.addText(aM(s.content)),i.closeNode()}:(n[r+"_open"]=(i,s,l,u)=>i.openNode(a,Xu(o,s,l,u)),n[r+"_close"]=i=>i.closeNode())}else if(o.node){let a=e.nodeType(o.node);n[r]=(i,s,l,u)=>i.addNode(a,Xu(o,s,l,u))}else if(o.mark){let a=e.marks[o.mark];Cy(o,r)?n[r]=(i,s,l,u)=>{i.openMark(a.create(Xu(o,s,l,u))),i.addText(aM(s.content)),i.closeMark(a)}:(n[r+"_open"]=(i,s,l,u)=>i.openMark(a.create(Xu(o,s,l,u))),n[r+"_close"]=i=>i.closeMark(a))}else if(o.ignore)Cy(o,r)?n[r]=wy:(n[r+"_open"]=wy,n[r+"_close"]=wy);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var Ey=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=O7(t,r)}parse(t,n={}){let r=new Sy(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function iM(e,t){for(;++t({tight:iM(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:iM(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),P7={open:"",close:"",mixable:!0},Ly=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new Zu(this.nodes,this.marks,n);return r.renderContent(t),r.out}},rr=new Ly({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` `),e.text(t.textContent,!1),e.write(` -`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,i=>{let s=String(n+i);return e.repeat(" ",r-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return F3(n.child(r),-1)},close(e,t,n,r){return F3(n.child(r-1),1)},escape:!1}});function F3(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let i=o>0&&t>0?" `":"`";for(let s=0;s0&&t<0&&(i+=" "),i}function Y7(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Du=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` +`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,a=>{let i=String(n+a);return e.repeat(" ",r-i.length)+i+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return sM(n.child(r),-1)},close(e,t,n,r){return sM(n.child(r-1),1)},escape:!1}});function sM(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let a=o>0&&t>0?" `":"`";for(let i=0;i0&&t<0&&(a+=" "),a}function B7(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Zu=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` `),t>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let o=1;othis.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,a,l)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=g?s.withText(g):null,s||(u=r))}if(s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&(l==t.childCount-1||!m.isInSet(t.child(l+1).marks))})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(s.text);g&&(o=g,s=b?s.withText(b):null,s||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;mg?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(i),i(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((s,a,l)=>{l&&o&&this.flushClose(1),this.wrapBlock(n,r(l),t,()=>this.render(s,t,l))}),this.inTightList=i}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?aU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qp=(e,t,n)=>(lU(e,typeof t!="symbol"?t+"":t,n),n),uU=oe.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;let a=r.getAttributes(s);return o.updateAttributes(s,{tight:t??!(a!=null&&a.tight)})}return e.options.listTypes.some(s=>i(s))}}}}}),V3=Pa();function G3(e,t){return V3.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new V3.inline.State(e,null,null,[]).scanDelims(t,!0)}function Y3(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function cU(e,t,n,r){let o=n,i=e;for(;on&&!G3(i,o).can_close;)i=Y3(i,t,o,-1),o--;return{text:i,from:n,to:o}}function fU(e,t,n,r){let o={text:e,from:n,to:r};return o=cU(o.text,t,o.from,o.to),o=dU(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function cv(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function pU(e){return e?.replace(//g,">")}function hU(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function mU(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var Wp=te.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(gU(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function gU(e,t){let n=e.type.schema,r=xa(N.from(e),n);return e.isBlock&&(t instanceof N||t.type.name===n.topNodeType.name)?bU(r):r}function bU(e){let n=cv(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` +`)}render(t,n,r){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,r,o)=>this.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",a=(i,s,l)=>{let u=i?i.marks:[];i&&i.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",i&&i.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(i.text);b&&(c+=b,i=g?i.withText(g):null,i||(u=r))}if(i&&i.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&(l==t.childCount-1||!m.isInSet(t.child(l+1).marks))})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(i.text);g&&(o=g,i=b?i.withText(b):null,i||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;mg?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h0&&(this.atBlockStart=!1)};t.forEach(a),a(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,a=this.inTightList;this.inTightList=o,t.forEach((i,s,l)=>{l&&o&&this.flushClose(1),this.wrapBlock(n,r(l),t,()=>this.render(i,t,l))}),this.inTightList=a}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;ot in e?X7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uh=(e,t,n)=>(Z7(e,typeof t!="symbol"?t+"":t,n),n),J7=ae.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function a(i){if(!r.isActive(i))return!1;let s=r.getAttributes(i);return o.updateAttributes(i,{tight:t??!(s!=null&&s.tight)})}return e.options.listTypes.some(i=>a(i))}}}}}),pM=qs();function bM(e,t){return pM.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new pM.inline.State(e,null,null,[]).scanDelims(t,!0)}function xM(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function Y7(e,t,n,r){let o=n,a=e;for(;on&&!bM(a,o).can_close;)a=xM(a,t,o,-1),o--;return{text:a,from:n,to:o}}function eH(e,t,n,r){let o={text:e,from:n,to:r};return o=Y7(o.text,t,o.from,o.to),o=Q7(o.text,t,o.from,o.to),o.to-o.from) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function Ny(e){let t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function tH(e){return e?.replace(//g,">")}function nH(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function rH(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var dh=te.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(oH(t,n)):e.write(`[${t.type.name}]`),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function oH(e,t){let n=e.type.schema,r=Ls(_.from(e),n);return e.isBlock&&(t instanceof _||t.type.name===n.topNodeType.name)?aH(r):r}function aH(e){let n=Ny(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` ${n.innerHTML} `:` -`,n.outerHTML}var yU=te.create({name:"blockquote"}),vU=yU.extend({addStorage(){return{markdown:{serialize:nr.nodes.blockquote,parse:{}}}}}),xU=te.create({name:"bulletList"}),Z3=xU.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),kU=te.create({name:"codeBlock"}),wU=kU.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` -`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),EU=te.create({name:"hardBreak"}),X3=EU.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var IU=OU.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,i=String(o+t.childCount-1).length,s=e.repeat(" ",i+2),l=DU(t,n,r)%2?") ":". ";e.renderList(t,s,u=>{let c=String(o+u);return e.repeat(" ",i-c.length)+c+l})},parse:{}}}}}),LU=te.create({name:"paragraph"}),PU=LU.extend({addStorage(){return{markdown:{serialize:nr.nodes.paragraph,parse:{}}}}});function sv(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var BU=te.create({name:"table"}),FU=BU.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!zU(t)){Wp.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,i)=>{if(e.write("| "),r.forEach((s,a,l)=>{l&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!i){let s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function j3(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function zU(e){let t=sv(e),n=t[0],r=t.slice(1);return!(sv(n).some(o=>o.type.name!=="tableHeader"||j3(o)||o.childCount>1)||r.some(o=>sv(o).some(i=>i.type.name==="tableHeader"||j3(i)||i.childCount>1)))}var UU=te.create({name:"taskItem"}),HU=UU.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),$U=te.create({name:"taskList"}),qU=$U.extend({addStorage(){return{markdown:{serialize:Z3.storage.markdown.serialize,parse:{setup(e){e.use(K3.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),VU=te.create({name:"text"}),WU=VU.extend({addStorage(){return{markdown:{serialize(e,t){e.text(pU(t.text))},parse:{}}}}}),jU=it.create({name:"bold"}),KU=jU.extend({addStorage(){return{markdown:{serialize:nr.marks.strong,parse:{}}}}}),GU=it.create({name:"code"}),YU=GU.extend({addStorage(){return{markdown:{serialize:nr.marks.code,parse:{}}}}}),JU=it.create({name:"italic"}),ZU=JU.extend({addStorage(){return{markdown:{serialize:nr.marks.em,parse:{}}}}}),XU=it.create({name:"link"}),QU=XU.extend({addStorage(){return{markdown:{serialize:nr.marks.link,parse:{}}}}}),eH=it.create({name:"strike"}),tH=eH.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),nH=[vU,Z3,wU,X3,SU,TU,Wp,AU,RU,IU,PU,FU,HU,qU,WU,KU,YU,J3,ZU,QU,tH];function Vp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=nH.find(i=>i.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var lv=class{constructor(t){qp(this,"editor",null),this.editor=t}serialize(t){let n=new av(this.nodes,this.marks,{hardBreakNodeName:X3.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(Wp)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(J3)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=Vp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=Vp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},uv=class{constructor(t,n){qp(this,"editor",null),qp(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=t,this.md=this.withPatchedRenderer(Pa({html:r,linkify:o,breaks:i}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=Vp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});let r=this.md.render(t),o=cv(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=Vp(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&hU(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,a;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",d=u?"":(s=(a=n.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}mU(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` +`,n.outerHTML}var iH=te.create({name:"blockquote"}),sH=iH.extend({addStorage(){return{markdown:{serialize:rr.nodes.blockquote,parse:{}}}}}),lH=te.create({name:"bulletList"}),kM=lH.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),uH=te.create({name:"codeBlock"}),cH=uH.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` +`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),dH=te.create({name:"hardBreak"}),vM=dH.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var CH=kH.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,a=String(o+t.childCount-1).length,i=e.repeat(" ",a+2),l=vH(t,n,r)%2?") ":". ";e.renderList(t,i,u=>{let c=String(o+u);return e.repeat(" ",a-c.length)+c+l})},parse:{}}}}}),wH=te.create({name:"paragraph"}),SH=wH.extend({addStorage(){return{markdown:{serialize:rr.nodes.paragraph,parse:{}}}}});function _y(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var EH=te.create({name:"table"}),LH=EH.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!IH(t)){dh.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,a)=>{if(e.write("| "),r.forEach((i,s,l)=>{l&&e.write(" | ");let u=i.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!a){let i=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${i} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function mM(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function IH(e){let t=_y(e),n=t[0],r=t.slice(1);return!(_y(n).some(o=>o.type.name!=="tableHeader"||mM(o)||o.childCount>1)||r.some(o=>_y(o).some(a=>a.type.name==="tableHeader"||mM(a)||a.childCount>1)))}var _H=te.create({name:"taskItem"}),AH=_H.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),TH=te.create({name:"taskList"}),MH=TH.extend({addStorage(){return{markdown:{serialize:kM.storage.markdown.serialize,parse:{setup(e){e.use(gM.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),NH=te.create({name:"text"}),RH=NH.extend({addStorage(){return{markdown:{serialize(e,t){e.text(tH(t.text))},parse:{}}}}}),DH=it.create({name:"bold"}),OH=DH.extend({addStorage(){return{markdown:{serialize:rr.marks.strong,parse:{}}}}}),PH=it.create({name:"code"}),BH=PH.extend({addStorage(){return{markdown:{serialize:rr.marks.code,parse:{}}}}}),FH=it.create({name:"italic"}),zH=FH.extend({addStorage(){return{markdown:{serialize:rr.marks.em,parse:{}}}}}),UH=it.create({name:"link"}),HH=UH.extend({addStorage(){return{markdown:{serialize:rr.marks.link,parse:{}}}}}),qH=it.create({name:"strike"}),$H=qH.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),VH=[sH,kM,cH,vM,pH,mH,dh,bH,yH,CH,SH,LH,AH,MH,RH,OH,BH,yM,zH,HH,$H];function ch(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=VH.find(a=>a.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var Ty=class{constructor(t){uh(this,"editor",null),this.editor=t}serialize(t){let n=new Ay(this.nodes,this.marks,{hardBreakNodeName:vM.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(dh)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(yM)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=ch(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=ch(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},My=class{constructor(t,n){uh(this,"editor",null),uh(this,"md",null);let{html:r,linkify:o,breaks:a}=n;this.editor=t,this.md=this.withPatchedRenderer(qs({html:r,linkify:o,breaks:a}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(a=>{var i;return(i=ch(a))===null||i===void 0||(i=i.parse)===null||i===void 0||(i=i.setup)===null||i===void 0?void 0:i.call({editor:this.editor,options:a.options},this.md)});let r=this.md.render(t),o=Ny(r);return this.editor.extensionManager.extensions.forEach(a=>{var i;return(i=ch(a))===null||i===void 0||(i=i.parse)===null||i===void 0||(i=i.updateDOM)===null||i===void 0?void 0:i.call({editor:this.editor,options:a.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(a=>{var i;((i=a.nextSibling)===null||i===void 0?void 0:i.nodeType)===Node.TEXT_NODE&&!a.closest("pre")&&(a.nextSibling.textContent=a.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var a;return(a=o.spec.parseDOM)===null||a===void 0?void 0:a.map(i=>i.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&nH(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,a,i,s;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(o=(a=n.match(/^\s+/))===null||a===void 0?void 0:a[0])!==null&&o!==void 0?o:"",d=u?"":(i=(s=n.match(/\s+$/))===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}rH(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===` `?o:o[o.length-1]===` -`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},rH=oe.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new G({key:new Q("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return Nn.fromSchema(this.editor.schema).parseSlice(cv(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),Q3=oe.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=Mb.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new uv(this.editor,this.options),serializer:new lv(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[uU.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),rH.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var ms=R(ge());var dv=["top","right","bottom","left"],eM=["start","end"],fv=dv.reduce((e,t)=>e.concat(t,t+"-"+eM[0],t+"-"+eM[1]),[]),Fn=Math.min,_t=Math.max,Pu=Math.round;var rr=e=>({x:e,y:e}),oH={left:"right",right:"left",bottom:"top",top:"bottom"},iH={start:"end",end:"start"};function jp(e,t,n){return _t(e,Fn(t,n))}function Nr(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function zn(e){return e.split("-")[1]}function pv(e){return e==="x"?"y":"x"}function Kp(e){return e==="y"?"height":"width"}var sH=new Set(["top","bottom"]);function or(e){return sH.has(vn(e))?"y":"x"}function Gp(e){return pv(or(e))}function hv(e,t,n){n===void 0&&(n=!1);let r=zn(e),o=Gp(e),i=Kp(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Lu(s)),[s,Lu(s)]}function rM(e){let t=Lu(e);return[Iu(e),t,Iu(t)]}function Iu(e){return e.replace(/start|end/g,t=>iH[t])}var tM=["left","right"],nM=["right","left"],aH=["top","bottom"],lH=["bottom","top"];function uH(e,t,n){switch(e){case"top":case"bottom":return n?t?nM:tM:t?tM:nM;case"left":case"right":return t?aH:lH;default:return[]}}function oM(e,t,n,r){let o=zn(e),i=uH(vn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Iu)))),i}function Lu(e){return e.replace(/left|right|bottom|top/g,t=>oH[t])}function cH(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yp(e){return typeof e!="number"?cH(e):{top:e,right:e,bottom:e,left:e}}function po(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function iM(e,t,n){let{reference:r,floating:o}=e,i=or(t),s=Gp(t),a=Kp(s),l=vn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(zn(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}var lM=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=iM(u,r,l),f=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Nr(e,t)||{};if(u==null)return{};let d=Yp(c),f={x:n,y:r},p=Gp(o),h=Kp(p),m=await s.getDimensions(u),b=p==="y",g=b?"top":"left",y=b?"bottom":"right",v=b?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-f[p]-i.floating[h],k=f[p]-i.reference[p],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),E=w?w[v]:0;(!E||!await(s.isElement==null?void 0:s.isElement(w)))&&(E=a.floating[v]||i.floating[h]);let _=x/2-k/2,T=E/2-m[h]/2-1,C=Fn(d[g],T),H=Fn(d[y],T),K=C,F=E-m[h]-H,U=E/2-m[h]/2+_,M=jp(K,U,F),S=!l.arrow&&zn(o)!=null&&U!==M&&i.reference[h]/2-(Uzn(o)===e),...n.filter(o=>zn(o)!==e)]:n.filter(o=>vn(o)===o)).filter(o=>e?zn(o)===e||(t?Iu(o)!==o:!1):!0)}var cM=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:i,middlewareData:s,placement:a,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=fv,autoAlignment:p=!0,...h}=Nr(e,t),m=d!==void 0||f===fv?dH(d||null,p,f):f,b=await ds(t,h),g=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[g];if(y==null)return{};let v=hv(y,i,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(a!==y)return{reset:{placement:m[0]}};let x=[b[vn(y)],b[v[0]],b[v[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:x}],w=m[g+1];if(w)return{data:{index:g+1,overflows:k},reset:{placement:w}};let E=k.map(C=>{let H=zn(C.placement);return[C.placement,H&&c?C.overflows.slice(0,2).reduce((K,F)=>K+F,0):C.overflows[0],C.overflows]}).sort((C,H)=>C[1]-H[1]),T=((o=E.filter(C=>C[2].slice(0,zn(C[0])?2:3).every(H=>H<=0))[0])==null?void 0:o[0])||E[0][0];return T!==a?{data:{index:g+1,overflows:k},reset:{placement:T}}:{}}}},dM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=Nr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=vn(o),y=or(a),v=vn(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=f||(v||!m?[Lu(a)]:rM(a)),w=h!=="none";!f&&w&&k.push(...oM(a,m,h,x));let E=[a,...k],_=await ds(t,b),T=[],C=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(_[g]),d){let U=hv(o,s,x);T.push(_[U[0]],_[U[1]])}if(C=[...C,{placement:o,overflows:T}],!T.every(U=>U<=0)){var H,K;let U=(((H=i.flip)==null?void 0:H.index)||0)+1,M=E[U];if(M&&(!(d==="alignment"?y!==or(M):!1)||C.every(P=>or(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:U,overflows:C},reset:{placement:M}};let S=(K=C.filter(A=>A.overflows[0]<=0).sort((A,P)=>A.overflows[1]-P.overflows[1])[0])==null?void 0:K.placement;if(!S)switch(p){case"bestFit":{var F;let A=(F=C.filter(P=>{if(w){let W=or(P.placement);return W===y||W==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(W=>W>0).reduce((W,O)=>W+O,0)]).sort((P,W)=>P[1]-W[1])[0])==null?void 0:F[0];A&&(S=A);break}case"initialPlacement":S=a;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function sM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aM(e){return dv.some(t=>e[t]>=0)}var fM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=Nr(e,t);switch(r){case"referenceHidden":{let i=await ds(t,{...o,elementContext:"reference"}),s=sM(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:aM(s)}}}case"escaped":{let i=await ds(t,{...o,altBoundary:!0}),s=sM(i,n.floating);return{data:{escapedOffsets:s,escaped:aM(s)}}}default:return{}}}}};function pM(e){let t=Fn(...e.map(i=>i.left)),n=Fn(...e.map(i=>i.top)),r=_t(...e.map(i=>i.right)),o=_t(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function fH(e){let t=e.slice().sort((o,i)=>o.y-i.y),n=[],r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>po(pM(o)))}var hM=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:a=2,x:l,y:u}=Nr(e,t),c=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),d=fH(c),f=po(pM(c)),p=Yp(a);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&u!=null)return d.find(b=>l>b.left-p.left&&lb.top-p.top&&u=2){if(or(n)==="y"){let C=d[0],H=d[d.length-1],K=vn(n)==="top",F=C.top,U=H.bottom,M=K?C.left:H.left,S=K?C.right:H.right,A=S-M,P=U-F;return{top:F,bottom:U,left:M,right:S,width:A,height:P,x:M,y:F}}let b=vn(n)==="left",g=_t(...d.map(C=>C.right)),y=Fn(...d.map(C=>C.left)),v=d.filter(C=>b?C.left===y:C.right===g),x=v[0].top,k=v[v.length-1].bottom,w=y,E=g,_=E-w,T=k-x;return{top:x,bottom:k,left:w,right:E,width:_,height:T,x:w,y:x}}return f}let m=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:s});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},pH=new Set(["left","top"]);async function hH(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=vn(n),a=zn(n),l=or(n)==="y",u=pH.has(s)?-1:1,c=i&&l?-1:1,d=Nr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var mM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:a}=t,l=await hH(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},gM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...l}=Nr(e,t),u={x:n,y:r},c=await ds(t,l),d=or(vn(o)),f=pv(d),p=u[f],h=u[d];if(i){let b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[b],v=p-c[g];p=jp(y,p,v)}if(s){let b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+c[b],v=h-c[g];h=jp(y,h,v)}let m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}};var bM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Nr(e,t),c=await ds(t,u),d=vn(o),f=zn(o),p=or(o)==="y",{width:h,height:m}=i.floating,b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");let y=m-c.top-c.bottom,v=h-c.left-c.right,x=Fn(m-c[b],y),k=Fn(h-c[g],v),w=!t.middlewareData.shift,E=x,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),w&&!f){let C=_t(c.left,0),H=_t(c.right,0),K=_t(c.top,0),F=_t(c.bottom,0);p?_=h-2*(C!==0||H!==0?C+H:_t(c.left,c.right)):E=m-2*(K!==0||F!==0?K+F:_t(c.top,c.bottom))}await l({...t,availableWidth:_,availableHeight:E});let T=await s.getDimensions(a.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function Zp(){return typeof window<"u"}function fs(e){return vM(e)?(e.nodeName||"").toLowerCase():"#document"}function ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(vM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vM(e){return Zp()?e instanceof Node||e instanceof ln(e).Node:!1}function Un(e){return Zp()?e instanceof Element||e instanceof ln(e).Element:!1}function ir(e){return Zp()?e instanceof HTMLElement||e instanceof ln(e).HTMLElement:!1}function yM(e){return!Zp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ln(e).ShadowRoot}var mH=new Set(["inline","contents"]);function Ba(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!mH.has(o)}var gH=new Set(["table","td","th"]);function xM(e){return gH.has(fs(e))}var bH=[":popover-open",":modal"];function Bu(e){return bH.some(t=>{try{return e.matches(t)}catch{return!1}})}var yH=["transform","translate","scale","rotate","perspective"],vH=["transform","translate","scale","rotate","perspective","filter"],xH=["paint","layout","strict","content"];function Xp(e){let t=Qp(),n=Un(e)?Hn(e):e;return yH.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vH.some(r=>(n.willChange||"").includes(r))||xH.some(r=>(n.contain||"").includes(r))}function kM(e){let t=ho(e);for(;ir(t)&&!ps(t);){if(Xp(t))return t;if(Bu(t))return null;t=ho(t)}return null}function Qp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var kH=new Set(["html","body","#document"]);function ps(e){return kH.has(fs(e))}function Hn(e){return ln(e).getComputedStyle(e)}function Fu(e){return Un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ho(e){if(fs(e)==="html")return e;let t=e.assignedSlot||e.parentNode||yM(e)&&e.host||Ar(e);return yM(t)?t.host:t}function wM(e){let t=ho(e);return ps(t)?e.ownerDocument?e.ownerDocument.body:e.body:ir(t)&&Ba(t)?t:wM(t)}function Jp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=wM(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ln(o);if(i){let a=eh(s);return t.concat(s,s.visualViewport||[],Ba(o)?o:[],a&&n?Jp(a):[])}return t.concat(o,Jp(o,[],n))}function eh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function CM(e){let t=Hn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ir(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Pu(n)!==i||Pu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function TM(e){return Un(e)?e:e.contextElement}function Fa(e){let t=TM(e);if(!ir(t))return rr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=CM(t),s=(i?Pu(n.width):n.width)/r,a=(i?Pu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var wH=rr(0);function NM(e){let t=ln(e);return!Qp()||!t.visualViewport?wH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ln(e)?!1:t}function zu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=TM(e),s=rr(1);t&&(r?Un(r)&&(s=Fa(r)):s=Fa(e));let a=EH(i,n,r)?NM(i):rr(0),l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){let f=ln(i),p=r&&Un(r)?ln(r):r,h=f,m=eh(h);for(;m&&r&&p!==h;){let b=Fa(m),g=m.getBoundingClientRect(),y=Hn(m),v=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,x=g.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=v,u+=x,h=ln(m),m=eh(h)}}return po({width:c,height:d,x:l,y:u})}function th(e,t){let n=Fu(e).scrollLeft;return t?t.left+n:zu(Ar(e)).left+n}function AM(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-th(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function _H(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=Ar(r),a=t?Bu(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=rr(1),c=rr(0),d=ir(r);if((d||!d&&!i)&&((fs(r)!=="body"||Ba(s))&&(l=Fu(r)),ir(r))){let p=zu(r);u=Fa(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!i?AM(s,l):rr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function SH(e){return Array.from(e.getClientRects())}function CH(e){let t=Ar(e),n=Fu(e),r=e.ownerDocument.body,o=_t(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=_t(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+th(e),a=-n.scrollTop;return Hn(r).direction==="rtl"&&(s+=_t(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}var EM=25;function TH(e,t){let n=ln(e),r=Ar(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let c=Qp();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}let u=th(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=EM&&(i-=h)}else u<=EM&&(i+=u);return{width:i,height:s,x:a,y:l}}var NH=new Set(["absolute","fixed"]);function AH(e,t){let n=zu(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ir(e)?Fa(e):rr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function _M(e,t,n){let r;if(t==="viewport")r=TH(e,n);else if(t==="document")r=CH(Ar(e));else if(Un(t))r=AH(t,n);else{let o=NM(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return po(r)}function MM(e,t){let n=ho(e);return n===t||!Un(n)||ps(n)?!1:Hn(n).position==="fixed"||MM(n,t)}function MH(e,t){let n=t.get(e);if(n)return n;let r=Jp(e,[],!1).filter(a=>Un(a)&&fs(a)!=="body"),o=null,i=Hn(e).position==="fixed",s=i?ho(e):e;for(;Un(s)&&!ps(s);){let a=Hn(s),l=Xp(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&NH.has(o.position)||Ba(s)&&!l&&MM(e,s))?r=r.filter(c=>c!==s):o=a,s=ho(s)}return t.set(e,r),r}function RH(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Bu(t)?[]:MH(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{let d=_M(t,c,o);return u.top=_t(d.top,u.top),u.right=Fn(d.right,u.right),u.bottom=Fn(d.bottom,u.bottom),u.left=_t(d.left,u.left),u},_M(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function OH(e){let{width:t,height:n}=CM(e);return{width:t,height:n}}function DH(e,t,n){let r=ir(t),o=Ar(t),i=n==="fixed",s=zu(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=rr(0);function u(){l.x=th(o)}if(r||!r&&!i)if((fs(t)!=="body"||Ba(o))&&(a=Fu(t)),r){let p=zu(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();let c=o&&!r&&!i?AM(o,a):rr(0),d=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function mv(e){return Hn(e).position==="static"}function SM(e,t){if(!ir(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function RM(e,t){let n=ln(e);if(Bu(e))return n;if(!ir(e)){let o=ho(e);for(;o&&!ps(o);){if(Un(o)&&!mv(o))return o;o=ho(o)}return n}let r=SM(e,t);for(;r&&xM(r)&&mv(r);)r=SM(r,t);return r&&ps(r)&&mv(r)&&!Xp(r)?n:r||kM(e)||n}var IH=async function(e){let t=this.getOffsetParent||RM,n=this.getDimensions,r=await n(e.floating);return{reference:DH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LH(e){return Hn(e).direction==="rtl"}var PH={convertOffsetParentRelativeRectToViewportRelativeRect:_H,getDocumentElement:Ar,getClippingRect:RH,getOffsetParent:RM,getElementRects:IH,getClientRects:SH,getDimensions:OH,getScale:Fa,isElement:Un,isRTL:LH};var nh=mM,rh=cM,oh=gM,ih=dM,sh=bM,ah=fM,lh=uM,uh=hM;var ch=(e,t,n)=>{let r=new Map,o={platform:PH,...n},i={...o.platform,_c:r};return lM(e,t,{...o,platform:i})};function BH(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-o,a=r-n,l=o,u=n;return new DOMRect(l,u,s,a)}var FH=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:i,appendTo:s,getReferencedVirtualElement:a,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:m}=d,{empty:b}=m,g=!h.textBetween(f,p).length&&of(d.selection),y=this.element.contains(document.activeElement);return!(!(c.hasFocus()||y)||b||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=s,this.scrollTarget=(u=l?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=a,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(ih(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(oh(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(nh(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(lh(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(sh(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(rh(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(ah(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(uh(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=pf(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof q){let i=this.view.nodeDOM(t.from),s=i.dataset.nodeViewWrapper?i:i.querySelector("[data-node-view-wrapper]");s&&(i=s),i&&(o={getBoundingClientRect:()=>i.getBoundingClientRect(),getClientRects:()=>[i.getBoundingClientRect()]})}if(t instanceof ve){let{$anchorCell:i,$headCell:s}=t,a=i?i.pos:s.pos,l=s?s.pos:i.pos,u=this.view.nodeDOM(a),c=this.view.nodeDOM(l);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():BH(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&ch(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),i=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,i,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(l=>l.$from.pos)),s=Math.max(...o.map(l=>l.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:i,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},gv=e=>new G({key:typeof e.pluginKey=="string"?new Q(e.pluginKey):e.pluginKey,view:t=>new FH({view:t,...e})}),hee=oe.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[gv({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var hs=R(ge(),1),OM=R(Xs(),1),DM=R(j(),1);var zH=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:i}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:s,state:a})=>{let{selection:l}=a,{$anchor:u,empty:c}=l,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(s,a,l,u)=>{let{composing:c}=s;if(c||!a&&!l)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&((a=this.element.parentNode)!=null&&a.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Cb(e,{textSerializers:cf(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(ih(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(oh(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(nh(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(lh(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(sh(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(rh(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(ah(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(uh(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(l=>l.$from.pos)),s=Math.max(...o.map(l=>l.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:i,to:s})}updatePosition(){let{selection:e}=this.editor.state,t=pf(this.view,e.from,e.to);ch({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:i})=>{this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},bv=e=>new G({key:typeof e.pluginKey=="string"?new Q(e.pluginKey):e.pluginKey,view:t=>new zH({view:t,...e})}),kee=oe.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[bv({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var za=R(ge(),1),LM=R(Xs(),1),PM=R(j(),1),IM=hs.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:i=null,getReferencedVirtualElement:s,options:a,children:l,...u},c)=>{let d=(0,hs.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=vf(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:i,getReferencedVirtualElement:s,options:a},m=(0,hs.useRef)(h);return m.current=h,(0,hs.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let g=gv({...m.current,editor:p,element:b});p.registerPlugin(g);let y=m.current.pluginKey;return()=>{p.unregisterPlugin(y),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,OM.createPortal)((0,DM.jsx)("div",{...u,children:l}),d.current)}),Nee=za.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:i,...s},a)=>{let l=(0,za.useRef)(document.createElement("div"));typeof a=="function"?a(l.current):a&&(a.current=l.current);let{editor:u}=vf();return(0,za.useEffect)(()=>{let c=l.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=bv({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,LM.createPortal)((0,PM.jsx)("div",{...s,children:i}),l.current)});var BM=document.createElement("style");BM.textContent=`/* Floating toolbar container */ +`?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},WH=ae.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new j({key:new Q("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return An.fromSchema(this.editor.schema).parseSlice(Ny(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),CM=ae.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=Jb.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new My(this.editor,this.options),serializer:new Ty(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[J7.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),WH.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var xi=M(pe());var Ry=["top","right","bottom","left"],wM=["start","end"],Dy=Ry.reduce((e,t)=>e.concat(t,t+"-"+wM[0],t+"-"+wM[1]),[]),zn=Math.min,Et=Math.max,Qu=Math.round;var or=e=>({x:e,y:e}),GH={left:"right",right:"left",bottom:"top",top:"bottom"},KH={start:"end",end:"start"};function fh(e,t,n){return Et(e,zn(t,n))}function Ar(e,t){return typeof e=="function"?e(t):e}function kn(e){return e.split("-")[0]}function Un(e){return e.split("-")[1]}function Oy(e){return e==="x"?"y":"x"}function ph(e){return e==="y"?"height":"width"}var jH=new Set(["top","bottom"]);function ar(e){return jH.has(kn(e))?"y":"x"}function hh(e){return Oy(ar(e))}function Py(e,t,n){n===void 0&&(n=!1);let r=Un(e),o=hh(e),a=ph(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Yu(i)),[i,Yu(i)]}function LM(e){let t=Yu(e);return[Ju(e),t,Ju(t)]}function Ju(e){return e.replace(/start|end/g,t=>KH[t])}var SM=["left","right"],EM=["right","left"],XH=["top","bottom"],ZH=["bottom","top"];function JH(e,t,n){switch(e){case"top":case"bottom":return n?t?EM:SM:t?SM:EM;case"left":case"right":return t?XH:ZH;default:return[]}}function IM(e,t,n,r){let o=Un(e),a=JH(kn(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Ju)))),a}function Yu(e){return e.replace(/left|right|bottom|top/g,t=>GH[t])}function YH(e){return{top:0,right:0,bottom:0,left:0,...e}}function mh(e){return typeof e!="number"?YH(e):{top:e,right:e,bottom:e,left:e}}function ho(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function _M(e,t,n){let{reference:r,floating:o}=e,a=ar(t),i=hh(t),s=ph(i),l=kn(t),u=a==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2,p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Un(t)){case"start":p[i]-=f*(n&&u?-1:1);break;case"end":p[i]+=f*(n&&u?-1:1);break}return p}var MM=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=_M(u,r,l),f=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=Ar(e,t)||{};if(u==null)return{};let d=mh(c),f={x:n,y:r},p=hh(o),h=ph(p),m=await i.getDimensions(u),b=p==="y",g=b?"top":"left",x=b?"bottom":"right",y=b?"clientHeight":"clientWidth",k=a.reference[h]+a.reference[p]-f[p]-a.floating[h],v=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),w=C?C[y]:0;(!w||!await(i.isElement==null?void 0:i.isElement(C)))&&(w=s.floating[y]||a.floating[h]);let S=k/2-v/2,I=w/2-m[h]/2-1,L=zn(d[g],I),H=zn(d[x],I),K=L,F=w-m[h]-H,U=w/2-m[h]/2+S,T=fh(K,U,F),E=!l.arrow&&Un(o)!=null&&U!==T&&a.reference[h]/2-(UUn(o)===e),...n.filter(o=>Un(o)!==e)]:n.filter(o=>kn(o)===o)).filter(o=>e?Un(o)===e||(t?Ju(o)!==o:!1):!0)}var RM=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;let{rects:a,middlewareData:i,placement:s,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=Dy,autoAlignment:p=!0,...h}=Ar(e,t),m=d!==void 0||f===Dy?QH(d||null,p,f):f,b=await hi(t,h),g=((n=i.autoPlacement)==null?void 0:n.index)||0,x=m[g];if(x==null)return{};let y=Py(x,a,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(s!==x)return{reset:{placement:m[0]}};let k=[b[kn(x)],b[y[0]],b[y[1]]],v=[...((r=i.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:k}],C=m[g+1];if(C)return{data:{index:g+1,overflows:v},reset:{placement:C}};let w=v.map(L=>{let H=Un(L.placement);return[L.placement,H&&c?L.overflows.slice(0,2).reduce((K,F)=>K+F,0):L.overflows[0],L.overflows]}).sort((L,H)=>L[1]-H[1]),I=((o=w.filter(L=>L[2].slice(0,Un(L[0])?2:3).every(H=>H<=0))[0])==null?void 0:o[0])||w[0][0];return I!==s?{data:{index:g+1,overflows:v},reset:{placement:I}}:{}}}},DM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=Ar(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let g=kn(o),x=ar(s),y=kn(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=f||(y||!m?[Yu(s)]:LM(s)),C=h!=="none";!f&&C&&v.push(...IM(s,m,h,k));let w=[s,...v],S=await hi(t,b),I=[],L=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&I.push(S[g]),d){let U=Py(o,i,k);I.push(S[U[0]],S[U[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(U=>U<=0)){var H,K;let U=(((H=a.flip)==null?void 0:H.index)||0)+1,T=w[U];if(T&&(!(d==="alignment"?x!==ar(T):!1)||L.every(P=>ar(P.placement)===x?P.overflows[0]>0:!0)))return{data:{index:U,overflows:L},reset:{placement:T}};let E=(K=L.filter(A=>A.overflows[0]<=0).sort((A,P)=>A.overflows[1]-P.overflows[1])[0])==null?void 0:K.placement;if(!E)switch(p){case"bestFit":{var F;let A=(F=L.filter(P=>{if(C){let W=ar(P.placement);return W===x||W==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(W=>W>0).reduce((W,N)=>W+N,0)]).sort((P,W)=>P[1]-W[1])[0])==null?void 0:F[0];A&&(E=A);break}case"initialPlacement":E=s;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function AM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TM(e){return Ry.some(t=>e[t]>=0)}var OM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=Ar(e,t);switch(r){case"referenceHidden":{let a=await hi(t,{...o,elementContext:"reference"}),i=AM(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:TM(i)}}}case"escaped":{let a=await hi(t,{...o,altBoundary:!0}),i=AM(a,n.floating);return{data:{escapedOffsets:i,escaped:TM(i)}}}default:return{}}}}};function PM(e){let t=zn(...e.map(a=>a.left)),n=zn(...e.map(a=>a.top)),r=Et(...e.map(a=>a.right)),o=Et(...e.map(a=>a.bottom));return{x:t,y:n,width:r-t,height:o-n}}function eq(e){let t=e.slice().sort((o,a)=>o.y-a.y),n=[],r=null;for(let o=0;or.height/2?n.push([a]):n[n.length-1].push(a),r=a}return n.map(o=>ho(PM(o)))}var BM=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:a,strategy:i}=t,{padding:s=2,x:l,y:u}=Ar(e,t),c=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=eq(c),f=ho(PM(c)),p=mh(s);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&u!=null)return d.find(b=>l>b.left-p.left&&lb.top-p.top&&u=2){if(ar(n)==="y"){let L=d[0],H=d[d.length-1],K=kn(n)==="top",F=L.top,U=H.bottom,T=K?L.left:H.left,E=K?L.right:H.right,A=E-T,P=U-F;return{top:F,bottom:U,left:T,right:E,width:A,height:P,x:T,y:F}}let b=kn(n)==="left",g=Et(...d.map(L=>L.right)),x=zn(...d.map(L=>L.left)),y=d.filter(L=>b?L.left===x:L.right===g),k=y[0].top,v=y[y.length-1].bottom,C=x,w=g,S=w-C,I=v-k;return{top:k,bottom:v,left:C,right:w,width:S,height:I,x:C,y:k}}return f}let m=await a.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:i});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},tq=new Set(["left","top"]);async function nq(e,t){let{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=kn(n),s=Un(n),l=ar(n)==="y",u=tq.has(i)?-1:1,c=a&&l?-1:1,d=Ar(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var FM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await nq(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},zM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:b=>{let{x:g,y:x}=b;return{x:g,y:x}}},...l}=Ar(e,t),u={x:n,y:r},c=await hi(t,l),d=ar(kn(o)),f=Oy(d),p=u[f],h=u[d];if(a){let b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+c[b],y=p-c[g];p=fh(x,p,y)}if(i){let b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+c[b],y=h-c[g];h=fh(x,h,y)}let m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}};var UM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=Ar(e,t),c=await hi(t,u),d=kn(o),f=Un(o),p=ar(o)==="y",{width:h,height:m}=a.floating,b,g;d==="top"||d==="bottom"?(b=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,b=f==="end"?"top":"bottom");let x=m-c.top-c.bottom,y=h-c.left-c.right,k=zn(m-c[b],x),v=zn(h-c[g],y),C=!t.middlewareData.shift,w=k,S=v;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),C&&!f){let L=Et(c.left,0),H=Et(c.right,0),K=Et(c.top,0),F=Et(c.bottom,0);p?S=h-2*(L!==0||H!==0?L+H:Et(c.left,c.right)):w=m-2*(K!==0||F!==0?K+F:Et(c.top,c.bottom))}await l({...t,availableWidth:S,availableHeight:w});let I=await i.getDimensions(s.floating);return h!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function bh(){return typeof window<"u"}function mi(e){return qM(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tr(e){var t;return(t=(qM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qM(e){return bh()?e instanceof Node||e instanceof un(e).Node:!1}function Hn(e){return bh()?e instanceof Element||e instanceof un(e).Element:!1}function ir(e){return bh()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function HM(e){return!bh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}var rq=new Set(["inline","contents"]);function $s(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!rq.has(o)}var oq=new Set(["table","td","th"]);function $M(e){return oq.has(mi(e))}var aq=[":popover-open",":modal"];function ec(e){return aq.some(t=>{try{return e.matches(t)}catch{return!1}})}var iq=["transform","translate","scale","rotate","perspective"],sq=["transform","translate","scale","rotate","perspective","filter"],lq=["paint","layout","strict","content"];function xh(e){let t=yh(),n=Hn(e)?qn(e):e;return iq.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||sq.some(r=>(n.willChange||"").includes(r))||lq.some(r=>(n.contain||"").includes(r))}function VM(e){let t=mo(e);for(;ir(t)&&!gi(t);){if(xh(t))return t;if(ec(t))return null;t=mo(t)}return null}function yh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var uq=new Set(["html","body","#document"]);function gi(e){return uq.has(mi(e))}function qn(e){return un(e).getComputedStyle(e)}function tc(e){return Hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mo(e){if(mi(e)==="html")return e;let t=e.assignedSlot||e.parentNode||HM(e)&&e.host||Tr(e);return HM(t)?t.host:t}function WM(e){let t=mo(e);return gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ir(t)&&$s(t)?t:WM(t)}function gh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=WM(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=un(o);if(a){let s=kh(i);return t.concat(i,i.visualViewport||[],$s(o)?o:[],s&&n?gh(s):[])}return t.concat(o,gh(o,[],n))}function kh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XM(e){let t=qn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ir(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Qu(n)!==a||Qu(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function ZM(e){return Hn(e)?e:e.contextElement}function Vs(e){let t=ZM(e);if(!ir(t))return or(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:a}=XM(t),i=(a?Qu(n.width):n.width)/r,s=(a?Qu(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var cq=or(0);function JM(e){let t=un(e);return!yh()||!t.visualViewport?cq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==un(e)?!1:t}function nc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),a=ZM(e),i=or(1);t&&(r?Hn(r)&&(i=Vs(r)):i=Vs(e));let s=dq(a,n,r)?JM(a):or(0),l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){let f=un(a),p=r&&Hn(r)?un(r):r,h=f,m=kh(h);for(;m&&r&&p!==h;){let b=Vs(m),g=m.getBoundingClientRect(),x=qn(m),y=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,k=g.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=y,u+=k,h=un(m),m=kh(h)}}return ho({width:c,height:d,x:l,y:u})}function vh(e,t){let n=tc(e).scrollLeft;return t?t.left+n:nc(Tr(e)).left+n}function YM(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vh(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function fq(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a=o==="fixed",i=Tr(r),s=t?ec(t.floating):!1;if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=or(1),c=or(0),d=ir(r);if((d||!d&&!a)&&((mi(r)!=="body"||$s(i))&&(l=tc(r)),ir(r))){let p=nc(r);u=Vs(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=i&&!d&&!a?YM(i,l):or(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function pq(e){return Array.from(e.getClientRects())}function hq(e){let t=Tr(e),n=tc(e),r=e.ownerDocument.body,o=Et(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Et(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+vh(e),s=-n.scrollTop;return qn(r).direction==="rtl"&&(i+=Et(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}var GM=25;function mq(e,t){let n=un(e),r=Tr(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let c=yh();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let u=vh(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=GM&&(a-=h)}else u<=GM&&(a+=u);return{width:a,height:i,x:s,y:l}}var gq=new Set(["absolute","fixed"]);function bq(e,t){let n=nc(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ir(e)?Vs(e):or(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function KM(e,t,n){let r;if(t==="viewport")r=mq(e,n);else if(t==="document")r=hq(Tr(e));else if(Hn(t))r=bq(t,n);else{let o=JM(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ho(r)}function QM(e,t){let n=mo(e);return n===t||!Hn(n)||gi(n)?!1:qn(n).position==="fixed"||QM(n,t)}function xq(e,t){let n=t.get(e);if(n)return n;let r=gh(e,[],!1).filter(s=>Hn(s)&&mi(s)!=="body"),o=null,a=qn(e).position==="fixed",i=a?mo(e):e;for(;Hn(i)&&!gi(i);){let s=qn(i),l=xh(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&gq.has(o.position)||$s(i)&&!l&&QM(e,i))?r=r.filter(c=>c!==i):o=s,i=mo(i)}return t.set(e,r),r}function yq(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?ec(t)?[]:xq(t,this._c):[].concat(n),r],s=i[0],l=i.reduce((u,c)=>{let d=KM(t,c,o);return u.top=Et(d.top,u.top),u.right=zn(d.right,u.right),u.bottom=zn(d.bottom,u.bottom),u.left=Et(d.left,u.left),u},KM(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kq(e){let{width:t,height:n}=XM(e);return{width:t,height:n}}function vq(e,t,n){let r=ir(t),o=Tr(t),a=n==="fixed",i=nc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=or(0);function u(){l.x=vh(o)}if(r||!r&&!a)if((mi(t)!=="body"||$s(o))&&(s=tc(t)),r){let p=nc(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();a&&!r&&o&&u();let c=o&&!r&&!a?YM(o,s):or(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function By(e){return qn(e).position==="static"}function jM(e,t){if(!ir(e)||qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Tr(e)===n&&(n=n.ownerDocument.body),n}function eN(e,t){let n=un(e);if(ec(e))return n;if(!ir(e)){let o=mo(e);for(;o&&!gi(o);){if(Hn(o)&&!By(o))return o;o=mo(o)}return n}let r=jM(e,t);for(;r&&$M(r)&&By(r);)r=jM(r,t);return r&&gi(r)&&By(r)&&!xh(r)?n:r||VM(e)||n}var Cq=async function(e){let t=this.getOffsetParent||eN,n=this.getDimensions,r=await n(e.floating);return{reference:vq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wq(e){return qn(e).direction==="rtl"}var Sq={convertOffsetParentRelativeRectToViewportRelativeRect:fq,getDocumentElement:Tr,getClippingRect:yq,getOffsetParent:eN,getElementRects:Cq,getClientRects:pq,getDimensions:kq,getScale:Vs,isElement:Hn,isRTL:wq};var Ch=FM,wh=RM,Sh=zM,Eh=DM,Lh=UM,Ih=OM,_h=NM,Ah=BM;var Th=(e,t,n)=>{let r=new Map,o={platform:Sq,...n},a={...o.platform,_c:r};return MM(e,t,{...o,platform:a})};function Eq(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left),i=Math.max(e.right,t.right)-o,s=r-n,l=o,u=n;return new DOMRect(l,u,i,s)}var Lq=class{constructor({editor:e,element:t,view:n,updateDelay:r=250,resizeDelay:o=60,shouldShow:a,appendTo:i,getReferencedVirtualElement:s,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:c,state:d,from:f,to:p})=>{let{doc:h,selection:m}=d,{empty:b}=m,g=!h.textBetween(f,p).length&&Sf(d.selection),x=this.element.contains(document.activeElement);return!(!(c.hasFocus()||x)||b||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}c?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(c.relatedTarget))||c?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(c,d)=>{let f=!d?.selection.eq(c.state.selection),p=!d?.doc.eq(c.state.doc);!f&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(c,f,p,d)},this.updateDelay))},this.updateHandler=(c,d,f,p)=>{let{composing:h}=c;if(h||!d&&!f)return;if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:c})=>{c.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var u;this.editor=e,this.element=t,this.view=n,this.updateDelay=r,this.resizeDelay=o,this.appendTo=i,this.scrollTarget=(u=l?.scrollTarget)!=null?u:window,this.getReferencedVirtualElement=s,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Eh(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(Sh(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(Ch(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(_h(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Lh(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(wh(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Ih(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Ah(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e;let{selection:t}=this.editor.state,n=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(n)return n;let r=Nf(this.view,t.from,t.to),o={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(t instanceof $){let a=this.view.nodeDOM(t.from),i=a.dataset.nodeViewWrapper?a:a.querySelector("[data-node-view-wrapper]");i&&(a=i),a&&(o={getBoundingClientRect:()=>a.getBoundingClientRect(),getClientRects:()=>[a.getBoundingClientRect()]})}if(t instanceof ke){let{$anchorCell:a,$headCell:i}=t,s=a?a.pos:i.pos,l=i?i.pos:a.pos,u=this.view.nodeDOM(s),c=this.view.nodeDOM(l);if(!u||!c)return;let d=u===c?u.getBoundingClientRect():Eq(u.getBoundingClientRect(),c.getBoundingClientRect());o={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return o}updatePosition(){let e=this.virtualElement;e&&Th(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,a,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,a=Math.min(...o.map(l=>l.$from.pos)),i=Math.max(...o.map(l=>l.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:a,to:i}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Fy=e=>new j({key:typeof e.pluginKey=="string"?new Q(e.pluginKey):e.pluginKey,view:t=>new Lq({view:t,...e})}),nne=ae.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Fy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var bi=M(pe(),1),tN=M(ts(),1),nN=M(G(),1);var Iq=class{constructor({editor:e,element:t,view:n,options:r,appendTo:o,shouldShow:a}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:i,state:s})=>{let{selection:l}=s,{$anchor:u,empty:c}=l,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!i.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(i,s,l,u)=>{let{composing:c}=i;if(c||!s&&!l)return;if(!this.getShouldShow(u)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:i})=>{var s;if(this.preventHide){this.preventHide=!1;return}i?.relatedTarget&&((s=this.element.parentNode)!=null&&s.contains(i.relatedTarget))||i?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=e,this.element=t,this.view=n,this.appendTo=o,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Kb(e,{textSerializers:Af(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Eh(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(Sh(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(Ch(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(_h(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Lh(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(wh(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(Ih(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Ah(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:o}=r,a=Math.min(...o.map(l=>l.$from.pos)),i=Math.max(...o.map(l=>l.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:a,to:i})}updatePosition(){let{selection:e}=this.editor.state,t=Nf(this.view,e.from,e.to);Th({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:o,strategy:a})=>{this.element.style.width="max-content",this.element.style.position=a,this.element.style.left=`${r}px`,this.element.style.top=`${o}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},zy=e=>new j({key:typeof e.pluginKey=="string"?new Q(e.pluginKey):e.pluginKey,view:t=>new Iq({view:t,...e})}),une=ae.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[zy({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var Ws=M(pe(),1),oN=M(ts(),1),aN=M(G(),1),rN=bi.default.forwardRef(({pluginKey:e="bubbleMenu",editor:t,updateDelay:n,resizeDelay:r,appendTo:o,shouldShow:a=null,getReferencedVirtualElement:i,options:s,children:l,...u},c)=>{let d=(0,bi.useRef)(document.createElement("div"));typeof c=="function"?c(d.current):c&&(c.current=d.current);let{editor:f}=zf(),p=t||f,h={updateDelay:n,resizeDelay:r,appendTo:o,pluginKey:e,shouldShow:a,getReferencedVirtualElement:i,options:s},m=(0,bi.useRef)(h);return m.current=h,(0,bi.useEffect)(()=>{if(p?.isDestroyed||!p)return;let b=d.current;b.style.visibility="hidden",b.style.position="absolute";let g=Fy({...m.current,editor:p,element:b});p.registerPlugin(g);let x=m.current.pluginKey;return()=>{p.unregisterPlugin(x),window.requestAnimationFrame(()=>{b.parentNode&&b.parentNode.removeChild(b)})}},[p]),(0,tN.createPortal)((0,nN.jsx)("div",{...u,children:l}),d.current)}),gne=Ws.default.forwardRef(({pluginKey:e="floatingMenu",editor:t,appendTo:n,shouldShow:r=null,options:o,children:a,...i},s)=>{let l=(0,Ws.useRef)(document.createElement("div"));typeof s=="function"?s(l.current):s&&(s.current=l.current);let{editor:u}=zf();return(0,Ws.useEffect)(()=>{let c=l.current;if(c.style.visibility="hidden",c.style.position="absolute",t?.isDestroyed||u?.isDestroyed)return;let d=t||u;if(!d)return;let f=zy({editor:d,element:c,pluginKey:e,appendTo:n,shouldShow:r,options:o});return d.registerPlugin(f),()=>{d.unregisterPlugin(e),window.requestAnimationFrame(()=>{c.parentNode&&c.parentNode.removeChild(c)})}},[t,u,n,e,r,o]),(0,oN.createPortal)((0,aN.jsx)("div",{...i,children:a}),l.current)});var iN=document.createElement("style");iN.textContent=`/* Floating toolbar container */ .toolbar_FloatingToolbar { display: flex; align-items: center; @@ -483,7 +483,7 @@ ${n.innerHTML} .linkButton_FloatingToolbar:active { background-color: var(--vscode-toolbar-activeBackground, #4a4a4a); } -`;document.head.appendChild(BM);var Ve={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var ee=R(j()),yv=({editor:e})=>{let[t,n]=(0,ms.useState)(!1),[r,o]=(0,ms.useState)(""),i=(0,ms.useRef)(null),{isBold:s,isItalic:a,isStrike:l,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=Lb({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,ms.useEffect)(()=>{if(t&&i.current){let b=e.getAttributes("link").href||"";o(b),i.current.focus(),i.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},m=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,ee.jsx)(IM,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:g})=>!(g.selection.empty||b.isActive("codeBlock")),children:(0,ee.jsx)("div",{className:Ve.toolbar,children:t?(0,ee.jsxs)("form",{onSubmit:p,className:Ve.linkForm,children:[(0,ee.jsx)("input",{ref:i,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Ve.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,ee.jsx)("button",{type:"submit",className:Ve.linkButton,title:"Apply",children:(0,ee.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ee.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,ee.jsx)("button",{type:"button",onClick:m,className:Ve.linkButton,title:"Remove link",children:(0,ee.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,ee.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,ee.jsx)("button",{type:"button",onClick:h,className:Ve.linkButton,title:"Cancel",children:(0,ee.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ee.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Ve.button} ${s?Ve.active:""}`,title:"Bold (Cmd+B)",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,ee.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,ee.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Ve.button} ${a?Ve.active:""}`,title:"Italic (Cmd+I)",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,ee.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,ee.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Ve.button} ${l?Ve.active:""}`,title:"Strikethrough",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,ee.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,ee.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,ee.jsx)("div",{className:Ve.divider}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Ve.button} ${u?Ve.active:""}`,title:"Inline Code",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,ee.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Ve.button} ${c?Ve.active:""}`,title:"Link (Cmd+K)",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,ee.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,ee.jsx)("div",{className:Ve.divider}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Ve.button} ${d?Ve.active:""}`,title:"Code Block",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,ee.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,ee.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Ve.button} ${f?Ve.active:""}`,title:"Quote",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,ee.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Zt=R(ge());function UH(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=e,l=r&&!o,u=FS(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=o?"":u,p=l?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=a.nodeBefore)==null?void 0:t.isText)&&a.nodeBefore.text;if(!h)return null;let m=a.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let g=b.input.slice(Math.max(0,b.index-1),b.index),y=new RegExp(`^[${i?.join("")}\0]?$`).test(g);if(i!==null&&!y)return null;let v=m+b.index,x=v+b[0].length;return l&&c.test(h.slice(x-1,x+1))&&(b[0]+=" ",x+=1),v=a.pos?{range:{from:v,to:x},query:b[0].slice(n.length),text:b[0]}:null}var HH=new Q("suggestion");function $H({pluginKey:e=HH,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:m=UH}){let b,g=p?.(),y=()=>{let w=t.state.selection.$anchor.pos,E=t.view.coordsAtPos(w),{top:_,right:T,bottom:C,left:H}=E;try{return new DOMRect(H,_,T-H,C-_)}catch{return null}},v=(w,E)=>E?()=>{let _=e.getState(t.state),T=_?.decorationId,C=w.dom.querySelector(`[data-decoration-id="${T}"]`);return C?.getBoundingClientRect()||null}:y;function x(w,E){var _;try{let C=e.getState(w.state),H=C?.decorationId?w.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null,K={editor:t,range:C?.range||{from:0,to:0},query:C?.query||null,text:C?.text||null,items:[],command:F=>d({editor:t,range:C?.range||{from:0,to:0},props:F}),decorationNode:H,clientRect:v(w,H)};(_=g?.onExit)==null||_.call(g,K)}catch{}let T=w.state.tr.setMeta(E,{exit:!0});w.dispatch(T)}let k=new G({key:e,view(){return{update:async(w,E)=>{var _,T,C,H,K,F,U;let M=(_=this.key)==null?void 0:_.getState(E),S=(T=this.key)==null?void 0:T.getState(w.state),A=M.active&&S.active&&M.range.from!==S.range.from,P=!M.active&&S.active,W=M.active&&!S.active,O=!P&&!W&&M.query!==S.query,le=P||A&&O,ke=O||A,Ct=W||A&&O;if(!le&&!ke&&!Ct)return;let Ke=Ct&&!le?M:S,Tt=w.dom.querySelector(`[data-decoration-id="${Ke.decorationId}"]`);b={editor:t,range:Ke.range,query:Ke.query,text:Ke.text,items:[],command:xo=>d({editor:t,range:Ke.range,props:xo}),decorationNode:Tt,clientRect:v(w,Tt)},le&&((C=g?.onBeforeStart)==null||C.call(g,b)),ke&&((H=g?.onBeforeUpdate)==null||H.call(g,b)),(ke||le)&&(b.items=await f({editor:t,query:Ke.query})),Ct&&((K=g?.onExit)==null||K.call(g,b)),ke&&((F=g?.onUpdate)==null||F.call(g,b)),le&&((U=g?.onStart)==null||U.call(g,b))},destroy:()=>{var w;b&&((w=g?.onExit)==null||w.call(g,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(w,E,_,T){let{isEditable:C}=t,{composing:H}=t.view,{selection:K}=w,{empty:F,from:U}=K,M={...E},S=w.getMeta(e);if(S&&S.exit)return M.active=!1,M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null,M;if(M.composing=H,C&&(F||t.view.composing)){(UE.range.to)&&!H&&!E.composing&&(M.active=!1);let A=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:K.$from}),P=`id_${Math.floor(Math.random()*4294967295)}`;A&&h({editor:t,state:T,range:A.range,isActive:E.active})?(M.active=!0,M.decorationId=E.decorationId?E.decorationId:P,M.range=A.range,M.query=A.query,M.text=A.text):M.active=!1}else M.active=!1;return M.active||(M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null),M}},props:{handleKeyDown(w,E){var _,T,C,H;let{active:K,range:F}=k.getState(w.state);if(!K)return!1;if(E.key==="Escape"||E.key==="Esc"){let M=k.getState(w.state),S=(_=b?.decorationNode)!=null?_:null,A=S??(M?.decorationId?w.dom.querySelector(`[data-decoration-id="${M.decorationId}"]`):null);if(((T=g?.onKeyDown)==null?void 0:T.call(g,{view:w,event:E,range:M.range}))||!1)return!0;let W={editor:t,range:M.range,query:M.query,text:M.text,items:[],command:O=>d({editor:t,range:M.range,props:O}),decorationNode:A,clientRect:A?()=>A.getBoundingClientRect()||null:null};return(C=g?.onExit)==null||C.call(g,W),x(w,e),!0}return((H=g?.onKeyDown)==null?void 0:H.call(g,{view:w,event:E,range:F}))||!1},decorations(w){let{active:E,range:_,decorationId:T,query:C}=k.getState(w);if(!E)return null;let H=!C?.length,K=[l];return H&&K.push(c),_e.create(w.doc,[ze.inline(_.from,_.to,{nodeName:a,class:K.join(" "),"data-decoration-id":T,"data-decoration-content":u})])}}});return k}var FM=$H;var zM=document.createElement("style");zM.textContent=`/* Command list container */ +`;document.head.appendChild(iN);var Ve={toolbar:"toolbar_FloatingToolbar",button:"button_FloatingToolbar",active:"active_FloatingToolbar",divider:"divider_FloatingToolbar",linkForm:"linkForm_FloatingToolbar",linkInput:"linkInput_FloatingToolbar",linkButton:"linkButton_FloatingToolbar"};var ee=M(G()),Uy=({editor:e})=>{let[t,n]=(0,xi.useState)(!1),[r,o]=(0,xi.useState)(""),a=(0,xi.useRef)(null),{isBold:i,isItalic:s,isStrike:l,isCode:u,isLink:c,isCodeBlock:d,isBlockquote:f}=r1({editor:e,selector:b=>({isBold:b.editor.isActive("bold"),isItalic:b.editor.isActive("italic"),isStrike:b.editor.isActive("strike"),isCode:b.editor.isActive("code"),isLink:b.editor.isActive("link"),isCodeBlock:b.editor.isActive("codeBlock"),isBlockquote:b.editor.isActive("blockquote")})});(0,xi.useEffect)(()=>{if(t&&a.current){let b=e.getAttributes("link").href||"";o(b),a.current.focus(),a.current.select()}},[t,e]);let p=b=>{b.preventDefault(),r.trim()===""?e.chain().focus().extendMarkRange("link").unsetLink().run():e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),n(!1),o("")},h=()=>{n(!1),o(""),e.chain().focus().run()},m=()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),n(!1),o("")};return e?(0,ee.jsx)(rN,{editor:e,options:{placement:"top",offset:8,flip:!0},shouldShow:({editor:b,state:g})=>!(g.selection.empty||b.isActive("codeBlock")),children:(0,ee.jsx)("div",{className:Ve.toolbar,children:t?(0,ee.jsxs)("form",{onSubmit:p,className:Ve.linkForm,children:[(0,ee.jsx)("input",{ref:a,type:"url",value:r,onChange:b=>o(b.target.value),placeholder:"https://example.com",className:Ve.linkInput,onKeyDown:b=>{b.key==="Escape"&&h()}}),(0,ee.jsx)("button",{type:"submit",className:Ve.linkButton,title:"Apply",children:(0,ee.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ee.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),c&&(0,ee.jsx)("button",{type:"button",onClick:m,className:Ve.linkButton,title:"Remove link",children:(0,ee.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,ee.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,ee.jsx)("button",{type:"button",onClick:h,className:Ve.linkButton,title:"Cancel",children:(0,ee.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ee.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})})]}):(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBold().run(),className:`${Ve.button} ${i?Ve.active:""}`,title:"Bold (Cmd+B)",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,ee.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,ee.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleItalic().run(),className:`${Ve.button} ${s?Ve.active:""}`,title:"Italic (Cmd+I)",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),(0,ee.jsx)("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),(0,ee.jsx)("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleStrike().run(),className:`${Ve.button} ${l?Ve.active:""}`,title:"Strikethrough",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,ee.jsx)("path",{d:"M16 6C16 6 14.5 4 12 4C9.5 4 7 5.5 7 8C7 10.5 9 11 12 12"}),(0,ee.jsx)("path",{d:"M8 18C8 18 9.5 20 12 20C14.5 20 17 18.5 17 16C17 13.5 15 13 12 12"})]})}),(0,ee.jsx)("div",{className:Ve.divider}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCode().run(),className:`${Ve.button} ${u?Ve.active:""}`,title:"Inline Code",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,ee.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>n(!0),className:`${Ve.button} ${c?Ve.active:""}`,title:"Link (Cmd+K)",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,ee.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),(0,ee.jsx)("div",{className:Ve.divider}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleCodeBlock().run(),className:`${Ve.button} ${d?Ve.active:""}`,title:"Code Block",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,ee.jsx)("polyline",{points:"9 10 7 12 9 14"}),(0,ee.jsx)("polyline",{points:"15 10 17 12 15 14"})]})}),(0,ee.jsx)("button",{type:"button",onClick:()=>e.chain().focus().toggleBlockquote().run(),className:`${Ve.button} ${f?Ve.active:""}`,title:"Quote",children:(0,ee.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,ee.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,ee.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]})})]})})}):null};var Yt=M(pe());function _q(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:a,startOfLine:i,$position:s}=e,l=r&&!o,u=cL(n),c=new RegExp(`\\s${u}$`),d=i?"^":"",f=o?"":u,p=l?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((t=s.nodeBefore)==null?void 0:t.isText)&&s.nodeBefore.text;if(!h)return null;let m=s.pos-h.length,b=Array.from(h.matchAll(p)).pop();if(!b||b.input===void 0||b.index===void 0)return null;let g=b.input.slice(Math.max(0,b.index-1),b.index),x=new RegExp(`^[${a?.join("")}\0]?$`).test(g);if(a!==null&&!x)return null;let y=m+b.index,k=y+b[0].length;return l&&c.test(h.slice(k-1,k+1))&&(b[0]+=" ",k+=1),y=s.pos?{range:{from:y,to:k},query:b[0].slice(n.length),text:b[0]}:null}var Aq=new Q("suggestion");function Tq({pluginKey:e=Aq,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:a=[" "],startOfLine:i=!1,decorationTag:s="span",decorationClass:l="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:h=()=>!0,findSuggestionMatch:m=_q}){let b,g=p?.(),x=()=>{let C=t.state.selection.$anchor.pos,w=t.view.coordsAtPos(C),{top:S,right:I,bottom:L,left:H}=w;try{return new DOMRect(H,S,I-H,L-S)}catch{return null}},y=(C,w)=>w?()=>{let S=e.getState(t.state),I=S?.decorationId,L=C.dom.querySelector(`[data-decoration-id="${I}"]`);return L?.getBoundingClientRect()||null}:x;function k(C,w){var S;try{let L=e.getState(C.state),H=L?.decorationId?C.dom.querySelector(`[data-decoration-id="${L.decorationId}"]`):null,K={editor:t,range:L?.range||{from:0,to:0},query:L?.query||null,text:L?.text||null,items:[],command:F=>d({editor:t,range:L?.range||{from:0,to:0},props:F}),decorationNode:H,clientRect:y(C,H)};(S=g?.onExit)==null||S.call(g,K)}catch{}let I=C.state.tr.setMeta(w,{exit:!0});C.dispatch(I)}let v=new j({key:e,view(){return{update:async(C,w)=>{var S,I,L,H,K,F,U;let T=(S=this.key)==null?void 0:S.getState(w),E=(I=this.key)==null?void 0:I.getState(C.state),A=T.active&&E.active&&T.range.from!==E.range.from,P=!T.active&&E.active,W=T.active&&!E.active,N=!P&&!W&&T.query!==E.query,le=P||A&&N,Ce=N||A,It=W||A&&N;if(!le&&!Ce&&!It)return;let je=It&&!le?T:E,_t=C.dom.querySelector(`[data-decoration-id="${je.decorationId}"]`);b={editor:t,range:je.range,query:je.query,text:je.text,items:[],command:vo=>d({editor:t,range:je.range,props:vo}),decorationNode:_t,clientRect:y(C,_t)},le&&((L=g?.onBeforeStart)==null||L.call(g,b)),Ce&&((H=g?.onBeforeUpdate)==null||H.call(g,b)),(Ce||le)&&(b.items=await f({editor:t,query:je.query})),It&&((K=g?.onExit)==null||K.call(g,b)),Ce&&((F=g?.onUpdate)==null||F.call(g,b)),le&&((U=g?.onStart)==null||U.call(g,b))},destroy:()=>{var C;b&&((C=g?.onExit)==null||C.call(g,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(C,w,S,I){let{isEditable:L}=t,{composing:H}=t.view,{selection:K}=C,{empty:F,from:U}=K,T={...w},E=C.getMeta(e);if(E&&E.exit)return T.active=!1,T.decorationId=null,T.range={from:0,to:0},T.query=null,T.text=null,T;if(T.composing=H,L&&(F||t.view.composing)){(Uw.range.to)&&!H&&!w.composing&&(T.active=!1);let A=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:a,startOfLine:i,$position:K.$from}),P=`id_${Math.floor(Math.random()*4294967295)}`;A&&h({editor:t,state:I,range:A.range,isActive:w.active})?(T.active=!0,T.decorationId=w.decorationId?w.decorationId:P,T.range=A.range,T.query=A.query,T.text=A.text):T.active=!1}else T.active=!1;return T.active||(T.decorationId=null,T.range={from:0,to:0},T.query=null,T.text=null),T}},props:{handleKeyDown(C,w){var S,I,L,H;let{active:K,range:F}=v.getState(C.state);if(!K)return!1;if(w.key==="Escape"||w.key==="Esc"){let T=v.getState(C.state),E=(S=b?.decorationNode)!=null?S:null,A=E??(T?.decorationId?C.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`):null);if(((I=g?.onKeyDown)==null?void 0:I.call(g,{view:C,event:w,range:T.range}))||!1)return!0;let W={editor:t,range:T.range,query:T.query,text:T.text,items:[],command:N=>d({editor:t,range:T.range,props:N}),decorationNode:A,clientRect:A?()=>A.getBoundingClientRect()||null:null};return(L=g?.onExit)==null||L.call(g,W),k(C,e),!0}return((H=g?.onKeyDown)==null?void 0:H.call(g,{view:C,event:w,range:F}))||!1},decorations(C){let{active:w,range:S,decorationId:I,query:L}=v.getState(C);if(!w)return null;let H=!L?.length,K=[l];return H&&K.push(c),Ee.create(C.doc,[Ue.inline(S.from,S.to,{nodeName:s,class:K.join(" "),"data-decoration-id":I,"data-decoration-content":u})])}}});return v}var sN=Tq;var lN=document.createElement("style");lN.textContent=`/* Command list container */ .commandList_SlashCommands { display: flex; flex-direction: column; @@ -607,7 +607,7 @@ ${n.innerHTML} -`;document.head.appendChild(zM);var Mr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var Y=R(j()),qH=[{title:"Heading 1",description:"Large section heading",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("path",{d:"M4 12h8"}),(0,Y.jsx)("path",{d:"M4 18V6"}),(0,Y.jsx)("path",{d:"M12 18V6"}),(0,Y.jsx)("path",{d:"M17 10v8"}),(0,Y.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("path",{d:"M4 12h8"}),(0,Y.jsx)("path",{d:"M4 18V6"}),(0,Y.jsx)("path",{d:"M12 18V6"}),(0,Y.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("path",{d:"M4 12h8"}),(0,Y.jsx)("path",{d:"M4 18V6"}),(0,Y.jsx)("path",{d:"M12 18V6"}),(0,Y.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,Y.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,Y.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,Y.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,Y.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,Y.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,Y.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,Y.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,Y.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,Y.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,Y.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,Y.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,Y.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,Y.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,Y.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,Y.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,Y.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,Y.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,Y.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Y.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,Y.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Y.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,Y.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,Y.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,Y.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,Y.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],UM=(0,Zt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,i]=(0,Zt.useState)(0),s=(0,Zt.useRef)(null),[a,l]=(0,Zt.useState)({top:0,left:0});(0,Zt.useEffect)(()=>{i(0)},[e]),(0,Zt.useEffect)(()=>{if(n){let c=n();c&&l({top:c.bottom+4,left:c.left})}},[n]),(0,Zt.useEffect)(()=>{let c=s.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Zt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Zt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(i(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(i(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,Y.jsx)("div",{className:Mr.commandList,style:{position:"fixed",top:`${a.top}px`,left:`${a.left}px`},children:(0,Y.jsx)("div",{className:Mr.noResults,children:"No commands found"})}):(0,Y.jsx)("div",{className:Mr.commandList,ref:s,style:{position:"fixed",top:`${a.top}px`,left:`${a.left}px`},children:e.map((c,d)=>(0,Y.jsxs)("button",{type:"button",className:`${Mr.commandItem} ${d===o?Mr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>i(d),children:[(0,Y.jsx)("div",{className:Mr.commandIcon,children:c.icon}),(0,Y.jsxs)("div",{className:Mr.commandContent,children:[(0,Y.jsx)("div",{className:Mr.commandTitle,children:c.title}),(0,Y.jsx)("div",{className:Mr.commandDescription,children:c.description})]})]},c.title))})});UM.displayName="CommandList";var VH=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new Pb(UM,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},WH={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>qH.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:VH,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},vv=oe.create({name:"slashCommands",addOptions(){return{suggestion:WH}},addProseMirrorPlugins(){return[FM({editor:this.editor,...this.options.suggestion})]}});var xh=R(ge());var HM=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var mo=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};mo.prototype.normal={};mo.prototype.property={};mo.prototype.space=void 0;function xv(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new mo(n,r,t)}function Uu(e){return e.toLowerCase()}var gt=class{constructor(t,n){this.attribute=n,this.property=t}};gt.prototype.attribute="";gt.prototype.booleanish=!1;gt.prototype.boolean=!1;gt.prototype.commaOrSpaceSeparated=!1;gt.prototype.commaSeparated=!1;gt.prototype.defined=!1;gt.prototype.mustUseProperty=!1;gt.prototype.number=!1;gt.prototype.overloadedBoolean=!1;gt.prototype.property="";gt.prototype.spaceSeparated=!1;gt.prototype.space=void 0;var Hu={};qa(Hu,{boolean:()=>ie,booleanish:()=>Xe,commaOrSpaceSeparated:()=>un,commaSeparated:()=>di,number:()=>D,overloadedBoolean:()=>dh,spaceSeparated:()=>Se});var jH=0,ie=gs(),Xe=gs(),dh=gs(),D=gs(),Se=gs(),di=gs(),un=gs();function gs(){return 2**++jH}var kv=Object.keys(Hu),bs=class extends gt{constructor(t,n,r,o){let i=-1;if(super(t,n),$M(this,"space",o),typeof r=="number")for(;++i4&&n.slice(0,4)==="data"&&GH.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(WM,JH);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!WM.test(i)){let s=i.replace(KH,YH);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=bs}return new o(r,t)}function YH(e){return"-"+e.toLowerCase()}function JH(e){return e.charAt(1).toUpperCase()}var jM=xv([wv,qM,Ev,_v,Sv],"html"),hh=xv([wv,VM,Ev,_v,Sv],"svg");var KM={}.hasOwnProperty;function GM(e,t){let n=t||{};function r(o,...i){let s=r.invalid,a=r.handlers;if(o&&KM.call(o,e)){let l=String(o[e]);s=KM.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var ZH=/["&'<>`]/g,XH=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,QH=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,e$=/[|\\{}()[\]^$+*?.]/g,YM=new WeakMap;function JM(e,t){if(e=e.replace(t.subset?t$(t.subset):ZH,r),t.subset||t.escapeOnly)return e;return e.replace(XH,n).replace(QH,r);function n(o,i,s){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(o,i,s){return t.format(o.charCodeAt(0),s.charCodeAt(i+1),t)}}function t$(e){let t=YM.get(e);return t||(t=n$(e),YM.set(e,t)),t}function n$(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var eR=["cent","copy","divide","gt","lt","not","para","times"];var tR={}.hasOwnProperty,Tv={},gh;for(gh in mh)tR.call(mh,gh)&&(Tv[mh[gh]]=gh);var i$=/[^\dA-Za-z]/;function nR(e,t,n,r){let o=String.fromCharCode(e);if(tR.call(Tv,o)){let i=Tv[o],s="&"+i;return n&&QM.includes(i)&&!eR.includes(i)&&(!r||t&&t!==61&&i$.test(String.fromCharCode(t)))?s:s+";"}return""}function rR(e,t,n){let r=ZM(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=nR(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i=XM(e,t,n.omitOptionalSemicolons);i.length|^->||--!>|"],l$=["<",">"];function oR(e,t,n,r){return r.settings.bogusComments?"":"";function o(i){return go(i,Object.assign({},r.settings.characterReferences,{subset:l$}))}}function iR(e,t,n,r){return""}function Nv(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function sR(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function aR(e){return e.join(" ").trim()}var u$=/[ \t\n\f\r]/g;function ys(e){return typeof e=="object"?e.type==="text"?lR(e.value):!1:lR(e)}function lR(e){return e.replace(u$,"")===""}var tt=uR(1),Av=uR(-1),c$=[];function uR(e){return t;function t(n,r,o){let i=n?n.children:c$,s=(r||0)+e,a=i[s];if(!o)for(;a&&ys(a);)s+=e,a=i[s];return a}}var d$={}.hasOwnProperty;function bh(e){return t;function t(n,r,o){return d$.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var $u=bh({body:p$,caption:Mv,colgroup:Mv,dd:b$,dt:g$,head:Mv,html:f$,li:m$,optgroup:y$,option:v$,p:h$,rp:cR,rt:cR,tbody:k$,td:dR,tfoot:w$,th:dR,thead:x$,tr:E$});function Mv(e,t,n){let r=tt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ys(r.value.charAt(0)))}function f$(e,t,n){let r=tt(n,t);return!r||r.type!=="comment"}function p$(e,t,n){let r=tt(n,t);return!r||r.type!=="comment"}function h$(e,t,n){let r=tt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function m$(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function g$(e,t,n){let r=tt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function b$(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function cR(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function y$(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function v$(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function x$(e,t,n){let r=tt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function k$(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function w$(e,t,n){return!tt(n,t)}function E$(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function dR(e,t,n){let r=tt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var fR=bh({body:C$,colgroup:T$,head:S$,html:_$,tbody:N$});function _$(e){let t=tt(e,-1);return!t||t.type!=="comment"}function S$(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function C$(e){let t=tt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&ys(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function T$(e,t,n){let r=Av(n,t),o=tt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&$u(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function N$(e,t,n){let r=Av(n,t),o=tt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&$u(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var yh={name:[[` +`;document.head.appendChild(lN);var Mr={commandList:"commandList_SlashCommands",commandItem:"commandItem_SlashCommands",selected:"selected_SlashCommands",commandIcon:"commandIcon_SlashCommands",commandContent:"commandContent_SlashCommands",commandTitle:"commandTitle_SlashCommands",commandDescription:"commandDescription_SlashCommands",noResults:"noResults_SlashCommands","tippy-box":"tippy-box_SlashCommands","tippy-content":"tippy-content_SlashCommands"};var X=M(G()),Mq=[{title:"Heading 1",description:"Large section heading",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M4 12h8"}),(0,X.jsx)("path",{d:"M4 18V6"}),(0,X.jsx)("path",{d:"M12 18V6"}),(0,X.jsx)("path",{d:"M17 10v8"}),(0,X.jsx)("path",{d:"M17 10l3-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:1}).run()}},{title:"Heading 2",description:"Medium section heading",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M4 12h8"}),(0,X.jsx)("path",{d:"M4 18V6"}),(0,X.jsx)("path",{d:"M12 18V6"}),(0,X.jsx)("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:2}).run()}},{title:"Heading 3",description:"Small section heading",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M4 12h8"}),(0,X.jsx)("path",{d:"M4 18V6"}),(0,X.jsx)("path",{d:"M12 18V6"}),(0,X.jsx)("path",{d:"M17.5 10.5c1.5-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),(0,X.jsx)("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHeading({level:3}).run()}},{title:"Bullet List",description:"Create a bulleted list",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,X.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,X.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,X.jsx)("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),(0,X.jsx)("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),(0,X.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a numbered list",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),(0,X.jsx)("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),(0,X.jsx)("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),(0,X.jsx)("text",{x:"3",y:"8",fontSize:"8",fill:"currentColor",stroke:"none",children:"1"}),(0,X.jsx)("text",{x:"3",y:"14",fontSize:"8",fill:"currentColor",stroke:"none",children:"2"}),(0,X.jsx)("text",{x:"3",y:"20",fontSize:"8",fill:"currentColor",stroke:"none",children:"3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Task List",description:"Create a task checklist",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("rect",{x:"3",y:"5",width:"6",height:"6",rx:"1"}),(0,X.jsx)("path",{d:"M5 11l1 1 2-2"}),(0,X.jsx)("rect",{x:"3",y:"13",width:"6",height:"6",rx:"1"}),(0,X.jsx)("line",{x1:"12",y1:"8",x2:"21",y2:"8"}),(0,X.jsx)("line",{x1:"12",y1:"16",x2:"21",y2:"16"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Code Block",description:"Add a code snippet",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,X.jsx)("polyline",{points:"8 6 2 12 8 18"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleCodeBlock().run()}},{title:"Quote",description:"Add a blockquote",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"}),(0,X.jsx)("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).toggleBlockquote().run()}},{title:"Divider",description:"Add a horizontal rule",icon:(0,X.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,X.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).setHorizontalRule().run()}},{title:"Table",description:"Insert a table",icon:(0,X.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,X.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,X.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),(0,X.jsx)("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),(0,X.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"21"}),(0,X.jsx)("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),command:({editor:e,range:t})=>{e.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}],uN=(0,Yt.forwardRef)(({items:e,command:t,clientRect:n},r)=>{let[o,a]=(0,Yt.useState)(0),i=(0,Yt.useRef)(null),[s,l]=(0,Yt.useState)({top:0,left:0});(0,Yt.useEffect)(()=>{a(0)},[e]),(0,Yt.useEffect)(()=>{if(n){let c=n();c&&l({top:c.bottom+4,left:c.left})}},[n]),(0,Yt.useEffect)(()=>{let c=i.current;if(!c)return;let d=c.children[o];d&&d.scrollIntoView({block:"nearest"})},[o]);let u=(0,Yt.useCallback)(c=>{let d=e[c];d&&t(d)},[e,t]);return(0,Yt.useImperativeHandle)(r,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(a(d=>(d+e.length-1)%e.length),!0):c.key==="ArrowDown"?(a(d=>(d+1)%e.length),!0):c.key==="Enter"?(u(o),!0):!1})),e.length===0?(0,X.jsx)("div",{className:Mr.commandList,style:{position:"fixed",top:`${s.top}px`,left:`${s.left}px`},children:(0,X.jsx)("div",{className:Mr.noResults,children:"No commands found"})}):(0,X.jsx)("div",{className:Mr.commandList,ref:i,style:{position:"fixed",top:`${s.top}px`,left:`${s.left}px`},children:e.map((c,d)=>(0,X.jsxs)("button",{type:"button",className:`${Mr.commandItem} ${d===o?Mr.selected:""}`,onClick:()=>u(d),onMouseEnter:()=>a(d),children:[(0,X.jsx)("div",{className:Mr.commandIcon,children:c.icon}),(0,X.jsxs)("div",{className:Mr.commandContent,children:[(0,X.jsx)("div",{className:Mr.commandTitle,children:c.title}),(0,X.jsx)("div",{className:Mr.commandDescription,children:c.description})]})]},c.title))})});uN.displayName="CommandList";var Nq=()=>{let e=null,t=null;return{onStart:n=>{t=document.createElement("div"),t.style.position="fixed",t.style.zIndex="9999",document.body.appendChild(t),e=new o1(uN,{props:{items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect},editor:n.editor}),t&&e.element&&t.appendChild(e.element)},onUpdate:n=>{e&&e.updateProps({items:n.items,command:n.command,editor:n.editor,clientRect:n.clientRect})},onKeyDown:n=>n.event.key==="Escape"?(t?.remove(),e?.destroy(),t=null,e=null,!0):e?.ref?.onKeyDown(n)??!1,onExit:()=>{t?.remove(),e?.destroy(),t=null,e=null}}},Rq={char:"/",startOfLine:!1,allowSpaces:!1,items:({query:e})=>Mq.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())),render:Nq,command:({editor:e,range:t,props:n})=>{n.command({editor:e,range:t})}},Hy=ae.create({name:"slashCommands",addOptions(){return{suggestion:Rq}},addProseMirrorPlugins(){return[sN({editor:this.editor,...this.options.suggestion})]}});var Uh=M(pe());var cN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var go=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};go.prototype.normal={};go.prototype.property={};go.prototype.space=void 0;function qy(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new go(n,r,t)}function rc(e){return e.toLowerCase()}var bt=class{constructor(t,n){this.attribute=n,this.property=t}};bt.prototype.attribute="";bt.prototype.booleanish=!1;bt.prototype.boolean=!1;bt.prototype.commaOrSpaceSeparated=!1;bt.prototype.commaSeparated=!1;bt.prototype.defined=!1;bt.prototype.mustUseProperty=!1;bt.prototype.number=!1;bt.prototype.overloadedBoolean=!1;bt.prototype.property="";bt.prototype.spaceSeparated=!1;bt.prototype.space=void 0;var oc={};Xs(oc,{boolean:()=>ie,booleanish:()=>Qe,commaOrSpaceSeparated:()=>cn,commaSeparated:()=>ma,number:()=>R,overloadedBoolean:()=>Mh,spaceSeparated:()=>Le});var Dq=0,ie=yi(),Qe=yi(),Mh=yi(),R=yi(),Le=yi(),ma=yi(),cn=yi();function yi(){return 2**++Dq}var $y=Object.keys(oc),ki=class extends bt{constructor(t,n,r,o){let a=-1;if(super(t,n),dN(this,"space",o),typeof r=="number")for(;++a<$y.length;){let i=$y[a];dN(this,$y[a],(r&oc[i])===oc[i])}}};ki.prototype.defined=!0;function dN(e,t,n){n&&(e[t]=n)}function $n(e){let t={},n={};for(let[r,o]of Object.entries(e.properties)){let a=new ki(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rc(r)]=r,n[rc(a.attribute)]=r}return new go(t,n,e.space)}var Vy=$n({properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:Le,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:R,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:Le,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:Qe,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nh(e,t){return t in e?e[t]:t}function Rh(e,t){return Nh(e,t.toLowerCase())}var fN=$n({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ma,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:ie,allowPaymentRequest:ie,allowUserMedia:ie,alt:null,as:null,async:ie,autoCapitalize:null,autoComplete:Le,autoFocus:ie,autoPlay:ie,blocking:Le,capture:null,charSet:null,checked:ie,cite:null,className:Le,cols:R,colSpan:null,content:null,contentEditable:Qe,controls:ie,controlsList:Le,coords:R|ma,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ie,defer:ie,dir:null,dirName:null,disabled:ie,download:Mh,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ie,formTarget:null,headers:Le,height:R,hidden:Mh,high:R,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:ie,inputMode:null,integrity:null,is:null,isMap:ie,itemId:null,itemProp:Le,itemRef:Le,itemScope:ie,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ie,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:ie,muted:ie,name:null,nonce:null,noModule:ie,noValidate:ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ie,optimum:R,pattern:null,ping:Le,placeholder:null,playsInline:ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ie,referrerPolicy:null,rel:Le,required:ie,reversed:ie,rows:R,rowSpan:R,sandbox:Le,scope:null,scoped:ie,seamless:ie,selected:ie,shadowRootClonable:ie,shadowRootDelegatesFocus:ie,shadowRootMode:null,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:ie,useMap:null,value:Qe,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ie,declare:ie,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:ie,noHref:ie,noShade:ie,noWrap:ie,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ie,disableRemotePlayback:ie,prefix:null,property:null,results:R,security:null,unselectable:null},space:"html",transform:Rh});var pN=$n({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:cn,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:Le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ma,g2:ma,glyphName:ma,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cn,rev:cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cn,requiredFeatures:cn,requiredFonts:cn,requiredFormats:cn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cn,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nh});var Wy=$n({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var Gy=$n({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rh});var Ky=$n({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var Oq=/[A-Z]/g,hN=/-[a-z]/g,Pq=/^data[-\w.:]+$/i;function jy(e,t){let n=rc(t),r=t,o=bt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Pq.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(hN,Fq);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!hN.test(a)){let i=a.replace(Oq,Bq);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ki}return new o(r,t)}function Bq(e){return"-"+e.toLowerCase()}function Fq(e){return e.charAt(1).toUpperCase()}var mN=qy([Vy,fN,Wy,Gy,Ky],"html"),Dh=qy([Vy,pN,Wy,Gy,Ky],"svg");var gN={}.hasOwnProperty;function bN(e,t){let n=t||{};function r(o,...a){let i=r.invalid,s=r.handlers;if(o&&gN.call(o,e)){let l=String(o[e]);i=gN.call(s,l)?s[l]:r.unknown}if(i)return i.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var zq=/["&'<>`]/g,Uq=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Hq=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,qq=/[|\\{}()[\]^$+*?.]/g,xN=new WeakMap;function yN(e,t){if(e=e.replace(t.subset?$q(t.subset):zq,r),t.subset||t.escapeOnly)return e;return e.replace(Uq,n).replace(Hq,r);function n(o,a,i){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,i.charCodeAt(a+2),t)}function r(o,a,i){return t.format(o.charCodeAt(0),i.charCodeAt(a+1),t)}}function $q(e){let t=xN.get(e);return t||(t=Vq(e),xN.set(e,t)),t}function Vq(e){let t=[],n=-1;for(;++n",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var wN=["cent","copy","divide","gt","lt","not","para","times"];var SN={}.hasOwnProperty,Xy={},Ph;for(Ph in Oh)SN.call(Oh,Ph)&&(Xy[Oh[Ph]]=Ph);var Kq=/[^\dA-Za-z]/;function EN(e,t,n,r){let o=String.fromCharCode(e);if(SN.call(Xy,o)){let a=Xy[o],i="&"+a;return n&&CN.includes(a)&&!wN.includes(a)&&(!r||t&&t!==61&&Kq.test(String.fromCharCode(t)))?i:i+";"}return""}function LN(e,t,n){let r=kN(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=EN(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let a=vN(e,t,n.omitOptionalSemicolons);a.length|^->||--!>|"],Zq=["<",">"];function IN(e,t,n,r){return r.settings.bogusComments?"":"";function o(a){return bo(a,Object.assign({},r.settings.characterReferences,{subset:Zq}))}}function _N(e,t,n,r){return""}function Zy(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function AN(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function TN(e){return e.join(" ").trim()}var Jq=/[ \t\n\f\r]/g;function vi(e){return typeof e=="object"?e.type==="text"?MN(e.value):!1:MN(e)}function MN(e){return e.replace(Jq,"")===""}var nt=NN(1),Jy=NN(-1),Yq=[];function NN(e){return t;function t(n,r,o){let a=n?n.children:Yq,i=(r||0)+e,s=a[i];if(!o)for(;s&&vi(s);)i+=e,s=a[i];return s}}var Qq={}.hasOwnProperty;function Bh(e){return t;function t(n,r,o){return Qq.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var ac=Bh({body:t$,caption:Yy,colgroup:Yy,dd:a$,dt:o$,head:Yy,html:e$,li:r$,optgroup:i$,option:s$,p:n$,rp:RN,rt:RN,tbody:u$,td:DN,tfoot:c$,th:DN,thead:l$,tr:d$});function Yy(e,t,n){let r=nt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&vi(r.value.charAt(0)))}function e$(e,t,n){let r=nt(n,t);return!r||r.type!=="comment"}function t$(e,t,n){let r=nt(n,t);return!r||r.type!=="comment"}function n$(e,t,n){let r=nt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function r$(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function o$(e,t,n){let r=nt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function a$(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function RN(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function i$(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function s$(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function l$(e,t,n){let r=nt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function u$(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function c$(e,t,n){return!nt(n,t)}function d$(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function DN(e,t,n){let r=nt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var ON=Bh({body:h$,colgroup:m$,head:p$,html:f$,tbody:g$});function f$(e){let t=nt(e,-1);return!t||t.type!=="comment"}function p$(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function h$(e){let t=nt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&vi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function m$(e,t,n){let r=Jy(n,t),o=nt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&ac(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function g$(e,t,n){let r=Jy(n,t),o=nt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&ac(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var Fh={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -615,7 +615,7 @@ ${n.innerHTML} \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function pR(e,t,n,r){let o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags,s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),a=[],l;o.space==="html"&&e.tagName==="svg"&&(r.schema=hh);let u=A$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(s=!1),(u||!i||!fR(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(c),!s&&(!i||!$u(e,t,n))&&a.push(""),a.join("")}function A$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let i=M$(e,o,t[o]);i&&n.push(i)}}for(;++rNv(n,e.alternative)&&(s=e.alternative),a=s+go(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?yh.single:yh.double)[o][i],attribute:!0}))+s),l+(a&&"="+a))}var R$=["<","&"];function vh(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:go(e.value,Object.assign({},r.settings.characterReferences,{subset:R$}))}function hR(e,t,n,r){return r.settings.allowDangerousHtml?e.value:vh(e,t,n,r)}function mR(e,t,n,r){return r.all(e)}var gR=GM("type",{invalid:O$,unknown:D$,handlers:{comment:oR,doctype:iR,element:pR,raw:hR,root:mR,text:vh}});function O$(e){throw new Error("Expected node, not `"+e+"`")}function D$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var I$={},L$={},P$=[];function qu(e,t){let n=t||I$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:B$,all:F$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||HM,characterReferences:n.characterReferences||L$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?hh:jM,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function B$(e,t,n){return gR(e,t,n,this)}function F$(e){let t=[],n=e&&e.children||P$,r=-1;for(;++r\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function PN(e,t,n,r){let o=r.schema,a=o.space==="svg"?!1:r.settings.omitOptionalTags,i=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],l;o.space==="html"&&e.tagName==="svg"&&(r.schema=Dh);let u=b$(r,e.properties),c=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,c&&(i=!1),(u||!a||!ON(e,t,n))&&(s.push("<",e.tagName,u?" "+u:""),i&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!i&&(!a||!ac(e,t,n))&&s.push(""),s.join("")}function b$(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let a=x$(e,o,t[o]);a&&n.push(a)}}for(;++rZy(n,e.alternative)&&(i=e.alternative),s=i+bo(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?Fh.single:Fh.double)[o][a],attribute:!0}))+i),l+(s&&"="+s))}var y$=["<","&"];function zh(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:bo(e.value,Object.assign({},r.settings.characterReferences,{subset:y$}))}function BN(e,t,n,r){return r.settings.allowDangerousHtml?e.value:zh(e,t,n,r)}function FN(e,t,n,r){return r.all(e)}var zN=bN("type",{invalid:k$,unknown:v$,handlers:{comment:IN,doctype:_N,element:PN,raw:BN,root:FN,text:zh}});function k$(e){throw new Error("Expected node, not `"+e+"`")}function v$(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var C$={},w$={},S$=[];function ic(e,t){let n=t||C$,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:E$,all:L$,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||cN,characterReferences:n.characterReferences||w$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Dh:mN,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function E$(e,t,n){return zN(e,t,n,this)}function L$(e){let t=[],n=e&&e.children||S$,r=-1;for(;++r{let n=e.attrs.language||"text",r=e.textContent,o=(0,xh.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let s=U$[n.toLowerCase()]||n.toLowerCase();if(!yR.registered(s))return r.replace(//g,">");let a=yR.highlight(s,r);return qu(a)}catch{return r.replace(//g,">")}},[r,n]),i=(0,xh.useCallback)(s=>{t({language:s.target.value})},[t]);return(0,qn.jsxs)(vC,{className:fi.codeBlockWrapper,children:[(0,qn.jsx)("div",{className:fi.codeBlockHeader,contentEditable:!1,children:(0,qn.jsx)("select",{value:n,onChange:i,className:fi.languageSelect,children:z$.map(s=>(0,qn.jsx)("option",{value:s.value,children:s.label},s.value))})}),(0,qn.jsxs)("div",{className:fi.codeBlockContainer,children:[(0,qn.jsx)("pre",{className:fi.codeBlockBackdrop,"aria-hidden":"true",children:(0,qn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,qn.jsx)("pre",{className:fi.codeBlockPre,children:(0,qn.jsx)("code",{className:fi.codeBlockCode,children:(0,qn.jsx)(gC,{})})})]})]})};var xR=document.createElement("style");xR.textContent=`/* Container */ +`;document.head.appendChild(UN);var ga={codeBlockWrapper:"codeBlockWrapper_CodeBlockComponent",codeBlockHeader:"codeBlockHeader_CodeBlockComponent",languageSelect:"languageSelect_CodeBlockComponent",w3:"w3_CodeBlockComponent",org:"org_CodeBlockComponent",codeBlockContainer:"codeBlockContainer_CodeBlockComponent",codeBlockBackdrop:"codeBlockBackdrop_CodeBlockComponent",codeBlockPre:"codeBlockPre_CodeBlockComponent",codeBlockCode:"codeBlockCode_CodeBlockComponent"};var Vn=M(G()),HN=li(si),I$=[{value:"text",label:"Plain Text"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"jsx",label:"JSX"},{value:"tsx",label:"TSX"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"c",label:"C"},{value:"cpp",label:"C++"},{value:"csharp",label:"C#"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"ruby",label:"Ruby"},{value:"php",label:"PHP"},{value:"swift",label:"Swift"},{value:"kotlin",label:"Kotlin"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"scss",label:"SCSS"},{value:"json",label:"JSON"},{value:"yaml",label:"YAML"},{value:"xml",label:"XML"},{value:"markdown",label:"Markdown"},{value:"sql",label:"SQL"},{value:"graphql",label:"GraphQL"},{value:"bash",label:"Bash"},{value:"shell",label:"Shell"},{value:"powershell",label:"PowerShell"},{value:"dockerfile",label:"Dockerfile"}],_$={js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",py:"python",rb:"ruby",sh:"bash",shell:"bash",yml:"yaml",md:"markdown","c++":"cpp","c#":"csharp"},qN=({node:e,updateAttributes:t})=>{let n=e.attrs.language||"text",r=e.textContent,o=(0,Uh.useMemo)(()=>{if(!r||n==="text")return r.replace(//g,">");try{let i=_$[n.toLowerCase()]||n.toLowerCase();if(!HN.registered(i))return r.replace(//g,">");let s=HN.highlight(i,r);return ic(s)}catch{return r.replace(//g,">")}},[r,n]),a=(0,Uh.useCallback)(i=>{t({language:i.target.value})},[t]);return(0,Vn.jsxs)(qL,{className:ga.codeBlockWrapper,children:[(0,Vn.jsx)("div",{className:ga.codeBlockHeader,contentEditable:!1,children:(0,Vn.jsx)("select",{value:n,onChange:a,className:ga.languageSelect,children:I$.map(i=>(0,Vn.jsx)("option",{value:i.value,children:i.label},i.value))})}),(0,Vn.jsxs)("div",{className:ga.codeBlockContainer,children:[(0,Vn.jsx)("pre",{className:ga.codeBlockBackdrop,"aria-hidden":"true",children:(0,Vn.jsx)("code",{dangerouslySetInnerHTML:{__html:o}})}),(0,Vn.jsx)("pre",{className:ga.codeBlockPre,children:(0,Vn.jsx)("code",{className:ga.codeBlockCode,children:(0,Vn.jsx)(zL,{})})})]})]})};var $N=document.createElement("style");$N.textContent=`/* Container */ .container_MarkdownEditor { position: relative; border: 1px solid var(--vscode-input-border, #3c3c3c); @@ -1010,7 +1010,7 @@ ${n.innerHTML} -`;document.head.appendChild(xR);var Rr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var bo=R(j()),H$=is(rs),kh=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:i=!1})=>{let s=(0,Ua.useRef)(!1),a=(0,Ua.useRef)(e),l=cC({extensions:[ET.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),TN.extend({addNodeView(){return _C(vR)}}).configure({lowlight:H$,defaultLanguage:"text"}),YC.configure({openOnClick:!1,HTMLAttributes:{class:Rr.link}}),_T.configure({placeholder:n,emptyEditorClass:Rr.isEmpty}),ST,CT.configure({nested:!0}),z1.configure({resizable:!1}),F1,P1,B1,Q3.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),vv],content:e,editable:!i,autofocus:o?"end":!1,editorProps:{attributes:{class:Rr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(s.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";a.current=d,t(d)}});return(0,Ua.useEffect)(()=>{l&&e!==a.current&&(s.current=!0,l.commands.setContent(e),a.current=e,setTimeout(()=>{s.current=!1},0))},[l,e]),(0,Ua.useEffect)(()=>{l&&l.setEditable(!i)},[l,i]),l?(0,bo.jsxs)("div",{className:`${Rr.container} ${i?Rr.disabled:""}`,children:[(0,bo.jsx)(yv,{editor:l}),(0,bo.jsx)(sC,{editor:l,className:Rr.editorContent}),(0,bo.jsxs)("div",{className:Rr.hint,children:["Type ",(0,bo.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,bo.jsx)("div",{className:Rr.container,style:{minHeight:r},children:(0,bo.jsx)("div",{className:Rr.loading,children:"Loading editor..."})})};var Rv=R(ge());var kR=document.createElement("style");kR.textContent=`.shareContainer_ShareButton { +`;document.head.appendChild($N);var Nr={container:"container_MarkdownEditor",disabled:"disabled_MarkdownEditor",editor:"editor_MarkdownEditor",editorContent:"editorContent_MarkdownEditor",isEmpty:"isEmpty_MarkdownEditor",loading:"loading_MarkdownEditor",hint:"hint_MarkdownEditor",link:"link_MarkdownEditor",ProseMirror:"ProseMirror_MarkdownEditor","ProseMirror-selectednode":"ProseMirror-selectednode_MarkdownEditor","ProseMirror-gapcursor":"ProseMirror-gapcursor_MarkdownEditor"};var xo=M(G()),A$=li(si),Hh=({value:e,onChange:t,placeholder:n="Write something...",minHeight:r=150,autoFocus:o=!1,disabled:a=!1})=>{let i=(0,Gs.useRef)(!1),s=(0,Gs.useRef)(e),l=RL({extensions:[GI.configure({heading:{levels:[1,2,3]},codeBlock:!1,horizontalRule:{},blockquote:{}}),Z_.extend({addNodeView(){return KL(qN)}}).configure({lowlight:A$,defaultLanguage:"text"}),xI.configure({openOnClick:!1,HTMLAttributes:{class:Nr.link}}),KI.configure({placeholder:n,emptyEditorClass:Nr.isEmpty}),jI,XI.configure({nested:!0}),sx.configure({resizable:!1}),ix,ox,ax,CM.configure({html:!1,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!0,transformPastedText:!0,transformCopiedText:!0}),Hy],content:e,editable:!a,autofocus:o?"end":!1,editorProps:{attributes:{class:Nr.editor,style:`min-height: ${r}px`}},onUpdate:({editor:u})=>{if(i.current)return;let d=u.storage.markdown?.getMarkdown?.()??"";s.current=d,t(d)}});return(0,Gs.useEffect)(()=>{l&&e!==s.current&&(i.current=!0,l.commands.setContent(e),s.current=e,setTimeout(()=>{i.current=!1},0))},[l,e]),(0,Gs.useEffect)(()=>{l&&l.setEditable(!a)},[l,a]),l?(0,xo.jsxs)("div",{className:`${Nr.container} ${a?Nr.disabled:""}`,children:[(0,xo.jsx)(Uy,{editor:l}),(0,xo.jsx)(AL,{editor:l,className:Nr.editorContent}),(0,xo.jsxs)("div",{className:Nr.hint,children:["Type ",(0,xo.jsx)("code",{children:"/"})," for commands, or use Markdown shortcuts"]})]}):(0,xo.jsx)("div",{className:Nr.container,style:{minHeight:r},children:(0,xo.jsx)("div",{className:Nr.loading,children:"Loading editor..."})})};var Qy=M(pe());var VN=document.createElement("style");VN.textContent=`.shareContainer_ShareButton { position: relative; display: inline-flex; gap: 4px; @@ -1066,7 +1066,7 @@ ${n.innerHTML} -`;document.head.appendChild(kR);var Vu={shareContainer:"shareContainer_ShareButton",shareButton:"shareButton_ShareButton",tooltip:"tooltip_ShareButton"};var Vn=R(j()),wR=({identifier:e,url:t})=>{let[n,r]=(0,Rv.useState)(!1),[o,i]=(0,Rv.useState)("Copy ticket ID"),s=async(u,c)=>{try{await navigator.clipboard.writeText(u),i(`Copied ${c}!`),setTimeout(()=>{i(c==="ID"?"Copy ticket ID":"Copy ticket URL")},2e3)}catch{i("Failed to copy"),setTimeout(()=>{i(c==="ID"?"Copy ticket ID":"Copy ticket URL")},2e3)}},a=u=>{u.preventDefault(),s(e,"ID")},l=u=>{u.preventDefault(),t&&s(t,"URL")};return(0,Vn.jsxs)("div",{className:Vu.shareContainer,children:[(0,Vn.jsx)("button",{className:Vu.shareButton,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:a,title:"Copy ticket ID",children:(0,Vn.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Vn.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,Vn.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),t&&(0,Vn.jsx)("button",{className:Vu.shareButton,onMouseEnter:()=>{r(!0),i("Copy ticket URL")},onMouseLeave:()=>{r(!1),i("Copy ticket ID")},onClick:l,title:"Copy ticket URL",children:(0,Vn.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Vn.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,Vn.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),n&&(0,Vn.jsx)("div",{className:Vu.tooltip,children:o})]})};var ER=document.createElement("style");ER.textContent=`.header_TicketHeader { +`;document.head.appendChild(VN);var sc={shareContainer:"shareContainer_ShareButton",shareButton:"shareButton_ShareButton",tooltip:"tooltip_ShareButton"};var Wn=M(G()),WN=({identifier:e,url:t})=>{let[n,r]=(0,Qy.useState)(!1),[o,a]=(0,Qy.useState)("Copy ticket ID"),i=async(u,c)=>{try{await navigator.clipboard.writeText(u),a(`Copied ${c}!`),setTimeout(()=>{a(c==="ID"?"Copy ticket ID":"Copy ticket URL")},2e3)}catch{a("Failed to copy"),setTimeout(()=>{a(c==="ID"?"Copy ticket ID":"Copy ticket URL")},2e3)}},s=u=>{u.preventDefault(),i(e,"ID")},l=u=>{u.preventDefault(),t&&i(t,"URL")};return(0,Wn.jsxs)("div",{className:sc.shareContainer,children:[(0,Wn.jsx)("button",{className:sc.shareButton,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:s,title:"Copy ticket ID",children:(0,Wn.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Wn.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,Wn.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),t&&(0,Wn.jsx)("button",{className:sc.shareButton,onMouseEnter:()=>{r(!0),a("Copy ticket URL")},onMouseLeave:()=>{r(!1),a("Copy ticket ID")},onClick:l,title:"Copy ticket URL",children:(0,Wn.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Wn.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,Wn.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),n&&(0,Wn.jsx)("div",{className:sc.tooltip,children:o})]})};var GN=document.createElement("style");GN.textContent=`.header_TicketHeader { margin-bottom: 24px; border-bottom: 1px solid var(--color-border); padding-bottom: 16px; @@ -1232,7 +1232,7 @@ ${n.innerHTML} font-weight: 500; } -`;document.head.appendChild(ER);var Le={header:"header_TicketHeader",ticketIdContainer:"ticketIdContainer_TicketHeader",ticketId:"ticketId_TicketHeader",titleContainer:"titleContainer_TicketHeader",titleEditContainer:"titleEditContainer_TicketHeader",titleInput:"titleInput_TicketHeader",editButton:"editButton_TicketHeader",editButtons:"editButtons_TicketHeader",saveButton:"saveButton_TicketHeader",cancelButton:"cancelButton_TicketHeader",ticketTitle:"ticketTitle_TicketHeader",metadata:"metadata_TicketHeader",assigneeInfo:"assigneeInfo_TicketHeader",assigneeAvatar:"assigneeAvatar_TicketHeader",assigneeAvatarPlaceholder:"assigneeAvatarPlaceholder_TicketHeader",assigneeName:"assigneeName_TicketHeader",metadataItem:"metadataItem_TicketHeader",metadataLabel:"metadataLabel_TicketHeader"};var pe=R(j()),_R=({identifier:e,title:t,statusName:n,statusType:r,priority:o,creator:i,assignee:s,url:a,onUpdateTitle:l})=>{let[u,c]=(0,Ov.useState)(!1),[d,f]=(0,Ov.useState)(t),p=$$(r),h=q$(o),m=V$(o),b=()=>{d.trim()&&d!==t&&l&&l(d.trim()),c(!1)},g=()=>{f(t),c(!1)},y=v=>{v.key==="Enter"&&!v.shiftKey?(v.preventDefault(),b()):v.key==="Escape"&&g()};return(0,pe.jsxs)("div",{className:Le.header,children:[(0,pe.jsxs)("div",{className:Le.ticketIdContainer,children:[(0,pe.jsx)("div",{className:Le.ticketId,children:e}),(0,pe.jsx)(wR,{identifier:e,url:a})]}),u?(0,pe.jsxs)("div",{className:Le.titleEditContainer,children:[(0,pe.jsx)("input",{type:"text",value:d,onChange:v=>f(v.target.value),onKeyDown:y,className:Le.titleInput,autoFocus:!0}),(0,pe.jsxs)("div",{className:Le.editButtons,children:[(0,pe.jsx)("button",{onClick:b,className:Le.saveButton,children:"Save"}),(0,pe.jsx)("button",{onClick:g,className:Le.cancelButton,children:"Cancel"})]})]}):(0,pe.jsxs)("div",{className:Le.titleContainer,children:[(0,pe.jsx)("h1",{className:Le.ticketTitle,children:t}),l&&(0,pe.jsx)("button",{onClick:()=>c(!0),className:Le.editButton,title:"Edit title",children:(0,pe.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,pe.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,pe.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})]}),(0,pe.jsxs)("div",{className:Le.metadata,children:[(0,pe.jsxs)(ta,{variant:"status",color:p,children:[(0,pe.jsx)("span",{children:"\u25CF"}),n]}),(0,pe.jsxs)(ta,{variant:"priority",children:[(0,pe.jsx)("span",{children:h}),m]}),i&&(0,pe.jsxs)("div",{className:Le.metadataItem,children:[(0,pe.jsx)("span",{className:Le.metadataLabel,children:"Creator:"}),(0,pe.jsxs)("div",{className:Le.assigneeInfo,children:[i.avatarUrl?(0,pe.jsx)("img",{src:i.avatarUrl,alt:i.name,className:Le.assigneeAvatar}):(0,pe.jsx)("div",{className:Le.assigneeAvatarPlaceholder,children:i.name.charAt(0).toUpperCase()}),(0,pe.jsx)("span",{className:Le.assigneeName,children:i.name})]})]}),s&&(0,pe.jsxs)("div",{className:Le.metadataItem,children:[(0,pe.jsx)("span",{className:Le.metadataLabel,children:"Assignee:"}),(0,pe.jsxs)("div",{className:Le.assigneeInfo,children:[s.avatarUrl?(0,pe.jsx)("img",{src:s.avatarUrl,alt:s.name,className:Le.assigneeAvatar}):(0,pe.jsx)("div",{className:Le.assigneeAvatarPlaceholder,children:s.name.charAt(0).toUpperCase()}),(0,pe.jsx)("span",{className:Le.assigneeName,children:s.name})]})]})]})]})};function $$(e){switch(e){case"started":return"#6366f1";case"completed":return"#10b981";case"canceled":return"#6b7280";case"backlog":return"#8b5cf6";default:return"#6b7280"}}function q$(e){switch(e){case 1:return"\u{1F534}";case 2:return"\u{1F7E0}";case 3:return"\u{1F7E1}";case 4:return"\u{1F7E2}";default:return"\u26AA"}}function V$(e){switch(e){case 1:return"Urgent";case 2:return"High";case 3:return"Medium";case 4:return"Low";default:return"None"}}var SR=document.createElement("style");SR.textContent=`.infoGrid_TicketMetadata { +`;document.head.appendChild(GN);var Pe={header:"header_TicketHeader",ticketIdContainer:"ticketIdContainer_TicketHeader",ticketId:"ticketId_TicketHeader",titleContainer:"titleContainer_TicketHeader",titleEditContainer:"titleEditContainer_TicketHeader",titleInput:"titleInput_TicketHeader",editButton:"editButton_TicketHeader",editButtons:"editButtons_TicketHeader",saveButton:"saveButton_TicketHeader",cancelButton:"cancelButton_TicketHeader",ticketTitle:"ticketTitle_TicketHeader",metadata:"metadata_TicketHeader",assigneeInfo:"assigneeInfo_TicketHeader",assigneeAvatar:"assigneeAvatar_TicketHeader",assigneeAvatarPlaceholder:"assigneeAvatarPlaceholder_TicketHeader",assigneeName:"assigneeName_TicketHeader",metadataItem:"metadataItem_TicketHeader",metadataLabel:"metadataLabel_TicketHeader"};var be=M(G()),KN=({identifier:e,title:t,statusName:n,statusType:r,priority:o,creator:a,assignee:i,url:s,onUpdateTitle:l})=>{let[u,c]=(0,ek.useState)(!1),[d,f]=(0,ek.useState)(t),p=T$(r),h=M$(o),m=N$(o),b=()=>{d.trim()&&d!==t&&l&&l(d.trim()),c(!1)},g=()=>{f(t),c(!1)},x=y=>{y.key==="Enter"&&!y.shiftKey?(y.preventDefault(),b()):y.key==="Escape"&&g()};return(0,be.jsxs)("div",{className:Pe.header,children:[(0,be.jsxs)("div",{className:Pe.ticketIdContainer,children:[(0,be.jsx)("div",{className:Pe.ticketId,children:e}),(0,be.jsx)(WN,{identifier:e,url:s})]}),u?(0,be.jsxs)("div",{className:Pe.titleEditContainer,children:[(0,be.jsx)("input",{type:"text",value:d,onChange:y=>f(y.target.value),onKeyDown:x,className:Pe.titleInput,autoFocus:!0}),(0,be.jsxs)("div",{className:Pe.editButtons,children:[(0,be.jsx)("button",{onClick:b,className:Pe.saveButton,children:"Save"}),(0,be.jsx)("button",{onClick:g,className:Pe.cancelButton,children:"Cancel"})]})]}):(0,be.jsxs)("div",{className:Pe.titleContainer,children:[(0,be.jsx)("h1",{className:Pe.ticketTitle,children:t}),l&&(0,be.jsx)("button",{onClick:()=>c(!0),className:Pe.editButton,title:"Edit title",children:(0,be.jsx)(Xl,{size:14})})]}),(0,be.jsxs)("div",{className:Pe.metadata,children:[(0,be.jsxs)(ss,{variant:"status",color:p,children:[(0,be.jsx)("span",{children:"\u25CF"}),n]}),(0,be.jsxs)(ss,{variant:"priority",children:[(0,be.jsx)("span",{style:{color:h.color},children:h.symbol}),m]}),a&&(0,be.jsxs)("div",{className:Pe.metadataItem,children:[(0,be.jsx)("span",{className:Pe.metadataLabel,children:"Creator:"}),(0,be.jsxs)("div",{className:Pe.assigneeInfo,children:[a.avatarUrl?(0,be.jsx)("img",{src:a.avatarUrl,alt:a.name,className:Pe.assigneeAvatar}):(0,be.jsx)("div",{className:Pe.assigneeAvatarPlaceholder,children:a.name.charAt(0).toUpperCase()}),(0,be.jsx)("span",{className:Pe.assigneeName,children:a.name})]})]}),i&&(0,be.jsxs)("div",{className:Pe.metadataItem,children:[(0,be.jsx)("span",{className:Pe.metadataLabel,children:"Assignee:"}),(0,be.jsxs)("div",{className:Pe.assigneeInfo,children:[i.avatarUrl?(0,be.jsx)("img",{src:i.avatarUrl,alt:i.name,className:Pe.assigneeAvatar}):(0,be.jsx)("div",{className:Pe.assigneeAvatarPlaceholder,children:i.name.charAt(0).toUpperCase()}),(0,be.jsx)("span",{className:Pe.assigneeName,children:i.name})]})]})]})]})};function T$(e){switch(e){case"started":return"#6366f1";case"completed":return"#10b981";case"canceled":return"#6b7280";case"backlog":return"#8b5cf6";default:return"#6b7280"}}function M$(e){switch(e){case 1:return{color:"#dc2626",symbol:"\u25CF"};case 2:return{color:"#f97316",symbol:"\u25CF"};case 3:return{color:"#eab308",symbol:"\u25CF"};case 4:return{color:"#22c55e",symbol:"\u25CF"};default:return{color:"#6b7280",symbol:"\u25CB"}}}function N$(e){switch(e){case 1:return"Urgent";case 2:return"High";case 3:return"Medium";case 4:return"Low";default:return"None"}}var jN=document.createElement("style");jN.textContent=`.infoGrid_TicketMetadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; @@ -1262,10 +1262,10 @@ ${n.innerHTML} color: var(--color-foreground); } -`;document.head.appendChild(SR);var sr={infoGrid:"infoGrid_TicketMetadata",infoItem:"infoItem_TicketMetadata",infoLabel:"infoLabel_TicketMetadata",infoValue:"infoValue_TicketMetadata"};var Wn=R(j()),CR=({createdAt:e,updatedAt:t,projectName:n})=>(0,Wn.jsxs)("div",{className:sr.infoGrid,children:[(0,Wn.jsxs)("div",{className:sr.infoItem,children:[(0,Wn.jsx)("div",{className:sr.infoLabel,children:"Created"}),(0,Wn.jsx)("div",{className:sr.infoValue,children:new Date(e).toLocaleDateString()})]}),(0,Wn.jsxs)("div",{className:sr.infoItem,children:[(0,Wn.jsx)("div",{className:sr.infoLabel,children:"Updated"}),(0,Wn.jsx)("div",{className:sr.infoValue,children:new Date(t).toLocaleDateString()})]}),n&&(0,Wn.jsxs)("div",{className:sr.infoItem,children:[(0,Wn.jsx)("div",{className:sr.infoLabel,children:"Project"}),(0,Wn.jsx)("div",{className:sr.infoValue,children:n})]})]});var vs=R(ge());var Qe=R(j()),TR=is(rs),W$={typescript:"typescript",tsx:"typescript",ts:"typescript",javascript:"javascript",jsx:"javascript",js:"javascript",python:"python",py:"python",java:"java",go:"go",rust:"rust",rs:"rust",c:"c","c++":"cpp",cpp:"cpp",csharp:"csharp","c#":"csharp",cs:"csharp",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",scala:"scala",shell:"bash",bash:"bash",sh:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown",sql:"sql",graphql:"graphql",css:"css",sass:"scss",scss:"scss",html:"xml",xml:"xml",text:"text"};function Or(e){let t=[],n=0,r=0,o=/(`[^`]+`)|(\*\*([^*]+)\*\*)|(__([^_]+)__)|(\*([^*]+)\*)|(_([^_]+)_)|(~~([^~]+)~~)|(\[([^\]]+)\]\(([^)]+)\))/g,i;for(;(i=o.exec(e))!==null;){if(i.index>r){let s=e.substring(r,i.index);s&&t.push(s)}if(i[1]){let s=i[1].slice(1,-1);t.push((0,Qe.jsx)("code",{style:{backgroundColor:"var(--vscode-textCodeBlock-background)",padding:"2px 4px",borderRadius:"3px",fontFamily:"var(--vscode-editor-font-family)",fontSize:"0.9em"},children:s},`code-${n++}`))}else if(i[2]){let s=i[3];t.push((0,Qe.jsx)("strong",{children:Or(s)},`bold-${n++}`))}else if(i[4]){let s=i[5];t.push((0,Qe.jsx)("strong",{children:Or(s)},`bold-${n++}`))}else if(i[6]){let s=i[7];t.push((0,Qe.jsx)("em",{children:Or(s)},`italic-${n++}`))}else if(i[8]){let s=i[9];t.push((0,Qe.jsx)("em",{children:Or(s)},`italic-${n++}`))}else if(i[10]){let s=i[11];t.push((0,Qe.jsx)("del",{children:Or(s)},`strike-${n++}`))}else if(i[12]){let s=i[13],a=i[14];t.push((0,Qe.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--vscode-textLink-foreground)"},children:s},`link-${n++}`))}r=i.index+i[0].length}if(r0?t:[e]}function NR(e,t="text",n){let r=W$[t.toLowerCase()]||"text";try{if(r==="text"||!TR.registered(r))return AR(e,n);let o=TR.highlight(r,e),i=qu(o);return(0,Qe.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)"},children:(0,Qe.jsx)("code",{style:{fontFamily:"inherit",fontSize:"inherit",background:"transparent",display:"block"},dangerouslySetInnerHTML:{__html:i}})},n)}catch{return AR(e,n)}}function AR(e,t){return(0,Qe.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)",color:"var(--vscode-editor-foreground)"},children:(0,Qe.jsx)("code",{children:e})},t)}function wh(e){if(!e)return null;try{let t=e.split(` -`),n=[],r=!1,o="",i=[],s=!1,a=[],l=null,u=0,c=()=>{if(s&&a.length>0){let d=l==="ol"?"ol":"ul";n.push((0,Qe.jsx)(d,{style:{marginBottom:"12px",paddingLeft:"20px"},children:a},u++)),a=[],s=!1,l=null}};for(let d=0;d\s+(.+)$/);if(b){c(),n.push((0,Qe.jsx)("blockquote",{style:{borderLeft:"4px solid var(--vscode-textBlockQuote-border)",backgroundColor:"var(--vscode-textBlockQuote-background)",padding:"8px 16px",marginBottom:"12px",fontStyle:"italic"},children:Or(b[1])},u++));continue}if(f.trim()===""){c(),n.length>0&&n.push((0,Qe.jsx)("br",{},u++));continue}c(),n.push((0,Qe.jsx)("p",{style:{marginBottom:"8px",lineHeight:"1.6"},children:Or(f)},u++))}if(c(),r&&i.length>0){let d=i.join(` -`);d.trim()&&n.push(NR(d,o,u++))}return(0,Qe.jsx)("div",{style:{lineHeight:"1.6"},children:n})}catch{return(0,Qe.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:e})}}var MR=document.createElement("style");MR.textContent=`.section_TicketDescription { +`;document.head.appendChild(jN);var sr={infoGrid:"infoGrid_TicketMetadata",infoItem:"infoItem_TicketMetadata",infoLabel:"infoLabel_TicketMetadata",infoValue:"infoValue_TicketMetadata"};var Gn=M(G()),XN=({createdAt:e,updatedAt:t,projectName:n})=>(0,Gn.jsxs)("div",{className:sr.infoGrid,children:[(0,Gn.jsxs)("div",{className:sr.infoItem,children:[(0,Gn.jsx)("div",{className:sr.infoLabel,children:"Created"}),(0,Gn.jsx)("div",{className:sr.infoValue,children:new Date(e).toLocaleDateString()})]}),(0,Gn.jsxs)("div",{className:sr.infoItem,children:[(0,Gn.jsx)("div",{className:sr.infoLabel,children:"Updated"}),(0,Gn.jsx)("div",{className:sr.infoValue,children:new Date(t).toLocaleDateString()})]}),n&&(0,Gn.jsxs)("div",{className:sr.infoItem,children:[(0,Gn.jsx)("div",{className:sr.infoLabel,children:"Project"}),(0,Gn.jsx)("div",{className:sr.infoValue,children:n})]})]});var Ci=M(pe());var et=M(G()),ZN=li(si),R$={typescript:"typescript",tsx:"typescript",ts:"typescript",javascript:"javascript",jsx:"javascript",js:"javascript",python:"python",py:"python",java:"java",go:"go",rust:"rust",rs:"rust",c:"c","c++":"cpp",cpp:"cpp",csharp:"csharp","c#":"csharp",cs:"csharp",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",scala:"scala",shell:"bash",bash:"bash",sh:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown",sql:"sql",graphql:"graphql",css:"css",sass:"scss",scss:"scss",html:"xml",xml:"xml",text:"text"};function Rr(e){let t=[],n=0,r=0,o=/(`[^`]+`)|(\*\*([^*]+)\*\*)|(__([^_]+)__)|(\*([^*]+)\*)|(_([^_]+)_)|(~~([^~]+)~~)|(\[([^\]]+)\]\(([^)]+)\))/g,a;for(;(a=o.exec(e))!==null;){if(a.index>r){let i=e.substring(r,a.index);i&&t.push(i)}if(a[1]){let i=a[1].slice(1,-1);t.push((0,et.jsx)("code",{style:{backgroundColor:"var(--vscode-textCodeBlock-background)",padding:"2px 4px",borderRadius:"3px",fontFamily:"var(--vscode-editor-font-family)",fontSize:"0.9em"},children:i},`code-${n++}`))}else if(a[2]){let i=a[3];t.push((0,et.jsx)("strong",{children:Rr(i)},`bold-${n++}`))}else if(a[4]){let i=a[5];t.push((0,et.jsx)("strong",{children:Rr(i)},`bold-${n++}`))}else if(a[6]){let i=a[7];t.push((0,et.jsx)("em",{children:Rr(i)},`italic-${n++}`))}else if(a[8]){let i=a[9];t.push((0,et.jsx)("em",{children:Rr(i)},`italic-${n++}`))}else if(a[10]){let i=a[11];t.push((0,et.jsx)("del",{children:Rr(i)},`strike-${n++}`))}else if(a[12]){let i=a[13],s=a[14];t.push((0,et.jsx)("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--vscode-textLink-foreground)"},children:i},`link-${n++}`))}r=a.index+a[0].length}if(r0?t:[e]}function JN(e,t="text",n){let r=R$[t.toLowerCase()]||"text";try{if(r==="text"||!ZN.registered(r))return YN(e,n);let o=ZN.highlight(r,e),a=ic(o);return(0,et.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)"},children:(0,et.jsx)("code",{style:{fontFamily:"inherit",fontSize:"inherit",background:"transparent",display:"block"},dangerouslySetInnerHTML:{__html:a}})},n)}catch{return YN(e,n)}}function YN(e,t){return(0,et.jsx)("pre",{style:{backgroundColor:"var(--vscode-editor-background)",border:"1px solid var(--vscode-panel-border)",borderRadius:"4px",padding:"16px",overflow:"auto",marginBottom:"16px",fontSize:"13px",lineHeight:"1.6",fontFamily:"var(--vscode-editor-font-family, 'Menlo', 'Monaco', 'Courier New', monospace)",color:"var(--vscode-editor-foreground)"},children:(0,et.jsx)("code",{children:e})},t)}function qh(e){if(!e)return null;try{let t=e.split(` +`),n=[],r=!1,o="",a=[],i=!1,s=[],l=null,u=0,c=()=>{if(i&&s.length>0){let d=l==="ol"?"ol":"ul";n.push((0,et.jsx)(d,{style:{marginBottom:"12px",paddingLeft:"20px"},children:s},u++)),s=[],i=!1,l=null}};for(let d=0;d\s+(.+)$/);if(b){c(),n.push((0,et.jsx)("blockquote",{style:{borderLeft:"4px solid var(--vscode-textBlockQuote-border)",backgroundColor:"var(--vscode-textBlockQuote-background)",padding:"8px 16px",marginBottom:"12px",fontStyle:"italic"},children:Rr(b[1])},u++));continue}if(f.trim()===""){c(),n.length>0&&n.push((0,et.jsx)("br",{},u++));continue}c(),n.push((0,et.jsx)("p",{style:{marginBottom:"8px",lineHeight:"1.6"},children:Rr(f)},u++))}if(c(),r&&a.length>0){let d=a.join(` +`);d.trim()&&n.push(JN(d,o,u++))}return(0,et.jsx)("div",{style:{lineHeight:"1.6"},children:n})}catch{return(0,et.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:e})}}var QN=document.createElement("style");QN.textContent=`.section_TicketDescription { margin-bottom: 24px; } @@ -1374,7 +1374,7 @@ ${n.innerHTML} font-style: italic; } -`;document.head.appendChild(MR);var Dr={section:"section_TicketDescription",sectionHeader:"sectionHeader_TicketDescription",sectionTitle:"sectionTitle_TicketDescription",editButton:"editButton_TicketDescription",description:"description_TicketDescription",descriptionTextarea:"descriptionTextarea_TicketDescription",editButtons:"editButtons_TicketDescription",saveButton:"saveButton_TicketDescription",cancelButton:"cancelButton_TicketDescription",emptyState:"emptyState_TicketDescription"};var st=R(j()),RR=({description:e,onUpdateDescription:t})=>{let[n,r]=(0,vs.useState)(!1),[o,i]=(0,vs.useState)(e||"");(0,vs.useEffect)(()=>{n||i(e||"")},[e,n]);let s=()=>{o!==e&&t&&t(o),r(!1)},a=()=>{i(e||""),r(!1)},l=(0,vs.useMemo)(()=>e?wh(e):null,[e]);return(0,st.jsxs)("div",{className:Dr.section,children:[(0,st.jsxs)("div",{className:Dr.sectionHeader,children:[(0,st.jsx)("div",{className:Dr.sectionTitle,children:"Description"}),t&&!n&&(0,st.jsx)("button",{onClick:()=>r(!0),className:Dr.editButton,title:"Edit description",children:(0,st.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,st.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,st.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})]}),n?(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(kh,{value:o,onChange:i,placeholder:"Add a description...",minHeight:200,autoFocus:!0}),(0,st.jsxs)("div",{className:Dr.editButtons,children:[(0,st.jsx)("button",{onClick:s,className:Dr.saveButton,children:"Save"}),(0,st.jsx)("button",{onClick:a,className:Dr.cancelButton,children:"Cancel"})]})]}):(0,st.jsx)(st.Fragment,{children:l?(0,st.jsx)("div",{className:Dr.description,children:l}):(0,st.jsx)("div",{className:Dr.emptyState,children:"No description provided"})})]})};var Eh=R(ge());var OR=document.createElement("style");OR.textContent=`.container_StatusSelector { +`;document.head.appendChild(QN);var Dr={section:"section_TicketDescription",sectionHeader:"sectionHeader_TicketDescription",sectionTitle:"sectionTitle_TicketDescription",editButton:"editButton_TicketDescription",description:"description_TicketDescription",descriptionTextarea:"descriptionTextarea_TicketDescription",editButtons:"editButtons_TicketDescription",saveButton:"saveButton_TicketDescription",cancelButton:"cancelButton_TicketDescription",emptyState:"emptyState_TicketDescription"};var st=M(G()),e3=({description:e,onUpdateDescription:t})=>{let[n,r]=(0,Ci.useState)(!1),[o,a]=(0,Ci.useState)(e||"");(0,Ci.useEffect)(()=>{n||a(e||"")},[e,n]);let i=()=>{o!==e&&t&&t(o),r(!1)},s=()=>{a(e||""),r(!1)},l=(0,Ci.useMemo)(()=>e?qh(e):null,[e]);return(0,st.jsxs)("div",{className:Dr.section,children:[(0,st.jsxs)("div",{className:Dr.sectionHeader,children:[(0,st.jsx)("div",{className:Dr.sectionTitle,children:"Description"}),t&&!n&&(0,st.jsx)("button",{onClick:()=>r(!0),className:Dr.editButton,title:"Edit description",children:(0,st.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,st.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,st.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})]}),n?(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Hh,{value:o,onChange:a,placeholder:"Add a description...",minHeight:200,autoFocus:!0}),(0,st.jsxs)("div",{className:Dr.editButtons,children:[(0,st.jsx)("button",{onClick:i,className:Dr.saveButton,children:"Save"}),(0,st.jsx)("button",{onClick:s,className:Dr.cancelButton,children:"Cancel"})]})]}):(0,st.jsx)(st.Fragment,{children:l?(0,st.jsx)("div",{className:Dr.description,children:l}):(0,st.jsx)("div",{className:Dr.emptyState,children:"No description provided"})})]})};var $h=M(pe());var t3=document.createElement("style");t3.textContent=`.container_StatusSelector { display: flex; gap: 8px; margin-bottom: 16px; @@ -1387,7 +1387,7 @@ ${n.innerHTML} margin-bottom: 0; } -`;document.head.appendChild(OR);var Dv={container:"container_StatusSelector",select:"select_StatusSelector"};var Ha=R(j()),DR=({states:e,currentStateId:t,onUpdate:n})=>{let[r,o]=(0,Eh.useState)(t);(0,Eh.useEffect)(()=>{o(t)},[t]);let i=()=>{r!==t&&n(r)};return(0,Ha.jsxs)("div",{className:Dv.container,children:[(0,Ha.jsx)(Z0,{value:r,onChange:s=>o(s.target.value),className:Dv.select,children:e.map(s=>(0,Ha.jsx)("option",{value:s.id,children:s.name},s.id))}),(0,Ha.jsx)(qo,{onClick:i,disabled:r===t,children:"Update Status"})]})};var Ir=R(ge());var IR=document.createElement("style");IR.textContent=`.container_AssigneeSelector { +`;document.head.appendChild(t3);var tk={container:"container_StatusSelector",select:"select_StatusSelector"};var Ks=M(G()),n3=({states:e,currentStateId:t,onUpdate:n})=>{let[r,o]=(0,$h.useState)(t);(0,$h.useEffect)(()=>{o(t)},[t]);let a=()=>{r!==t&&n(r)};return(0,Ks.jsxs)("div",{className:tk.container,children:[(0,Ks.jsx)(xg,{value:r,onChange:i=>o(i.target.value),className:tk.select,children:e.map(i=>(0,Ks.jsx)("option",{value:i.id,children:i.name},i.id))}),(0,Ks.jsx)(Ko,{onClick:a,disabled:r===t,children:"Update Status"})]})};var Or=M(pe());var r3=document.createElement("style");r3.textContent=`.container_AssigneeSelector { position: relative; width: 100%; } @@ -1532,7 +1532,7 @@ ${n.innerHTML} } -`;document.head.appendChild(IR);var Pe={container:"container_AssigneeSelector",trigger:"trigger_AssigneeSelector",avatar:"avatar_AssigneeSelector",avatarPlaceholder:"avatarPlaceholder_AssigneeSelector",assigneeName:"assigneeName_AssigneeSelector",chevron:"chevron_AssigneeSelector",dropdown:"dropdown_AssigneeSelector",searchContainer:"searchContainer_AssigneeSelector",searchInput:"searchInput_AssigneeSelector",userList:"userList_AssigneeSelector",userItem:"userItem_AssigneeSelector",selected:"selected_AssigneeSelector",userInfo:"userInfo_AssigneeSelector",userName:"userName_AssigneeSelector",userEmail:"userEmail_AssigneeSelector",emptyState:"emptyState_AssigneeSelector"};var ye=R(j()),LR=({currentAssignee:e,users:t,onUpdateAssignee:n,onLoadUsers:r,onSearchUsers:o})=>{let[i,s]=(0,Ir.useState)(!1),[a,l]=(0,Ir.useState)(""),[u,c]=(0,Ir.useState)(!1),d=(0,Ir.useRef)(null);(0,Ir.useEffect)(()=>{u||(r(),c(!0))},[]),(0,Ir.useEffect)(()=>{if(a.length<4)return;let h=setTimeout(()=>{o(a)},300);return()=>clearTimeout(h)},[a]),(0,Ir.useEffect)(()=>{let h=m=>{d.current&&!d.current.contains(m.target)&&(s(!1),l(""))};return i&&document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[i]);let f=h=>{n(h),s(!1),l("")},p=a.length>=3?t.filter(h=>{let m=a.toLowerCase();return h.name.toLowerCase().includes(m)||h.email.toLowerCase().includes(m)}):t;return(0,ye.jsxs)("div",{className:Pe.container,ref:d,children:[(0,ye.jsxs)("button",{className:Pe.trigger,onClick:()=>s(!i),title:"Change assignee",children:[e?(0,ye.jsxs)(ye.Fragment,{children:[e.avatarUrl?(0,ye.jsx)("img",{src:e.avatarUrl,alt:e.name,className:Pe.avatar}):(0,ye.jsx)("div",{className:Pe.avatarPlaceholder,children:e.name.charAt(0).toUpperCase()}),(0,ye.jsx)("span",{className:Pe.assigneeName,children:e.name})]}):(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)("div",{className:Pe.avatarPlaceholder,children:"?"}),(0,ye.jsx)("span",{className:Pe.assigneeName,children:"Unassigned"})]}),(0,ye.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Pe.chevron,children:(0,ye.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),i&&(0,ye.jsxs)("div",{className:Pe.dropdown,children:[(0,ye.jsx)("div",{className:Pe.searchContainer,children:(0,ye.jsx)("input",{type:"text",placeholder:"Search users...",value:a,onChange:h=>l(h.target.value),className:Pe.searchInput,autoFocus:!0})}),(0,ye.jsxs)("div",{className:Pe.userList,children:[(0,ye.jsxs)("button",{className:Pe.userItem,onClick:()=>f(null),children:[(0,ye.jsx)("div",{className:Pe.avatarPlaceholder,children:"?"}),(0,ye.jsx)("div",{className:Pe.userInfo,children:(0,ye.jsx)("div",{className:Pe.userName,children:"Unassigned"})})]}),p.length>0?p.map(h=>(0,ye.jsxs)("button",{className:`${Pe.userItem} ${e?.id===h.id?Pe.selected:""}`,onClick:()=>f(h.id),children:[h.avatarUrl?(0,ye.jsx)("img",{src:h.avatarUrl,alt:h.name,className:Pe.avatar}):(0,ye.jsx)("div",{className:Pe.avatarPlaceholder,children:h.name.charAt(0).toUpperCase()}),(0,ye.jsxs)("div",{className:Pe.userInfo,children:[(0,ye.jsx)("div",{className:Pe.userName,children:h.name}),(0,ye.jsx)("div",{className:Pe.userEmail,children:h.email})]})]},h.id)):(0,ye.jsx)("div",{className:Pe.emptyState,children:a.length>=3?"No users found":t.length===0?"Loading users...":"Type to search users"})]})]})]})};var yo=R(ge());var PR=document.createElement("style");PR.textContent=`.section_LabelSelector { +`;document.head.appendChild(r3);var Be={container:"container_AssigneeSelector",trigger:"trigger_AssigneeSelector",avatar:"avatar_AssigneeSelector",avatarPlaceholder:"avatarPlaceholder_AssigneeSelector",assigneeName:"assigneeName_AssigneeSelector",chevron:"chevron_AssigneeSelector",dropdown:"dropdown_AssigneeSelector",searchContainer:"searchContainer_AssigneeSelector",searchInput:"searchInput_AssigneeSelector",userList:"userList_AssigneeSelector",userItem:"userItem_AssigneeSelector",selected:"selected_AssigneeSelector",userInfo:"userInfo_AssigneeSelector",userName:"userName_AssigneeSelector",userEmail:"userEmail_AssigneeSelector",emptyState:"emptyState_AssigneeSelector"};var xe=M(G()),o3=({currentAssignee:e,users:t,onUpdateAssignee:n,onLoadUsers:r,onSearchUsers:o})=>{let[a,i]=(0,Or.useState)(!1),[s,l]=(0,Or.useState)(""),[u,c]=(0,Or.useState)(!1),d=(0,Or.useRef)(null);(0,Or.useEffect)(()=>{u||(r(),c(!0))},[]),(0,Or.useEffect)(()=>{if(s.length<4)return;let h=setTimeout(()=>{o(s)},300);return()=>clearTimeout(h)},[s]),(0,Or.useEffect)(()=>{let h=m=>{d.current&&!d.current.contains(m.target)&&(i(!1),l(""))};return a&&document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[a]);let f=h=>{n(h),i(!1),l("")},p=s.length>=3?t.filter(h=>{let m=s.toLowerCase();return h.name.toLowerCase().includes(m)||h.email.toLowerCase().includes(m)}):t;return(0,xe.jsxs)("div",{className:Be.container,ref:d,children:[(0,xe.jsxs)("button",{className:Be.trigger,onClick:()=>i(!a),title:"Change assignee",children:[e?(0,xe.jsxs)(xe.Fragment,{children:[e.avatarUrl?(0,xe.jsx)("img",{src:e.avatarUrl,alt:e.name,className:Be.avatar}):(0,xe.jsx)("div",{className:Be.avatarPlaceholder,children:e.name.charAt(0).toUpperCase()}),(0,xe.jsx)("span",{className:Be.assigneeName,children:e.name})]}):(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("div",{className:Be.avatarPlaceholder,children:"?"}),(0,xe.jsx)("span",{className:Be.assigneeName,children:"Unassigned"})]}),(0,xe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Be.chevron,children:(0,xe.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),a&&(0,xe.jsxs)("div",{className:Be.dropdown,children:[(0,xe.jsx)("div",{className:Be.searchContainer,children:(0,xe.jsx)("input",{type:"text",placeholder:"Search users...",value:s,onChange:h=>l(h.target.value),className:Be.searchInput,autoFocus:!0})}),(0,xe.jsxs)("div",{className:Be.userList,children:[(0,xe.jsxs)("button",{className:Be.userItem,onClick:()=>f(null),children:[(0,xe.jsx)("div",{className:Be.avatarPlaceholder,children:"?"}),(0,xe.jsx)("div",{className:Be.userInfo,children:(0,xe.jsx)("div",{className:Be.userName,children:"Unassigned"})})]}),p.length>0?p.map(h=>(0,xe.jsxs)("button",{className:`${Be.userItem} ${e?.id===h.id?Be.selected:""}`,onClick:()=>f(h.id),children:[h.avatarUrl?(0,xe.jsx)("img",{src:h.avatarUrl,alt:h.name,className:Be.avatar}):(0,xe.jsx)("div",{className:Be.avatarPlaceholder,children:h.name.charAt(0).toUpperCase()}),(0,xe.jsxs)("div",{className:Be.userInfo,children:[(0,xe.jsx)("div",{className:Be.userName,children:h.name}),(0,xe.jsx)("div",{className:Be.userEmail,children:h.email})]})]},h.id)):(0,xe.jsx)("div",{className:Be.emptyState,children:s.length>=3?"No users found":t.length===0?"Loading users...":"Type to search users"})]})]})]})};var yo=M(pe());var a3=document.createElement("style");a3.textContent=`.section_LabelSelector { position: relative; margin-bottom: 24px; } @@ -1662,7 +1662,7 @@ ${n.innerHTML} font-size: 12px; } -`;document.head.appendChild(PR);var Xt={section:"section_LabelSelector",header:"header_LabelSelector",sectionTitle:"sectionTitle_LabelSelector",addButton:"addButton_LabelSelector",labels:"labels_LabelSelector",noLabels:"noLabels_LabelSelector",dropdown:"dropdown_LabelSelector",searchContainer:"searchContainer_LabelSelector",searchInput:"searchInput_LabelSelector",labelList:"labelList_LabelSelector",labelItem:"labelItem_LabelSelector",labelColor:"labelColor_LabelSelector",labelName:"labelName_LabelSelector",emptyState:"emptyState_LabelSelector"};var at=R(j()),BR=({currentLabels:e,availableLabels:t,onUpdateLabels:n,onLoadLabels:r,teamId:o})=>{let[i,s]=(0,yo.useState)(!1),[a,l]=(0,yo.useState)(""),[u,c]=(0,yo.useState)(!1),d=(0,yo.useRef)(null);(0,yo.useEffect)(()=>{u||!o||(r(o),c(!0))},[o]),(0,yo.useEffect)(()=>{let m=b=>{d.current&&!d.current.contains(b.target)&&(s(!1),l(""))};return i&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[i]);let f=m=>{let b=e.filter(g=>g.id!==m).map(g=>g.id);n(b)},p=m=>{if(e.some(g=>g.id===m.id))return;let b=[...e.map(g=>g.id),m.id];n(b),l("")},h=t.filter(m=>{let b=!e.some(y=>y.id===m.id),g=a.length===0||m.name.toLowerCase().includes(a.toLowerCase());return b&&g});return(0,at.jsxs)("div",{className:Xt.section,ref:d,children:[(0,at.jsxs)("div",{className:Xt.header,children:[(0,at.jsx)("span",{className:Xt.sectionTitle,children:"Labels"}),(0,at.jsx)("button",{className:Xt.addButton,onClick:()=>{!u&&o&&(r(o),c(!0)),s(!i)},title:"Add label",children:(0,at.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,at.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,at.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),(0,at.jsx)("div",{className:Xt.labels,children:e.length>0?e.map(m=>(0,at.jsx)(ta,{color:m.color,onRemove:()=>f(m.id),children:m.name},m.id)):(0,at.jsx)("span",{className:Xt.noLabels,children:"No labels"})}),i&&(0,at.jsxs)("div",{className:Xt.dropdown,children:[(0,at.jsx)("div",{className:Xt.searchContainer,children:(0,at.jsx)("input",{type:"text",placeholder:"Search labels...",value:a,onChange:m=>l(m.target.value),className:Xt.searchInput,autoFocus:!0})}),(0,at.jsx)("div",{className:Xt.labelList,children:h.length>0?h.map(m=>(0,at.jsxs)("button",{className:Xt.labelItem,onClick:()=>p(m),children:[(0,at.jsx)("span",{className:Xt.labelColor,style:{backgroundColor:m.color}}),(0,at.jsx)("span",{className:Xt.labelName,children:m.name})]},m.id)):(0,at.jsx)("div",{className:Xt.emptyState,children:a.length>0?"No matching labels":t.length===0?"Loading labels...":"All labels assigned"})})]})]})};var pi=R(ge());var FR=document.createElement("style");FR.textContent=`.section_CycleSelector { +`;document.head.appendChild(a3);var Qt={section:"section_LabelSelector",header:"header_LabelSelector",sectionTitle:"sectionTitle_LabelSelector",addButton:"addButton_LabelSelector",labels:"labels_LabelSelector",noLabels:"noLabels_LabelSelector",dropdown:"dropdown_LabelSelector",searchContainer:"searchContainer_LabelSelector",searchInput:"searchInput_LabelSelector",labelList:"labelList_LabelSelector",labelItem:"labelItem_LabelSelector",labelColor:"labelColor_LabelSelector",labelName:"labelName_LabelSelector",emptyState:"emptyState_LabelSelector"};var lt=M(G()),i3=({currentLabels:e,availableLabels:t,onUpdateLabels:n,onLoadLabels:r,teamId:o})=>{let[a,i]=(0,yo.useState)(!1),[s,l]=(0,yo.useState)(""),[u,c]=(0,yo.useState)(!1),d=(0,yo.useRef)(null);(0,yo.useEffect)(()=>{u||!o||(r(o),c(!0))},[o]),(0,yo.useEffect)(()=>{let m=b=>{d.current&&!d.current.contains(b.target)&&(i(!1),l(""))};return a&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[a]);let f=m=>{let b=e.filter(g=>g.id!==m).map(g=>g.id);n(b)},p=m=>{if(e.some(g=>g.id===m.id))return;let b=[...e.map(g=>g.id),m.id];n(b),l("")},h=t.filter(m=>{let b=!e.some(x=>x.id===m.id),g=s.length===0||m.name.toLowerCase().includes(s.toLowerCase());return b&&g});return(0,lt.jsxs)("div",{className:Qt.section,ref:d,children:[(0,lt.jsxs)("div",{className:Qt.header,children:[(0,lt.jsx)("span",{className:Qt.sectionTitle,children:"Labels"}),(0,lt.jsx)("button",{className:Qt.addButton,onClick:()=>{!u&&o&&(r(o),c(!0)),i(!a)},title:"Add label",children:(0,lt.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,lt.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,lt.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),(0,lt.jsx)("div",{className:Qt.labels,children:e.length>0?e.map(m=>(0,lt.jsx)(ss,{color:m.color,onRemove:()=>f(m.id),children:m.name},m.id)):(0,lt.jsx)("span",{className:Qt.noLabels,children:"No labels"})}),a&&(0,lt.jsxs)("div",{className:Qt.dropdown,children:[(0,lt.jsx)("div",{className:Qt.searchContainer,children:(0,lt.jsx)("input",{type:"text",placeholder:"Search labels...",value:s,onChange:m=>l(m.target.value),className:Qt.searchInput,autoFocus:!0})}),(0,lt.jsx)("div",{className:Qt.labelList,children:h.length>0?h.map(m=>(0,lt.jsxs)("button",{className:Qt.labelItem,onClick:()=>p(m),children:[(0,lt.jsx)("span",{className:Qt.labelColor,style:{backgroundColor:m.color}}),(0,lt.jsx)("span",{className:Qt.labelName,children:m.name})]},m.id)):(0,lt.jsx)("div",{className:Qt.emptyState,children:s.length>0?"No matching labels":t.length===0?"Loading labels...":"All labels assigned"})})]})]})};var ba=M(pe());var s3=document.createElement("style");s3.textContent=`.section_CycleSelector { position: relative; margin-bottom: 24px; } @@ -1814,7 +1814,7 @@ ${n.innerHTML} font-size: 12px; } -`;document.head.appendChild(FR);var We={section:"section_CycleSelector",header:"header_CycleSelector",sectionTitle:"sectionTitle_CycleSelector",trigger:"trigger_CycleSelector",cycleName:"cycleName_CycleSelector",noCycle:"noCycle_CycleSelector",chevron:"chevron_CycleSelector",dropdown:"dropdown_CycleSelector",cycleList:"cycleList_CycleSelector",cycleItem:"cycleItem_CycleSelector",selected:"selected_CycleSelector",cycleIcon:"cycleIcon_CycleSelector",cycleInfo:"cycleInfo_CycleSelector",cycleItemName:"cycleItemName_CycleSelector",cycleDates:"cycleDates_CycleSelector",progressContainer:"progressContainer_CycleSelector",progressBar:"progressBar_CycleSelector",emptyState:"emptyState_CycleSelector"};var Ce=R(j()),zR=({currentCycle:e,availableCycles:t,onUpdateCycle:n,onLoadCycles:r,teamId:o})=>{let[i,s]=(0,pi.useState)(!1),[a,l]=(0,pi.useState)(!1),u=(0,pi.useRef)(null);(0,pi.useEffect)(()=>{a||!o||(r(o),l(!0))},[o]),(0,pi.useEffect)(()=>{let p=h=>{u.current&&!u.current.contains(h.target)&&s(!1)};return i&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[i]);let c=p=>{n(p),s(!1)},d=p=>new Date(p).toLocaleDateString(void 0,{month:"short",day:"numeric"}),f=p=>{let h=p.name||`Cycle ${p.number}`;return p.startsAt&&p.endsAt?`${h} (${d(p.startsAt)} - ${d(p.endsAt)})`:h};return(0,Ce.jsxs)("div",{className:We.section,ref:u,children:[(0,Ce.jsx)("div",{className:We.header,children:(0,Ce.jsx)("span",{className:We.sectionTitle,children:"Cycle"})}),(0,Ce.jsxs)("button",{className:We.trigger,onClick:()=>{!a&&o&&(r(o),l(!0)),s(!i)},title:"Change cycle",children:[e?(0,Ce.jsx)("span",{className:We.cycleName,children:f(e)}):(0,Ce.jsx)("span",{className:We.noCycle,children:"No cycle"}),(0,Ce.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:We.chevron,children:(0,Ce.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),i&&(0,Ce.jsx)("div",{className:We.dropdown,children:(0,Ce.jsxs)("div",{className:We.cycleList,children:[(0,Ce.jsxs)("button",{className:`${We.cycleItem} ${e?"":We.selected}`,onClick:()=>c(null),children:[(0,Ce.jsx)("div",{className:We.cycleIcon,children:(0,Ce.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ce.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Ce.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,Ce.jsx)("span",{className:We.cycleItemName,children:"No cycle"})]}),t.length>0?t.map(p=>(0,Ce.jsxs)("button",{className:`${We.cycleItem} ${e?.id===p.id?We.selected:""}`,onClick:()=>c(p.id),children:[(0,Ce.jsx)("div",{className:We.cycleIcon,children:(0,Ce.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ce.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,Ce.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),(0,Ce.jsxs)("div",{className:We.cycleInfo,children:[(0,Ce.jsx)("span",{className:We.cycleItemName,children:p.name||`Cycle ${p.number}`}),p.startsAt&&p.endsAt&&(0,Ce.jsxs)("span",{className:We.cycleDates,children:[d(p.startsAt)," - ",d(p.endsAt)]})]}),p.progress!==void 0&&(0,Ce.jsx)("div",{className:We.progressContainer,children:(0,Ce.jsx)("div",{className:We.progressBar,style:{width:`${Math.round(p.progress*100)}%`}})})]},p.id)):(0,Ce.jsx)("div",{className:We.emptyState,children:a?"No cycles available":"Loading cycles..."})]})})]})};var HR=R(ge());var UR=document.createElement("style");UR.textContent=`.section_CommentForm { +`;document.head.appendChild(s3);var We={section:"section_CycleSelector",header:"header_CycleSelector",sectionTitle:"sectionTitle_CycleSelector",trigger:"trigger_CycleSelector",cycleName:"cycleName_CycleSelector",noCycle:"noCycle_CycleSelector",chevron:"chevron_CycleSelector",dropdown:"dropdown_CycleSelector",cycleList:"cycleList_CycleSelector",cycleItem:"cycleItem_CycleSelector",selected:"selected_CycleSelector",cycleIcon:"cycleIcon_CycleSelector",cycleInfo:"cycleInfo_CycleSelector",cycleItemName:"cycleItemName_CycleSelector",cycleDates:"cycleDates_CycleSelector",progressContainer:"progressContainer_CycleSelector",progressBar:"progressBar_CycleSelector",emptyState:"emptyState_CycleSelector"};var Ie=M(G()),l3=({currentCycle:e,availableCycles:t,onUpdateCycle:n,onLoadCycles:r,teamId:o})=>{let[a,i]=(0,ba.useState)(!1),[s,l]=(0,ba.useState)(!1),u=(0,ba.useRef)(null);(0,ba.useEffect)(()=>{s||!o||(r(o),l(!0))},[o]),(0,ba.useEffect)(()=>{let p=h=>{u.current&&!u.current.contains(h.target)&&i(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);let c=p=>{n(p),i(!1)},d=p=>new Date(p).toLocaleDateString(void 0,{month:"short",day:"numeric"}),f=p=>{let h=p.name||`Cycle ${p.number}`;return p.startsAt&&p.endsAt?`${h} (${d(p.startsAt)} - ${d(p.endsAt)})`:h};return(0,Ie.jsxs)("div",{className:We.section,ref:u,children:[(0,Ie.jsx)("div",{className:We.header,children:(0,Ie.jsx)("span",{className:We.sectionTitle,children:"Cycle"})}),(0,Ie.jsxs)("button",{className:We.trigger,onClick:()=>{!s&&o&&(r(o),l(!0)),i(!a)},title:"Change cycle",children:[e?(0,Ie.jsx)("span",{className:We.cycleName,children:f(e)}):(0,Ie.jsx)("span",{className:We.noCycle,children:"No cycle"}),(0,Ie.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:We.chevron,children:(0,Ie.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),a&&(0,Ie.jsx)("div",{className:We.dropdown,children:(0,Ie.jsxs)("div",{className:We.cycleList,children:[(0,Ie.jsxs)("button",{className:`${We.cycleItem} ${e?"":We.selected}`,onClick:()=>c(null),children:[(0,Ie.jsx)("div",{className:We.cycleIcon,children:(0,Ie.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ie.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,Ie.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,Ie.jsx)("span",{className:We.cycleItemName,children:"No cycle"})]}),t.length>0?t.map(p=>(0,Ie.jsxs)("button",{className:`${We.cycleItem} ${e?.id===p.id?We.selected:""}`,onClick:()=>c(p.id),children:[(0,Ie.jsx)("div",{className:We.cycleIcon,children:(0,Ie.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ie.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,Ie.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),(0,Ie.jsxs)("div",{className:We.cycleInfo,children:[(0,Ie.jsx)("span",{className:We.cycleItemName,children:p.name||`Cycle ${p.number}`}),p.startsAt&&p.endsAt&&(0,Ie.jsxs)("span",{className:We.cycleDates,children:[d(p.startsAt)," - ",d(p.endsAt)]})]}),p.progress!==void 0&&(0,Ie.jsx)("div",{className:We.progressContainer,children:(0,Ie.jsx)("div",{className:We.progressBar,style:{width:`${Math.round(p.progress*100)}%`}})})]},p.id)):(0,Ie.jsx)("div",{className:We.emptyState,children:s?"No cycles available":"Loading cycles..."})]})})]})};var c3=M(pe());var u3=document.createElement("style");u3.textContent=`.section_CommentForm { margin-bottom: 24px; } @@ -1825,14 +1825,14 @@ ${n.innerHTML} color: var(--color-foreground); } -`;document.head.appendChild(UR);var Iv={section:"section_CommentForm",sectionTitle:"sectionTitle_CommentForm"};var xs=R(j()),$R=({onSubmit:e})=>{let[t,n]=(0,HR.useState)(""),r=o=>{o.preventDefault(),t.trim()&&(e(t),n(""))};return(0,xs.jsxs)("div",{className:Iv.section,children:[(0,xs.jsx)("div",{className:Iv.sectionTitle,children:"Add Comment"}),(0,xs.jsxs)("form",{onSubmit:r,children:[(0,xs.jsx)(X0,{placeholder:"Write a comment...",value:t,onChange:o=>n(o.target.value)}),(0,xs.jsx)(qo,{type:"submit",disabled:!t.trim(),children:"Add Comment"})]})]})};var qR=document.createElement("style");qR.textContent=`.actions_ActionButtons { +`;document.head.appendChild(u3);var nk={section:"section_CommentForm",sectionTitle:"sectionTitle_CommentForm"};var wi=M(G()),d3=({onSubmit:e})=>{let[t,n]=(0,c3.useState)(""),r=o=>{o.preventDefault(),t.trim()&&(e(t),n(""))};return(0,wi.jsxs)("div",{className:nk.section,children:[(0,wi.jsx)("div",{className:nk.sectionTitle,children:"Add Comment"}),(0,wi.jsxs)("form",{onSubmit:r,children:[(0,wi.jsx)(yg,{placeholder:"Write a comment...",value:t,onChange:o=>n(o.target.value)}),(0,wi.jsx)(Ko,{type:"submit",disabled:!t.trim(),children:"Add Comment"})]})]})};var f3=document.createElement("style");f3.textContent=`.actions_ActionButtons { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; } -`;document.head.appendChild(qR);var VR={actions:"actions_ActionButtons"};var Wu=R(j()),WR=({onOpenInLinear:e,onRefresh:t})=>(0,Wu.jsxs)("div",{className:VR.actions,children:[(0,Wu.jsx)(qo,{variant:"secondary",onClick:e,children:"Open in Linear"}),(0,Wu.jsx)(qo,{variant:"secondary",onClick:t,children:"Refresh"})]});var jR=document.createElement("style");jR.textContent=`.container_AttachedPRs { +`;document.head.appendChild(f3);var p3={actions:"actions_ActionButtons"};var lc=M(G()),h3=({onOpenInLinear:e,onRefresh:t})=>(0,lc.jsxs)("div",{className:p3.actions,children:[(0,lc.jsx)(Ko,{variant:"secondary",onClick:e,children:"Open in Linear"}),(0,lc.jsx)(Ko,{variant:"secondary",onClick:t,children:"Refresh"})]});var m3=document.createElement("style");m3.textContent=`.container_AttachedPRs { margin: 24px 0; } @@ -1956,7 +1956,7 @@ ${n.innerHTML} opacity: 0.85; } -`;document.head.appendChild(jR);var Ut={container:"container_AttachedPRs",title:"title_AttachedPRs",titleIcon:"titleIcon_AttachedPRs",subtitle:"subtitle_AttachedPRs",prList:"prList_AttachedPRs",prItem:"prItem_AttachedPRs",prHeader:"prHeader_AttachedPRs",prInfo:"prInfo_AttachedPRs",platformIcon:"platformIcon_AttachedPRs",github:"github_AttachedPRs",gitlab:"gitlab_AttachedPRs",prNumber:"prNumber_AttachedPRs",prRepo:"prRepo_AttachedPRs",openArrow:"openArrow_AttachedPRs",prTitle:"prTitle_AttachedPRs",prSubtitle:"prSubtitle_AttachedPRs"};var Ht=R(j());function j$(e){let t=e.match(/\/pull\/(\d+)|\/merge_requests\/(\d+)/);return t?`#${t[1]||t[2]}`:null}function K$(e){let t=e.match(/github\.com\/([^/]+\/[^/]+)/);if(t)return t[1];let n=e.match(/gitlab\.com\/([^/]+\/[^/]+)/);if(n)return n[1];let r=e.match(/bitbucket\.org\/([^/]+\/[^/]+)/);return r?r[1]:"Repository"}function G$(e){return e.includes("github.com")?"github":e.includes("gitlab.com")?"gitlab":e.includes("bitbucket.org")?"bitbucket":"git"}var KR=({attachments:e})=>{if(!e||e.nodes.length===0)return null;let t=e.nodes.filter(n=>n.url.includes("github.com")&&n.url.includes("/pull/")||n.url.includes("gitlab.com")&&n.url.includes("/merge_requests/")||n.url.includes("bitbucket.org")&&n.url.includes("/pull-requests/"));return t.length===0?null:(0,Ht.jsxs)("div",{className:Ut.container,children:[(0,Ht.jsxs)("h3",{className:Ut.title,children:[(0,Ht.jsx)("span",{className:Ut.titleIcon,children:"\u{1F517}"}),"Pull Requests (",t.length,")"]}),(0,Ht.jsx)("p",{className:Ut.subtitle,children:"Click to view status on GitHub/GitLab"}),(0,Ht.jsx)("div",{className:Ut.prList,children:t.map(n=>{let r=j$(n.url),o=K$(n.url),i=G$(n.url);return(0,Ht.jsxs)("a",{href:n.url,className:Ut.prItem,target:"_blank",rel:"noopener noreferrer",children:[(0,Ht.jsxs)("div",{className:Ut.prHeader,children:[(0,Ht.jsxs)("div",{className:Ut.prInfo,children:[(0,Ht.jsxs)("span",{className:`${Ut.platformIcon} ${Ut[i]}`,children:[i==="github"&&"\u26A1",i==="gitlab"&&"\u{1F98A}",i==="bitbucket"&&"\u{1FAA3}"]}),(0,Ht.jsx)("span",{className:Ut.prNumber,children:r}),(0,Ht.jsx)("span",{className:Ut.prRepo,children:o})]}),(0,Ht.jsx)("span",{className:Ut.openArrow,children:"\u2192"})]}),n.title&&(0,Ht.jsx)("div",{className:Ut.prTitle,children:n.title}),n.subtitle&&(0,Ht.jsx)("div",{className:Ut.prSubtitle,children:n.subtitle})]},n.id)})})]})};var GR=document.createElement("style");GR.textContent=`.container_SubIssues { +`;document.head.appendChild(m3);var Ht={container:"container_AttachedPRs",title:"title_AttachedPRs",titleIcon:"titleIcon_AttachedPRs",subtitle:"subtitle_AttachedPRs",prList:"prList_AttachedPRs",prItem:"prItem_AttachedPRs",prHeader:"prHeader_AttachedPRs",prInfo:"prInfo_AttachedPRs",platformIcon:"platformIcon_AttachedPRs",github:"github_AttachedPRs",gitlab:"gitlab_AttachedPRs",prNumber:"prNumber_AttachedPRs",prRepo:"prRepo_AttachedPRs",openArrow:"openArrow_AttachedPRs",prTitle:"prTitle_AttachedPRs",prSubtitle:"prSubtitle_AttachedPRs"};var qt=M(G());function D$(e){let t=e.match(/\/pull\/(\d+)|\/merge_requests\/(\d+)/);return t?`#${t[1]||t[2]}`:null}function O$(e){let t=e.match(/github\.com\/([^/]+\/[^/]+)/);if(t)return t[1];let n=e.match(/gitlab\.com\/([^/]+\/[^/]+)/);if(n)return n[1];let r=e.match(/bitbucket\.org\/([^/]+\/[^/]+)/);return r?r[1]:"Repository"}function P$(e){return e.includes("github.com")?"github":e.includes("gitlab.com")?"gitlab":e.includes("bitbucket.org")?"bitbucket":"git"}var g3=({attachments:e})=>{if(!e||e.nodes.length===0)return null;let t=e.nodes.filter(n=>n.url.includes("github.com")&&n.url.includes("/pull/")||n.url.includes("gitlab.com")&&n.url.includes("/merge_requests/")||n.url.includes("bitbucket.org")&&n.url.includes("/pull-requests/"));return t.length===0?null:(0,qt.jsxs)("div",{className:Ht.container,children:[(0,qt.jsxs)("h3",{className:Ht.title,children:[(0,qt.jsx)(rs,{size:16,className:Ht.titleIcon}),"Pull Requests (",t.length,")"]}),(0,qt.jsx)("p",{className:Ht.subtitle,children:"Click to view status on GitHub/GitLab"}),(0,qt.jsx)("div",{className:Ht.prList,children:t.map(n=>{let r=D$(n.url),o=O$(n.url),a=P$(n.url);return(0,qt.jsxs)("a",{href:n.url,className:Ht.prItem,target:"_blank",rel:"noopener noreferrer",children:[(0,qt.jsxs)("div",{className:Ht.prHeader,children:[(0,qt.jsxs)("div",{className:Ht.prInfo,children:[(0,qt.jsx)(rs,{size:14,className:`${Ht.platformIcon} ${Ht[a]}`}),(0,qt.jsx)("span",{className:Ht.prNumber,children:r}),(0,qt.jsx)("span",{className:Ht.prRepo,children:o})]}),(0,qt.jsx)(Vo,{size:14,className:Ht.openArrow})]}),n.title&&(0,qt.jsx)("div",{className:Ht.prTitle,children:n.title}),n.subtitle&&(0,qt.jsx)("div",{className:Ht.prSubtitle,children:n.subtitle})]},n.id)})})]})};var b3=document.createElement("style");b3.textContent=`.container_SubIssues { margin: 24px 0; } @@ -2185,7 +2185,7 @@ ${n.innerHTML} color: #ff6b6b; } -`;document.head.appendChild(GR);var he={container:"container_SubIssues",parentSection:"parentSection_SubIssues",childrenSection:"childrenSection_SubIssues",title:"title_SubIssues",titleIcon:"titleIcon_SubIssues",parentItem:"parentItem_SubIssues",subIssuesList:"subIssuesList_SubIssues",subIssueItem:"subIssueItem_SubIssues",subIssueHeader:"subIssueHeader_SubIssues",subIssueInfo:"subIssueInfo_SubIssues",issueIdentifier:"issueIdentifier_SubIssues",issueTitle:"issueTitle_SubIssues",subIssueTitle:"subIssueTitle_SubIssues",statusBadge:"statusBadge_SubIssues",completed:"completed_SubIssues",started:"started_SubIssues",unstarted:"unstarted_SubIssues",backlog:"backlog_SubIssues",canceled:"canceled_SubIssues",default:"default_SubIssues",priorityBadge:"priorityBadge_SubIssues",urgent:"urgent_SubIssues",high:"high_SubIssues",medium:"medium_SubIssues",low:"low_SubIssues",assignee:"assignee_SubIssues",avatar:"avatar_SubIssues",assigneeName:"assigneeName_SubIssues",openArrow:"openArrow_SubIssues","vscode-dark":"vscode-dark_SubIssues"};var Be=R(j());function Y$(e){switch(e){case"completed":return he.completed;case"started":return he.started;case"unstarted":return he.unstarted;case"backlog":return he.backlog;case"canceled":return he.canceled;default:return he.default}}function J$(e){switch(e){case 1:return{label:"Urgent",className:he.urgent};case 2:return{label:"High",className:he.high};case 3:return{label:"Medium",className:he.medium};case 4:return{label:"Low",className:he.low};default:return{label:"",className:""}}}var YR=({childrenIssues:e,parent:t,onOpenIssue:n})=>{if(!e&&!t)return null;let r=(o,i)=>{o.preventDefault(),n&&n(i)};return(0,Be.jsxs)("div",{className:he.container,children:[t&&(0,Be.jsxs)("div",{className:he.parentSection,children:[(0,Be.jsxs)("h3",{className:he.title,children:[(0,Be.jsx)("span",{className:he.titleIcon,children:"\u2B06\uFE0F"}),"Parent Issue"]}),(0,Be.jsxs)("a",{href:"#",onClick:o=>r(o,t.id),className:he.parentItem,children:[(0,Be.jsx)("span",{className:he.issueIdentifier,children:t.identifier}),(0,Be.jsx)("span",{className:he.issueTitle,children:t.title}),(0,Be.jsx)("span",{className:he.openArrow,children:"\u2192"})]})]}),e&&e.nodes.length>0&&(0,Be.jsxs)("div",{className:he.childrenSection,children:[(0,Be.jsxs)("h3",{className:he.title,children:[(0,Be.jsx)("span",{className:he.titleIcon,children:"\u2B07\uFE0F"}),"Sub-issues (",e.nodes.length,")"]}),(0,Be.jsx)("div",{className:he.subIssuesList,children:e.nodes.map(o=>{let i=J$(o.priority),s=Y$(o.state.type);return(0,Be.jsxs)("a",{href:"#",onClick:a=>r(a,o.id),className:he.subIssueItem,children:[(0,Be.jsxs)("div",{className:he.subIssueHeader,children:[(0,Be.jsxs)("div",{className:he.subIssueInfo,children:[(0,Be.jsx)("span",{className:he.issueIdentifier,children:o.identifier}),(0,Be.jsx)("span",{className:`${he.statusBadge} ${s}`,children:o.state.name}),i.label&&(0,Be.jsx)("span",{className:`${he.priorityBadge} ${i.className}`,children:i.label})]}),(0,Be.jsx)("span",{className:he.openArrow,children:"\u2192"})]}),(0,Be.jsx)("div",{className:he.subIssueTitle,children:o.title}),o.assignee&&(0,Be.jsxs)("div",{className:he.assignee,children:[o.assignee.avatarUrl&&(0,Be.jsx)("img",{src:o.assignee.avatarUrl,alt:o.assignee.name,className:he.avatar}),(0,Be.jsx)("span",{className:he.assigneeName,children:o.assignee.name})]})]},o.id)})})]})]})};var _h=R(ge());var JR=document.createElement("style");JR.textContent=`.container_Comments { +`;document.head.appendChild(b3);var he={container:"container_SubIssues",parentSection:"parentSection_SubIssues",childrenSection:"childrenSection_SubIssues",title:"title_SubIssues",titleIcon:"titleIcon_SubIssues",parentItem:"parentItem_SubIssues",subIssuesList:"subIssuesList_SubIssues",subIssueItem:"subIssueItem_SubIssues",subIssueHeader:"subIssueHeader_SubIssues",subIssueInfo:"subIssueInfo_SubIssues",issueIdentifier:"issueIdentifier_SubIssues",issueTitle:"issueTitle_SubIssues",subIssueTitle:"subIssueTitle_SubIssues",statusBadge:"statusBadge_SubIssues",completed:"completed_SubIssues",started:"started_SubIssues",unstarted:"unstarted_SubIssues",backlog:"backlog_SubIssues",canceled:"canceled_SubIssues",default:"default_SubIssues",priorityBadge:"priorityBadge_SubIssues",urgent:"urgent_SubIssues",high:"high_SubIssues",medium:"medium_SubIssues",low:"low_SubIssues",assignee:"assignee_SubIssues",avatar:"avatar_SubIssues",assigneeName:"assigneeName_SubIssues",openArrow:"openArrow_SubIssues","vscode-dark":"vscode-dark_SubIssues"};var Fe=M(G());function B$(e){switch(e){case"completed":return he.completed;case"started":return he.started;case"unstarted":return he.unstarted;case"backlog":return he.backlog;case"canceled":return he.canceled;default:return he.default}}function F$(e){switch(e){case 1:return{label:"Urgent",className:he.urgent};case 2:return{label:"High",className:he.high};case 3:return{label:"Medium",className:he.medium};case 4:return{label:"Low",className:he.low};default:return{label:"",className:""}}}var x3=({childrenIssues:e,parent:t,onOpenIssue:n})=>{if(!e&&!t)return null;let r=(o,a)=>{o.preventDefault(),n&&n(a)};return(0,Fe.jsxs)("div",{className:he.container,children:[t&&(0,Fe.jsxs)("div",{className:he.parentSection,children:[(0,Fe.jsxs)("h3",{className:he.title,children:[(0,Fe.jsx)(Vl,{size:16,className:he.titleIcon}),"Parent Issue"]}),(0,Fe.jsxs)("a",{href:"#",onClick:o=>r(o,t.id),className:he.parentItem,children:[(0,Fe.jsx)("span",{className:he.issueIdentifier,children:t.identifier}),(0,Fe.jsx)("span",{className:he.issueTitle,children:t.title}),(0,Fe.jsx)(Vo,{size:14,className:he.openArrow})]})]}),e&&e.nodes.length>0&&(0,Fe.jsxs)("div",{className:he.childrenSection,children:[(0,Fe.jsxs)("h3",{className:he.title,children:[(0,Fe.jsx)($l,{size:16,className:he.titleIcon}),"Sub-issues (",e.nodes.length,")"]}),(0,Fe.jsx)("div",{className:he.subIssuesList,children:e.nodes.map(o=>{let a=F$(o.priority),i=B$(o.state.type);return(0,Fe.jsxs)("a",{href:"#",onClick:s=>r(s,o.id),className:he.subIssueItem,children:[(0,Fe.jsxs)("div",{className:he.subIssueHeader,children:[(0,Fe.jsxs)("div",{className:he.subIssueInfo,children:[(0,Fe.jsx)("span",{className:he.issueIdentifier,children:o.identifier}),(0,Fe.jsx)("span",{className:`${he.statusBadge} ${i}`,children:o.state.name}),a.label&&(0,Fe.jsx)("span",{className:`${he.priorityBadge} ${a.className}`,children:a.label})]}),(0,Fe.jsx)(Vo,{size:14,className:he.openArrow})]}),(0,Fe.jsx)("div",{className:he.subIssueTitle,children:o.title}),o.assignee&&(0,Fe.jsxs)("div",{className:he.assignee,children:[o.assignee.avatarUrl&&(0,Fe.jsx)("img",{src:o.assignee.avatarUrl,alt:o.assignee.name,className:he.avatar}),(0,Fe.jsx)("span",{className:he.assigneeName,children:o.assignee.name})]})]},o.id)})})]})]})};var Vh=M(pe());var y3=document.createElement("style");y3.textContent=`.container_Comments { margin: 24px 0; } @@ -2317,7 +2317,7 @@ ${n.innerHTML} font-size: 12px; } -`;document.head.appendChild(JR);var St={container:"container_Comments",title:"title_Comments",titleIcon:"titleIcon_Comments",emptyState:"emptyState_Comments",emptyText:"emptyText_Comments",emptySubtext:"emptySubtext_Comments",commentsList:"commentsList_Comments",commentItem:"commentItem_Comments",commentHeader:"commentHeader_Comments",userInfo:"userInfo_Comments",avatar:"avatar_Comments",userName:"userName_Comments",timestamp:"timestamp_Comments",commentContent:"commentContent_Comments",commentBody:"commentBody_Comments"};var Ue=R(j());function Z$(e){let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:r<2592e3?`${Math.floor(r/604800)}w ago`:t.toLocaleDateString()}var ZR=_h.default.memo(({body:e})=>{let t=(0,_h.useMemo)(()=>wh(e),[e]);return(0,Ue.jsx)(Ue.Fragment,{children:t})});ZR.displayName="CommentBody";var XR=({comments:e})=>{let t=e?.nodes?.length||0;return(0,Ue.jsxs)("div",{className:St.container,children:[(0,Ue.jsxs)("h3",{className:St.title,children:[(0,Ue.jsx)("span",{className:St.titleIcon,children:"\u{1F4AC}"}),"Comments (",t,")"]}),t===0?(0,Ue.jsxs)("div",{className:St.emptyState,children:[(0,Ue.jsx)("p",{className:St.emptyText,children:"No comments yet"}),(0,Ue.jsx)("p",{className:St.emptySubtext,children:"Use the comment form below to add the first comment"})]}):(0,Ue.jsx)("div",{className:St.commentsList,children:e.nodes.map(n=>(0,Ue.jsxs)("div",{className:St.commentItem,children:[n.user?.avatarUrl?(0,Ue.jsx)("img",{src:n.user.avatarUrl,alt:n.user.name,className:St.avatar}):(0,Ue.jsx)("div",{className:St.avatar,title:n.user?.name||"Unknown User",children:(0,Ue.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",style:{margin:"6px"},children:(0,Ue.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})})}),(0,Ue.jsxs)("div",{className:St.commentContent,children:[(0,Ue.jsx)("div",{className:St.commentHeader,children:(0,Ue.jsxs)("div",{className:St.userInfo,children:[(0,Ue.jsx)("span",{className:St.userName,children:n.user?.name||"Unknown User"}),(0,Ue.jsx)("span",{className:St.timestamp,children:Z$(n.createdAt)})]})}),(0,Ue.jsx)("div",{className:St.commentBody,children:(0,Ue.jsx)(ZR,{body:n.body})})]})]},n.id))})]})};var hi=R(ge());var QR=document.createElement("style");QR.textContent=`.container_BranchManager { +`;document.head.appendChild(y3);var Lt={container:"container_Comments",title:"title_Comments",titleIcon:"titleIcon_Comments",emptyState:"emptyState_Comments",emptyText:"emptyText_Comments",emptySubtext:"emptySubtext_Comments",commentsList:"commentsList_Comments",commentItem:"commentItem_Comments",commentHeader:"commentHeader_Comments",userInfo:"userInfo_Comments",avatar:"avatar_Comments",userName:"userName_Comments",timestamp:"timestamp_Comments",commentContent:"commentContent_Comments",commentBody:"commentBody_Comments"};var Ge=M(G());function z$(e){let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:r<2592e3?`${Math.floor(r/604800)}w ago`:t.toLocaleDateString()}var k3=Vh.default.memo(({body:e})=>{let t=(0,Vh.useMemo)(()=>qh(e),[e]);return(0,Ge.jsx)(Ge.Fragment,{children:t})});k3.displayName="CommentBody";var v3=({comments:e})=>{let t=e?.nodes?.length||0;return(0,Ge.jsxs)("div",{className:Lt.container,children:[(0,Ge.jsxs)("h3",{className:Lt.title,children:[(0,Ge.jsx)(jl,{size:16,className:Lt.titleIcon}),"Comments (",t,")"]}),t===0?(0,Ge.jsxs)("div",{className:Lt.emptyState,children:[(0,Ge.jsx)("p",{className:Lt.emptyText,children:"No comments yet"}),(0,Ge.jsx)("p",{className:Lt.emptySubtext,children:"Use the comment form below to add the first comment"})]}):(0,Ge.jsx)("div",{className:Lt.commentsList,children:e.nodes.map(n=>(0,Ge.jsxs)("div",{className:Lt.commentItem,children:[n.user?.avatarUrl?(0,Ge.jsx)("img",{src:n.user.avatarUrl,alt:n.user.name,className:Lt.avatar}):(0,Ge.jsx)("div",{className:Lt.avatar,title:n.user?.name||"Unknown User",children:(0,Ge.jsx)(Yl,{size:20,style:{margin:"6px"}})}),(0,Ge.jsxs)("div",{className:Lt.commentContent,children:[(0,Ge.jsx)("div",{className:Lt.commentHeader,children:(0,Ge.jsxs)("div",{className:Lt.userInfo,children:[(0,Ge.jsx)("span",{className:Lt.userName,children:n.user?.name||"Unknown User"}),(0,Ge.jsx)("span",{className:Lt.timestamp,children:z$(n.createdAt)})]})}),(0,Ge.jsx)("div",{className:Lt.commentBody,children:(0,Ge.jsx)(k3,{body:n.body})})]})]},n.id))})]})};var xa=M(pe());var C3=document.createElement("style");C3.textContent=`.container_BranchManager { margin: 16px 0; padding: 12px; border-radius: 4px; @@ -2576,7 +2576,7 @@ ${n.innerHTML} font-size: 14px; } -`;document.head.appendChild(QR);var xe={container:"container_BranchManager",header:"header_BranchManager",title:"title_BranchManager",icon:"icon_BranchManager",branchInfo:"branchInfo_BranchManager",branchName:"branchName_BranchManager",branchIcon:"branchIcon_BranchManager",actions:"actions_BranchManager",checkoutButton:"checkoutButton_BranchManager",removeButton:"removeButton_BranchManager",noBranch:"noBranch_BranchManager",noBranchText:"noBranchText_BranchManager",associateForm:"associateForm_BranchManager",inputContainer:"inputContainer_BranchManager",branchInput:"branchInput_BranchManager",dropdown:"dropdown_BranchManager",dropdownItem:"dropdownItem_BranchManager",dropdownIcon:"dropdownIcon_BranchManager",dropdownBranch:"dropdownBranch_BranchManager",dropdownLabel:"dropdownLabel_BranchManager",dropdownMore:"dropdownMore_BranchManager",associateButton:"associateButton_BranchManager",notInProgress:"notInProgress_BranchManager",warning:"warning_BranchManager",warningIcon:"warningIcon_BranchManager",differentRepo:"differentRepo_BranchManager",repoIcon:"repoIcon_BranchManager"};var se=R(j()),eO=({ticketId:e,statusType:t,onCheckoutBranch:n,onAssociateBranch:r,onRemoveAssociation:o,onLoadBranchInfo:i,onLoadAllBranches:s,onOpenInRepository:a,branchInfo:l,allBranches:u})=>{let[c,d]=(0,hi.useState)(""),[f,p]=(0,hi.useState)(""),[h,m]=(0,hi.useState)(!1),[b,g]=(0,hi.useState)(!1);(0,hi.useEffect)(()=>{i(e)},[e]),(0,hi.useEffect)(()=>{h&&!u&&s()},[h,u]);let y=()=>{c.trim()&&(r(e,c.trim()),d(""),p(""),m(!1),g(!1))},v=()=>{o(e)},x=()=>{n(e)},k=F=>{d(F),p(F),g(!1)},w=F=>{p(F),d(F),g(!0)},E=()=>{g(!0)},_=()=>{if(!u)return[];let{branches:F,currentBranch:U,suggestions:M}=u,S=f.toLowerCase(),A=F;return S&&(A=F.filter(P=>P.toLowerCase().includes(S))),A.sort((P,W)=>{if(P===U)return-1;if(W===U)return 1;let O=M.includes(P),le=M.includes(W);return O&&!le?-1:le&&!O?1:P.localeCompare(W)})},T=F=>{if(!u)return"\u2387";let{currentBranch:U,suggestions:M}=u;return F===U?"\u2713":M.includes(F)?"\u{1F4A1}":"\u2387"},C=F=>{if(!u)return"";let{currentBranch:U,suggestions:M}=u;return F===U?" (current)":M.includes(F)?" (suggested)":""};if(!(t==="started"))return null;let K=_();return(0,se.jsxs)("div",{className:xe.container,children:[(0,se.jsx)("div",{className:xe.header,children:(0,se.jsxs)("div",{className:xe.title,children:[(0,se.jsx)("span",{className:xe.icon,children:"\u{1F33F}"}),"Branch"]})}),l?.branchName?(0,se.jsxs)("div",{className:xe.branchInfo,children:[(0,se.jsxs)("div",{className:xe.branchName,children:[(0,se.jsx)("span",{className:xe.branchIcon,children:"\u2387"}),(0,se.jsx)("span",{children:l.branchName})]}),l.isInDifferentRepo&&l.repositoryName&&(0,se.jsxs)("div",{className:xe.differentRepo,children:[(0,se.jsx)("span",{className:xe.repoIcon,children:"\u{1F4C2}"}),(0,se.jsxs)("span",{children:["Branch is in ",(0,se.jsx)("strong",{children:l.repositoryName})]})]}),!l.exists&&!l.isInDifferentRepo&&(0,se.jsxs)("div",{className:xe.warning,children:[(0,se.jsx)("span",{className:xe.warningIcon,children:"\u26A0\uFE0F"}),(0,se.jsx)("span",{children:"Branch no longer exists in repository"})]}),(0,se.jsxs)("div",{className:xe.actions,children:[l.isInDifferentRepo&&l.repositoryPath&&a&&(0,se.jsxs)("button",{className:xe.checkoutButton,onClick:()=>a(e,l.repositoryPath),children:[(0,se.jsx)("span",{children:"\u{1F4C2}"}),"Open in ",l.repositoryName]}),l.exists&&!l.isInDifferentRepo&&(0,se.jsxs)("button",{className:xe.checkoutButton,onClick:x,children:[(0,se.jsx)("span",{children:"\u2197\uFE0F"}),"Checkout Branch"]}),(0,se.jsxs)("button",{className:xe.removeButton,onClick:v,children:[(0,se.jsx)("span",{children:"\u{1F5D1}\uFE0F"}),"Remove"]})]})]}):(0,se.jsx)("div",{className:xe.noBranch,children:h?(0,se.jsxs)("div",{className:xe.associateForm,children:[(0,se.jsxs)("div",{className:xe.inputContainer,children:[(0,se.jsx)("input",{type:"text",className:xe.branchInput,placeholder:"Type to filter branches...",value:f,onChange:F=>w(F.target.value),onFocus:E,onKeyDown:F=>{F.key==="Enter"?y():F.key==="Escape"&&(m(!1),p(""),d(""),g(!1))},autoFocus:!0}),b&&K.length>0&&(0,se.jsxs)("div",{className:xe.dropdown,children:[K.slice(0,10).map(F=>(0,se.jsxs)("div",{className:xe.dropdownItem,onClick:()=>k(F),children:[(0,se.jsx)("span",{className:xe.dropdownIcon,children:T(F)}),(0,se.jsx)("span",{className:xe.dropdownBranch,children:F}),(0,se.jsx)("span",{className:xe.dropdownLabel,children:C(F)})]},F)),K.length>10&&(0,se.jsxs)("div",{className:xe.dropdownMore,children:["... and ",K.length-10," more"]})]})]}),(0,se.jsx)("button",{className:xe.associateButton,onClick:y,disabled:!c.trim(),children:"Associate"}),(0,se.jsx)("button",{className:xe.removeButton,onClick:()=>{m(!1),p(""),d(""),g(!1)},children:"Cancel"})]}):(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("div",{className:xe.noBranchText,children:"No branch associated with this ticket"}),(0,se.jsxs)("button",{className:xe.checkoutButton,onClick:()=>m(!0),children:[(0,se.jsx)("span",{children:"+"}),"Associate Branch"]})]})})]})};var tO=document.createElement("style");tO.textContent=`.container_App { +`;document.head.appendChild(C3);var ve={container:"container_BranchManager",header:"header_BranchManager",title:"title_BranchManager",icon:"icon_BranchManager",branchInfo:"branchInfo_BranchManager",branchName:"branchName_BranchManager",branchIcon:"branchIcon_BranchManager",actions:"actions_BranchManager",checkoutButton:"checkoutButton_BranchManager",removeButton:"removeButton_BranchManager",noBranch:"noBranch_BranchManager",noBranchText:"noBranchText_BranchManager",associateForm:"associateForm_BranchManager",inputContainer:"inputContainer_BranchManager",branchInput:"branchInput_BranchManager",dropdown:"dropdown_BranchManager",dropdownItem:"dropdownItem_BranchManager",dropdownIcon:"dropdownIcon_BranchManager",dropdownBranch:"dropdownBranch_BranchManager",dropdownLabel:"dropdownLabel_BranchManager",dropdownMore:"dropdownMore_BranchManager",associateButton:"associateButton_BranchManager",notInProgress:"notInProgress_BranchManager",warning:"warning_BranchManager",warningIcon:"warningIcon_BranchManager",differentRepo:"differentRepo_BranchManager",repoIcon:"repoIcon_BranchManager"};var re=M(G()),w3=({ticketId:e,statusType:t,onCheckoutBranch:n,onAssociateBranch:r,onRemoveAssociation:o,onLoadBranchInfo:a,onLoadAllBranches:i,onOpenInRepository:s,branchInfo:l,allBranches:u})=>{let[c,d]=(0,xa.useState)(""),[f,p]=(0,xa.useState)(""),[h,m]=(0,xa.useState)(!1),[b,g]=(0,xa.useState)(!1);(0,xa.useEffect)(()=>{a(e)},[e]),(0,xa.useEffect)(()=>{h&&!u&&i()},[h,u]);let x=()=>{c.trim()&&(r(e,c.trim()),d(""),p(""),m(!1),g(!1))},y=()=>{o(e)},k=()=>{n(e)},v=F=>{d(F),p(F),g(!1)},C=F=>{p(F),d(F),g(!0)},w=()=>{g(!0)},S=()=>{if(!u)return[];let{branches:F,currentBranch:U,suggestions:T}=u,E=f.toLowerCase(),A=F;return E&&(A=F.filter(P=>P.toLowerCase().includes(E))),A.sort((P,W)=>{if(P===U)return-1;if(W===U)return 1;let N=T.includes(P),le=T.includes(W);return N&&!le?-1:le&&!N?1:P.localeCompare(W)})},I=F=>{if(!u)return(0,re.jsx)(Wo,{size:14});let{currentBranch:U,suggestions:T}=u;return F===U?(0,re.jsx)(Wl,{size:14}):T.includes(F)?(0,re.jsx)(Kl,{size:14}):(0,re.jsx)(Wo,{size:14})},L=F=>{if(!u)return"";let{currentBranch:U,suggestions:T}=u;return F===U?" (current)":T.includes(F)?" (suggested)":""};if(!(t==="started"))return null;let K=S();return(0,re.jsxs)("div",{className:ve.container,children:[(0,re.jsx)("div",{className:ve.header,children:(0,re.jsxs)("div",{className:ve.title,children:[(0,re.jsx)(Wo,{size:16,className:ve.icon}),"Branch"]})}),l?.branchName?(0,re.jsxs)("div",{className:ve.branchInfo,children:[(0,re.jsxs)("div",{className:ve.branchName,children:[(0,re.jsx)(Wo,{size:14,className:ve.branchIcon}),(0,re.jsx)("span",{children:l.branchName})]}),l.isInDifferentRepo&&l.repositoryName&&(0,re.jsxs)("div",{className:ve.differentRepo,children:[(0,re.jsx)(ns,{size:14,className:ve.repoIcon}),(0,re.jsxs)("span",{children:["Branch is in ",(0,re.jsx)("strong",{children:l.repositoryName})]})]}),!l.exists&&!l.isInDifferentRepo&&(0,re.jsxs)("div",{className:ve.warning,children:[(0,re.jsx)(Go,{size:14,className:ve.warningIcon}),(0,re.jsx)("span",{children:"Branch no longer exists in repository"})]}),(0,re.jsxs)("div",{className:ve.actions,children:[l.isInDifferentRepo&&l.repositoryPath&&s&&(0,re.jsxs)("button",{className:ve.checkoutButton,onClick:()=>s(e,l.repositoryPath),children:[(0,re.jsx)(ns,{size:14}),"Open in ",l.repositoryName]}),l.exists&&!l.isInDifferentRepo&&(0,re.jsxs)("button",{className:ve.checkoutButton,onClick:k,children:[(0,re.jsx)(Gl,{size:14}),"Checkout Branch"]}),(0,re.jsxs)("button",{className:ve.removeButton,onClick:y,children:[(0,re.jsx)(Jl,{size:14}),"Remove"]})]})]}):(0,re.jsx)("div",{className:ve.noBranch,children:h?(0,re.jsxs)("div",{className:ve.associateForm,children:[(0,re.jsxs)("div",{className:ve.inputContainer,children:[(0,re.jsx)("input",{type:"text",className:ve.branchInput,placeholder:"Type to filter branches...",value:f,onChange:F=>C(F.target.value),onFocus:w,onKeyDown:F=>{F.key==="Enter"?x():F.key==="Escape"&&(m(!1),p(""),d(""),g(!1))},autoFocus:!0}),b&&K.length>0&&(0,re.jsxs)("div",{className:ve.dropdown,children:[K.slice(0,10).map(F=>(0,re.jsxs)("div",{className:ve.dropdownItem,onClick:()=>v(F),children:[(0,re.jsx)("span",{className:ve.dropdownIcon,children:I(F)}),(0,re.jsx)("span",{className:ve.dropdownBranch,children:F}),(0,re.jsx)("span",{className:ve.dropdownLabel,children:L(F)})]},F)),K.length>10&&(0,re.jsxs)("div",{className:ve.dropdownMore,children:["... and ",K.length-10," more"]})]})]}),(0,re.jsx)("button",{className:ve.associateButton,onClick:x,disabled:!c.trim(),children:"Associate"}),(0,re.jsx)("button",{className:ve.removeButton,onClick:()=>{m(!1),p(""),d(""),g(!1)},children:"Cancel"})]}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{className:ve.noBranchText,children:"No branch associated with this ticket"}),(0,re.jsxs)("button",{className:ve.checkoutButton,onClick:()=>m(!0),children:[(0,re.jsx)(Zl,{size:14}),"Associate Branch"]})]})})]})};var S3=document.createElement("style");S3.textContent=`.container_App { max-width: 1200px; margin: 0 auto; padding: 0 20px; @@ -2595,7 +2595,7 @@ ${n.innerHTML} margin: 24px 0; } -`;document.head.appendChild(tO);var vo={container:"container_App",emptyState:"emptyState_App",divider:"divider_App"};var je=R(j());function X$(e){return e?Array.isArray(e)?e:"nodes"in e?e.nodes:[]:[]}function Q$(){let{postMessage:e,onMessage:t}=mE(),[n,r]=(0,Lr.useState)(window.__LINEAR_INITIAL_STATE__?.issue||null),[o,i]=(0,Lr.useState)(window.__LINEAR_INITIAL_STATE__?.workflowStates||[]),[s,a]=(0,Lr.useState)(window.__LINEAR_INITIAL_STATE__?.users||[]),[l,u]=(0,Lr.useState)([]),[c,d]=(0,Lr.useState)([]),[f,p]=(0,Lr.useState)(null),[h,m]=(0,Lr.useState)(null);(0,Lr.useEffect)(()=>t(O=>{switch(O.command){case"updateIssue":r(O.issue);break;case"workflowStates":i(O.states);break;case"usersLoaded":a(O.users);break;case"branchInfo":p({branchName:O.branchName,exists:O.exists,isInDifferentRepo:O.isInDifferentRepo,repositoryName:O.repositoryName,repositoryPath:O.repositoryPath});break;case"allBranchesLoaded":m({branches:O.branches,currentBranch:O.currentBranch,suggestions:O.suggestions});break;case"labelsLoaded":u(O.labels);break;case"cyclesLoaded":d(O.cycles);break}}),[t]);let b=O=>{e({command:"updateStatus",stateId:O})},g=O=>{e({command:"addComment",body:O})},y=O=>{e({command:"updateTitle",title:O})},v=O=>{e({command:"updateDescription",description:O})},x=O=>{e({command:"updateAssignee",assigneeId:O})},k=O=>{e({command:"loadUsers",teamId:O})},w=O=>{e({command:"searchUsers",searchTerm:O})},E=()=>{e({command:"openInLinear"})},_=()=>{e({command:"refresh"})},T=O=>{e({command:"openIssue",issueId:O})},C=O=>{e({command:"checkoutBranch",ticketId:O})},H=(O,le)=>{e({command:"associateBranch",ticketId:O,branchName:le}),setTimeout(()=>{F(O)},100)},K=O=>{e({command:"removeAssociation",ticketId:O}),setTimeout(()=>{F(O)},100)},F=O=>{e({command:"loadBranchInfo",ticketId:O})},U=()=>{e({command:"loadAllBranches"})},M=(O,le)=>{e({command:"openInRepository",ticketId:O,repositoryPath:le})},S=O=>{e({command:"loadLabels",teamId:O})},A=O=>{e({command:"updateLabels",labelIds:O})},P=O=>{e({command:"loadCycles",teamId:O})},W=O=>{e({command:"updateCycle",cycleId:O})};return n?(0,je.jsxs)("div",{className:vo.container,children:[(0,je.jsx)(_R,{identifier:n.identifier,title:n.title,statusName:n.state.name,statusType:n.state.type,priority:n.priority,creator:n.creator,assignee:n.assignee,url:n.url,onUpdateTitle:y}),(0,je.jsx)(DR,{states:o,currentStateId:n.state.id,onUpdate:b}),(0,je.jsx)(LR,{currentAssignee:n.assignee,users:s,onUpdateAssignee:x,onLoadUsers:k,onSearchUsers:w}),(0,je.jsx)(WR,{onOpenInLinear:E,onRefresh:_}),(0,je.jsx)(eO,{ticketId:n.identifier,statusType:n.state.type,onCheckoutBranch:C,onAssociateBranch:H,onRemoveAssociation:K,onLoadBranchInfo:F,onLoadAllBranches:U,onOpenInRepository:M,branchInfo:f||void 0,allBranches:h||void 0}),(0,je.jsx)(CR,{createdAt:n.createdAt,updatedAt:n.updatedAt,projectName:n.project?.name}),(0,je.jsx)(BR,{currentLabels:X$(n.labels),availableLabels:l,onUpdateLabels:A,onLoadLabels:S,teamId:n.team?.id}),(0,je.jsx)(zR,{currentCycle:n.cycle,availableCycles:c,onUpdateCycle:W,onLoadCycles:P,teamId:n.team?.id}),(0,je.jsx)("div",{className:vo.divider}),(0,je.jsx)(KR,{attachments:n.attachments}),n.attachments&&n.attachments.nodes.length>0&&(0,je.jsx)("div",{className:vo.divider}),(0,je.jsx)(YR,{childrenIssues:n.children,parent:n.parent,onOpenIssue:T}),(n.children&&n.children.nodes.length>0||n.parent)&&(0,je.jsx)("div",{className:vo.divider}),(0,je.jsx)(RR,{description:n.description,onUpdateDescription:v}),(0,je.jsx)("div",{className:vo.divider}),(0,je.jsx)(XR,{comments:n.comments}),(0,je.jsx)("div",{className:vo.divider}),(0,je.jsx)($R,{onSubmit:g})]}):(0,je.jsx)("div",{className:vo.container,children:(0,je.jsx)("p",{className:vo.emptyState,children:"No ticket selected"})})}var nO=Q$;var iO=R(j()),rO=document.getElementById("root");rO&&(0,oO.createRoot)(rO).render((0,iO.jsx)(nO,{}));})(); +`;document.head.appendChild(S3);var ko={container:"container_App",emptyState:"emptyState_App",divider:"divider_App"};var Ke=M(G());function U$(e){return e?Array.isArray(e)?e:"nodes"in e?e.nodes:[]:[]}function H$(){let{postMessage:e,onMessage:t}=Bw(),[n,r]=(0,Pr.useState)(window.__LINEAR_INITIAL_STATE__?.issue||null),[o,a]=(0,Pr.useState)(window.__LINEAR_INITIAL_STATE__?.workflowStates||[]),[i,s]=(0,Pr.useState)(window.__LINEAR_INITIAL_STATE__?.users||[]),[l,u]=(0,Pr.useState)([]),[c,d]=(0,Pr.useState)([]),[f,p]=(0,Pr.useState)(null),[h,m]=(0,Pr.useState)(null);(0,Pr.useEffect)(()=>t(N=>{switch(N.command){case"updateIssue":r(N.issue);break;case"workflowStates":a(N.states);break;case"usersLoaded":s(N.users);break;case"branchInfo":p({branchName:N.branchName,exists:N.exists,isInDifferentRepo:N.isInDifferentRepo,repositoryName:N.repositoryName,repositoryPath:N.repositoryPath});break;case"allBranchesLoaded":m({branches:N.branches,currentBranch:N.currentBranch,suggestions:N.suggestions});break;case"labelsLoaded":u(N.labels);break;case"cyclesLoaded":d(N.cycles);break}}),[t]);let b=N=>{e({command:"updateStatus",stateId:N})},g=N=>{e({command:"addComment",body:N})},x=N=>{e({command:"updateTitle",title:N})},y=N=>{e({command:"updateDescription",description:N})},k=N=>{e({command:"updateAssignee",assigneeId:N})},v=N=>{e({command:"loadUsers",teamId:N})},C=N=>{e({command:"searchUsers",searchTerm:N})},w=()=>{e({command:"openInLinear"})},S=()=>{e({command:"refresh"})},I=N=>{e({command:"openIssue",issueId:N})},L=N=>{e({command:"checkoutBranch",ticketId:N})},H=(N,le)=>{e({command:"associateBranch",ticketId:N,branchName:le}),setTimeout(()=>{F(N)},100)},K=N=>{e({command:"removeAssociation",ticketId:N}),setTimeout(()=>{F(N)},100)},F=N=>{e({command:"loadBranchInfo",ticketId:N})},U=()=>{e({command:"loadAllBranches"})},T=(N,le)=>{e({command:"openInRepository",ticketId:N,repositoryPath:le})},E=N=>{e({command:"loadLabels",teamId:N})},A=N=>{e({command:"updateLabels",labelIds:N})},P=N=>{e({command:"loadCycles",teamId:N})},W=N=>{e({command:"updateCycle",cycleId:N})};return n?(0,Ke.jsxs)("div",{className:ko.container,children:[(0,Ke.jsx)(KN,{identifier:n.identifier,title:n.title,statusName:n.state.name,statusType:n.state.type,priority:n.priority,creator:n.creator,assignee:n.assignee,url:n.url,onUpdateTitle:x}),(0,Ke.jsx)(n3,{states:o,currentStateId:n.state.id,onUpdate:b}),(0,Ke.jsx)(o3,{currentAssignee:n.assignee,users:i,onUpdateAssignee:k,onLoadUsers:v,onSearchUsers:C}),(0,Ke.jsx)(h3,{onOpenInLinear:w,onRefresh:S}),(0,Ke.jsx)(w3,{ticketId:n.identifier,statusType:n.state.type,onCheckoutBranch:L,onAssociateBranch:H,onRemoveAssociation:K,onLoadBranchInfo:F,onLoadAllBranches:U,onOpenInRepository:T,branchInfo:f||void 0,allBranches:h||void 0}),(0,Ke.jsx)(XN,{createdAt:n.createdAt,updatedAt:n.updatedAt,projectName:n.project?.name}),(0,Ke.jsx)(i3,{currentLabels:U$(n.labels),availableLabels:l,onUpdateLabels:A,onLoadLabels:E,teamId:n.team?.id}),(0,Ke.jsx)(l3,{currentCycle:n.cycle,availableCycles:c,onUpdateCycle:W,onLoadCycles:P,teamId:n.team?.id}),(0,Ke.jsx)("div",{className:ko.divider}),(0,Ke.jsx)(g3,{attachments:n.attachments}),n.attachments&&n.attachments.nodes.length>0&&(0,Ke.jsx)("div",{className:ko.divider}),(0,Ke.jsx)(x3,{childrenIssues:n.children,parent:n.parent,onOpenIssue:I}),(n.children&&n.children.nodes.length>0||n.parent)&&(0,Ke.jsx)("div",{className:ko.divider}),(0,Ke.jsx)(e3,{description:n.description,onUpdateDescription:y}),(0,Ke.jsx)("div",{className:ko.divider}),(0,Ke.jsx)(v3,{comments:n.comments}),(0,Ke.jsx)("div",{className:ko.divider}),(0,Ke.jsx)(d3,{onSubmit:g})]}):(0,Ke.jsx)("div",{className:ko.container,children:(0,Ke.jsx)("p",{className:ko.emptyState,children:"No ticket selected"})})}var E3=H$;var _3=M(G()),L3=document.getElementById("root");L3&&(0,I3.createRoot)(L3).render((0,_3.jsx)(E3,{}));})(); /*! Bundled license information: react/cjs/react.production.min.js: @@ -2663,4 +2663,31 @@ use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.productio * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) + +lucide-react/dist/esm/shared/src/utils.js: +lucide-react/dist/esm/defaultAttributes.js: +lucide-react/dist/esm/Icon.js: +lucide-react/dist/esm/createLucideIcon.js: +lucide-react/dist/esm/icons/arrow-down.js: +lucide-react/dist/esm/icons/arrow-right.js: +lucide-react/dist/esm/icons/arrow-up.js: +lucide-react/dist/esm/icons/check.js: +lucide-react/dist/esm/icons/external-link.js: +lucide-react/dist/esm/icons/folder-open.js: +lucide-react/dist/esm/icons/git-branch.js: +lucide-react/dist/esm/icons/git-pull-request.js: +lucide-react/dist/esm/icons/lightbulb.js: +lucide-react/dist/esm/icons/message-square.js: +lucide-react/dist/esm/icons/pencil.js: +lucide-react/dist/esm/icons/plus.js: +lucide-react/dist/esm/icons/trash-2.js: +lucide-react/dist/esm/icons/triangle-alert.js: +lucide-react/dist/esm/icons/user.js: +lucide-react/dist/esm/lucide-react.js: + (** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) */ diff --git a/webview-ui/src/create-ticket/components/TicketForm.tsx b/webview-ui/src/create-ticket/components/TicketForm.tsx index e372f5a..b98d653 100644 --- a/webview-ui/src/create-ticket/components/TicketForm.tsx +++ b/webview-ui/src/create-ticket/components/TicketForm.tsx @@ -216,10 +216,10 @@ export const TicketForm: React.FC = ({ } > - - - - + + + + diff --git a/webview-ui/src/jira/ticket-panel/components/BranchManager.tsx b/webview-ui/src/jira/ticket-panel/components/BranchManager.tsx index 2b2dbcf..24fd5bf 100644 --- a/webview-ui/src/jira/ticket-panel/components/BranchManager.tsx +++ b/webview-ui/src/jira/ticket-panel/components/BranchManager.tsx @@ -1,4 +1,14 @@ import React, { useState, useEffect } from "react"; +import { + GitBranch, + Check, + Lightbulb, + AlertTriangle, + FolderOpen, + ExternalLink, + Trash2, + Plus, +} from "lucide-react"; import styles from "./BranchManager.module.css"; interface BranchManagerProps { @@ -122,13 +132,13 @@ export const BranchManager: React.FC = ({ }; const getBranchIcon = (branch: string) => { - if (!allBranches) return "⎇"; + if (!allBranches) return ; const { currentBranch, suggestions } = allBranches; - if (branch === currentBranch) return "✓"; - if (suggestions.includes(branch)) return "💡"; - return "⎇"; + if (branch === currentBranch) return ; + if (suggestions.includes(branch)) return ; + return ; }; const getBranchLabel = (branch: string) => { @@ -155,7 +165,7 @@ export const BranchManager: React.FC = ({
- 🌿 + Branch
@@ -163,14 +173,14 @@ export const BranchManager: React.FC = ({ {branchInfo?.branchName ? (
- + {branchInfo.branchName}
{/* Branch is in a different repository */} {branchInfo.isInDifferentRepo && branchInfo.repositoryName && (
- 📂 + Branch is in {branchInfo.repositoryName}
)} @@ -178,7 +188,7 @@ export const BranchManager: React.FC = ({ {/* Branch doesn't exist and is NOT in a different repo (truly deleted) */} {!branchInfo.exists && !branchInfo.isInDifferentRepo && (
- ⚠️ + Branch no longer exists in repository
)} @@ -190,7 +200,7 @@ export const BranchManager: React.FC = ({ className={styles.checkoutButton} onClick={() => onOpenInRepository(ticketKey, branchInfo.repositoryPath!)} > - 📂 + Open in {branchInfo.repositoryName} )} @@ -201,12 +211,12 @@ export const BranchManager: React.FC = ({ className={styles.checkoutButton} onClick={handleCheckout} > - ↗️ + Checkout Branch )}
@@ -222,7 +232,7 @@ export const BranchManager: React.FC = ({ className={styles.checkoutButton} onClick={() => setIsEditing(true)} > - + + Associate Branch diff --git a/webview-ui/src/linear/create-ticket/components/TicketForm.tsx b/webview-ui/src/linear/create-ticket/components/TicketForm.tsx index 27b06ba..742d487 100644 --- a/webview-ui/src/linear/create-ticket/components/TicketForm.tsx +++ b/webview-ui/src/linear/create-ticket/components/TicketForm.tsx @@ -274,10 +274,10 @@ export const TicketForm: React.FC = ({ } > - - - - + + + +
diff --git a/webview-ui/src/linear/ticket-panel/components/AttachedPRs.tsx b/webview-ui/src/linear/ticket-panel/components/AttachedPRs.tsx index 70db0cb..c23df59 100644 --- a/webview-ui/src/linear/ticket-panel/components/AttachedPRs.tsx +++ b/webview-ui/src/linear/ticket-panel/components/AttachedPRs.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { GitPullRequest, ArrowRight } from "lucide-react"; import styles from "./AttachedPRs.module.css"; interface Attachment { @@ -44,8 +45,8 @@ function extractRepoName(url: string): string { return "Repository"; } -// Helper function to get platform icon -function getPlatformIcon(url: string): string { +// Helper function to get platform name +function getPlatformName(url: string): string { if (url.includes("github.com")) return "github"; if (url.includes("gitlab.com")) return "gitlab"; if (url.includes("bitbucket.org")) return "bitbucket"; @@ -72,7 +73,7 @@ export const AttachedPRs: React.FC = ({ attachments }) => { return (

- 🔗 + Pull Requests ({prs.length})

Click to view status on GitHub/GitLab

@@ -80,7 +81,7 @@ export const AttachedPRs: React.FC = ({ attachments }) => { {prs.map((pr) => { const prNumber = extractPRNumber(pr.url); const repoName = extractRepoName(pr.url); - const platform = getPlatformIcon(pr.url); + const platform = getPlatformName(pr.url); return ( = ({ attachments }) => { >
- - {platform === "github" && "⚡"} - {platform === "gitlab" && "🦊"} - {platform === "bitbucket" && "🪣"} - + {prNumber} {repoName}
- +
{pr.title && (
{pr.title}
diff --git a/webview-ui/src/linear/ticket-panel/components/BranchManager.tsx b/webview-ui/src/linear/ticket-panel/components/BranchManager.tsx index 57f1798..e333f5b 100644 --- a/webview-ui/src/linear/ticket-panel/components/BranchManager.tsx +++ b/webview-ui/src/linear/ticket-panel/components/BranchManager.tsx @@ -1,4 +1,14 @@ import React, { useState, useEffect } from "react"; +import { + GitBranch, + Check, + Lightbulb, + AlertTriangle, + FolderOpen, + ExternalLink, + Trash2, + Plus, +} from "lucide-react"; import styles from "./BranchManager.module.css"; interface BranchManagerProps { @@ -122,13 +132,13 @@ export const BranchManager: React.FC = ({ }; const getBranchIcon = (branch: string) => { - if (!allBranches) return "⎇"; + if (!allBranches) return ; const { currentBranch, suggestions } = allBranches; - if (branch === currentBranch) return "✓"; - if (suggestions.includes(branch)) return "💡"; - return "⎇"; + if (branch === currentBranch) return ; + if (suggestions.includes(branch)) return ; + return ; }; const getBranchLabel = (branch: string) => { @@ -154,7 +164,7 @@ export const BranchManager: React.FC = ({
- 🌿 + Branch
@@ -162,14 +172,14 @@ export const BranchManager: React.FC = ({ {branchInfo?.branchName ? (
- + {branchInfo.branchName}
{/* Branch is in a different repository */} {branchInfo.isInDifferentRepo && branchInfo.repositoryName && (
- 📂 + Branch is in {branchInfo.repositoryName}
)} @@ -177,7 +187,7 @@ export const BranchManager: React.FC = ({ {/* Branch doesn't exist and is NOT in a different repo (truly deleted) */} {!branchInfo.exists && !branchInfo.isInDifferentRepo && (
- ⚠️ + Branch no longer exists in repository
)} @@ -189,7 +199,7 @@ export const BranchManager: React.FC = ({ className={styles.checkoutButton} onClick={() => onOpenInRepository(ticketId, branchInfo.repositoryPath!)} > - 📂 + Open in {branchInfo.repositoryName} )} @@ -200,12 +210,12 @@ export const BranchManager: React.FC = ({ className={styles.checkoutButton} onClick={handleCheckout} > - ↗️ + Checkout Branch )}
@@ -221,7 +231,7 @@ export const BranchManager: React.FC = ({ className={styles.checkoutButton} onClick={() => setIsEditing(true)} > - + + Associate Branch diff --git a/webview-ui/src/linear/ticket-panel/components/Comments.tsx b/webview-ui/src/linear/ticket-panel/components/Comments.tsx index 3f8678f..938783d 100644 --- a/webview-ui/src/linear/ticket-panel/components/Comments.tsx +++ b/webview-ui/src/linear/ticket-panel/components/Comments.tsx @@ -1,4 +1,5 @@ import React, { useMemo } from "react"; +import { MessageSquare, User } from "lucide-react"; import { renderMarkdown } from "@shared/utils/markdownRenderer"; import styles from "./Comments.module.css"; @@ -47,7 +48,7 @@ export const Comments: React.FC = ({ comments }) => { return (

- 💬 + Comments ({commentCount})

@@ -70,15 +71,7 @@ export const Comments: React.FC = ({ comments }) => { /> ) : (
- - - +
)}
diff --git a/webview-ui/src/linear/ticket-panel/components/SubIssues.tsx b/webview-ui/src/linear/ticket-panel/components/SubIssues.tsx index 6345ca7..83495ec 100644 --- a/webview-ui/src/linear/ticket-panel/components/SubIssues.tsx +++ b/webview-ui/src/linear/ticket-panel/components/SubIssues.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { ArrowUp, ArrowDown, ArrowRight } from "lucide-react"; import styles from "./SubIssues.module.css"; interface SubIssue { @@ -85,7 +86,7 @@ export const SubIssues: React.FC = ({ childrenIssues, parent, on {parent && ( )} @@ -103,7 +104,7 @@ export const SubIssues: React.FC = ({ childrenIssues, parent, on {childrenIssues && childrenIssues.nodes.length > 0 && (

- ⬇️ + Sub-issues ({childrenIssues.nodes.length})

@@ -132,7 +133,7 @@ export const SubIssues: React.FC = ({ childrenIssues, parent, on )}
- +
{subIssue.title}
{subIssue.assignee && ( diff --git a/webview-ui/src/linear/ticket-panel/components/TicketHeader.tsx b/webview-ui/src/linear/ticket-panel/components/TicketHeader.tsx index 6acd42e..c3d073f 100644 --- a/webview-ui/src/linear/ticket-panel/components/TicketHeader.tsx +++ b/webview-ui/src/linear/ticket-panel/components/TicketHeader.tsx @@ -1,4 +1,5 @@ import React, { useState } from "react"; +import { Pencil } from "lucide-react"; import { Badge } from "@shared/components"; import { ShareButton } from "./ShareButton"; import styles from "./TicketHeader.module.css"; @@ -97,19 +98,7 @@ export const TicketHeader: React.FC = ({ className={styles.editButton} title="Edit title" > - - - - + )}
@@ -121,7 +110,7 @@ export const TicketHeader: React.FC = ({ {statusName} - {priorityIcon} + {priorityIcon.symbol} {priorityName} {creator && ( @@ -182,18 +171,18 @@ function getStatusColor(statusType: string): string { } } -function getPriorityIcon(priority: number): string { +function getPriorityIcon(priority: number): { color: string; symbol: string } { switch (priority) { case 1: - return "🔴"; + return { color: "#dc2626", symbol: "●" }; // Red - Urgent case 2: - return "🟠"; + return { color: "#f97316", symbol: "●" }; // Orange - High case 3: - return "🟡"; + return { color: "#eab308", symbol: "●" }; // Yellow - Medium case 4: - return "🟢"; + return { color: "#22c55e", symbol: "●" }; // Green - Low default: - return "⚪"; + return { color: "#6b7280", symbol: "○" }; // Gray - None } } diff --git a/webview-ui/src/shared/utils/adfConverter.ts b/webview-ui/src/shared/utils/adfConverter.ts index bc14268..e06588e 100644 --- a/webview-ui/src/shared/utils/adfConverter.ts +++ b/webview-ui/src/shared/utils/adfConverter.ts @@ -156,17 +156,17 @@ function convertBlockquote(node: ADFNode): string { function convertPanel(node: ADFNode): string { if (!node.content) return ""; const content = node.content.map(convertNode).join("\n"); - // Convert panels to blockquotes with emoji indicators + // Convert panels to blockquotes with text indicators const panelType = node.attrs?.panelType as string || "info"; - const emoji = { - info: "ℹ️", - note: "📝", - warning: "⚠️", - error: "❌", - success: "✅", - }[panelType] || "ℹ️"; + const prefix = { + info: "[INFO]", + note: "[NOTE]", + warning: "[WARNING]", + error: "[ERROR]", + success: "[SUCCESS]", + }[panelType] || "[INFO]"; - return `> ${emoji} ${content}`; + return `> **${prefix}** ${content}`; } /**