@inkeep/agents-manage-ui 0.39.1 → 0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/agents-manage-ui/.next/BUILD_ID +1 -1
- package/.next/standalone/agents-manage-ui/.next/app-path-routes-manifest.json +5 -5
- package/.next/standalone/agents-manage-ui/.next/build-manifest.json +3 -3
- package/.next/standalone/agents-manage-ui/.next/prerender-manifest.json +3 -3
- package/.next/standalone/agents-manage-ui/.next/react-loadable-manifest.json +8 -8
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js +42 -42
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/[externalAgentId]/edit/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/[externalAgentId]/edit/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/[externalAgentId]/edit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/[externalAgentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/[externalAgentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/external-agents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/tool-calls/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/tool-calls/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/tool-calls/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/settings/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/accept-invitation/[invitationId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/data-components/[dataComponentId]/generate-render/route.js +10 -10
- package/.next/standalone/agents-manage-ui/.next/server/app/api/data-components/[dataComponentId]/generate-render/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.segments/_full.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.segments/_head.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.segments/_index.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.segments/device/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/device.segments/device.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/index.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/index.rsc +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.segments/_full.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/logout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.segments/_full.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.segments/_head.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.segments/_index.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.segments/no-organization/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/no-organization.segments/no-organization.segment.rsc +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app-paths-manifest.json +5 -5
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2178.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/511.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/5520.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/chunks/715.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7322.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8119.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8324.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8386.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8870.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9959.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/404.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/500.html +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/28138-af9961eac3bf3ea9.js +4200 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/31231.5b75ca7a2d5cae39.js +23 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{34194.8be55739a97a63fe.js → 34194.36cfdb4b5436b93b.js} +3 -3
- package/.next/standalone/agents-manage-ui/.next/static/chunks/37482-2a0ee89b4075723d.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{52939.3f7ac18a30fb24b6.js → 52939.25f7afa45277fb17.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{19328-b4caa444b66f44db.js → 6335-184eb08d278bc8af.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/73776-1433c31bc8471278.js +14 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/78295-1da99ee483501a5d.js +123 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{39990-c94faef76573c56b.js → 78896-8cb5f9a50fc5f757.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{35481-5e8d3b1a40ea08eb.js → 84173-1371d101403528dc.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{9798a8e4-0862900761f4e98d.js → 9798a8e4-8a3d819cb56cd369.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/{layout-51bc1a3ea47cc3e4.js → layout-c2123b1bc68973ee.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/[agentId]/{page-6b7a489824327dfe.js → page-953eb709a174e728.js} +7 -7
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/{page-67208ea2d8f3d0a5.js → page-e825a6da08469d63.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-553bc564e6e2762d.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page-887b95b7a6d2bae5.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/page-cac89a86a03b45ce.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-31c89a6078ce3861.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/{page-2407e6d0e5f05bf0.js → page-e3126a95db401bc3.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/{page-855bd6dd43b1edc6.js → page-07763998a186874d.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-3c51ca71c4712062.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-e02512d58c1d7b18.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-9b06dbf873ddab74.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-980a95a77a2d5973.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/{page-374752404fabee1d.js → page-b9933b019614f4bd.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/external-agents/[externalAgentId]/edit/{page-5e7845cc36367ff4.js → page-2a1a09ec23c42466.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/external-agents/new/{page-1a540c76162e3ea3.js → page-f863dd75894728ad.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/external-agents/page-28a7facd54a3bc86.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/{page-d6549516cd400fab.js → page-4abfa23de0c5f4e7.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page-209ac9f14a53e0ea.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/new/{page-96b9a33fecaacb21.js → page-acfb35f0a6a64f7c.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-3b3111e2645ced9e.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/page-c839968d83a6514e.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/{page-6613077eb6694016.js → page-a9f763762a5ec37a.js} +2 -2
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-22f6d9b5282ab04a.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/page-1ff75fb3f9bbc94d.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{webpack-c89fa9e7952a6694.js → webpack-aa757636095e3195.js} +1 -1
- package/.next/standalone/agents-manage-ui/package.json +2 -2
- package/.next/standalone/packages/agents-core/package.json +6 -3
- package/package.json +5 -5
- package/src/app/[tenantId]/projects/[projectId]/credentials/new/page.tsx +1 -1
- package/src/components/agent/copilot/message-parts/inline-event.tsx +33 -3
- package/src/components/agent/copilot/message-parts/message.tsx +1 -6
- package/.next/standalone/agents-manage-ui/.next/server/chunks/1431.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3689.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/4987.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6916.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/911.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/18881-2c483a2ec8ed8f0d.js +0 -14
- package/.next/standalone/agents-manage-ui/.next/static/chunks/42700-f63446911cb1fff0.js +0 -4200
- package/.next/standalone/agents-manage-ui/.next/static/chunks/78295-a953cea9b4ddefb0.js +0 -123
- package/.next/standalone/agents-manage-ui/.next/static/chunks/94577.9b84635e65820d56.js +0 -23
- package/.next/standalone/agents-manage-ui/.next/static/chunks/95899-7f39b73a3363dfb6.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-d8dbaa9a9404fd66.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page-8fbc78040bb8d6e0.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/page-7e08890f6a8321fa.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-7ee6404a935a349e.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-6c834f7b32aa5977.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-14c49d36912ac557.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-e5ffb9fed00474d5.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-f2e14e60cbf372d6.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/external-agents/page-f6c6eefc8638591c.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page-a5f158a572b5e4ce.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-bc53427d6b9fced3.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/page-b82348d8c799f269.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-624d06ff55526ec0.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/page-824f71cbac99d919.js +0 -1
- /package/.next/standalone/agents-manage-ui/.next/static/{s8e62p5M4vOsvQHhlnyRJ → PIPTwlZNi1wSKTmK9vH8i}/_buildManifest.js +0 -0
- /package/.next/standalone/agents-manage-ui/.next/static/{s8e62p5M4vOsvQHhlnyRJ → PIPTwlZNi1wSKTmK9vH8i}/_ssgManifest.js +0 -0
|
@@ -85,7 +85,7 @@ commit_chars: ${e.completion.commitCharacters?.join("")}
|
|
|
85
85
|
${r}
|
|
86
86
|
// </json>
|
|
87
87
|
`;return await i.writeText(a),{reproCase:a}}}var f4=function(e,t){return function(i,n){t(i,n,e)}};class f3{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let f7=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=fj.get(this._editor);if(!t)return null;let i=e.target;if(8===i.type){let n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new oD(1e3,this,t2.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new oD(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(9===i.type&&i.element){let n=mn.getWarningWidgetContext(i.element);if(n&&t.shouldShowHoverAt(n.range))return new oD(1e3,this,n.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("onHover"!==this._editor.getOption(71).showToolbar)return[];let i=fj.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new f3(this,e.range,i)]:[]}renderHoverParts(e,t){let i=new t0.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(12)&&i.add(this.renderScreenReaderText(e,n));let s=n.controller.model.get(),o=document.createElement("div");return e.fragment.appendChild(o),i.add((0,o2.yC)((t,i)=>{let n=i.add(this._instantiationService.createInstance(ro.hot.read(t),this._editor,!1,(0,o2.lk)(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands,s.warning,()=>{e.onContentsChanged()}));o.replaceChildren(n.getDomNode())})),s.triggerExplicitly(),new oI([{hoverPart:n,hoverElement:o,dispose(){i.dispose()}}])}renderScreenReaderText(e,t){let i=new t0.Cm,n=tC.$,s=n("div.hover-row.markdown-hover"),o=tC.BC(s,n("div.hover-contents",{"aria-live":"assertive"})),r=new i4.T({editor:this._editor},this._languageService,this._openerService);return i.add((0,o2.fm)(n=>{let s=t.controller.model.read(n)?.primaryGhostText.read(n);if(s){var a;let t,n,l=this._editor.getModel().getLineContent(s.lineNumber);a=s.renderForScreenReader(l),t=tx.kg(1197,"Suggestion:"),n=i.add(r.render(new tj.Bc().appendText(t).appendCodeblock("text",a),{asyncRenderCallback:()=>{o.className="hover-contents code-hover-contents",e.onContentsChanged()}})),o.replaceChildren(n.element)}else tC.Ln(o)})),e.fragment.appendChild(s),i}};f7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([f4(1,rN.L),f4(2,i3.Cr),f4(3,rf.j),f4(4,i_._Y),f4(5,ib.k)],f7);class f9{}(0,tw.HW)(fj.ID,(U=fj.hot,(0,uf.e)()?(j=uv,class extends j{constructor(){super(...arguments),this._autorun=void 0}init(...e){this._autorun=(0,o2.yC)((t,i)=>{let n=U.read(t);this._instance=i.add(this.instantiationService.createInstance(n,...e))})}dispose(){this._autorun?.dispose()}}):U.get()),3),(0,tw.Fl)(fG),(0,tw.Fl)(fq),(0,tw.E_)(new fQ),(0,tw.Fl)(f$),(0,tw.Fl)(fK),(0,tw.Fl)(fY),(0,tw.Fl)(fZ),(0,tw.Fl)(fX),(0,tw.Fl)(f1),(0,tw.Fl)(f0),(0,tw.Fl)(fJ),(0,tL.ug)(f2),(0,tw.Fl)(f5),(0,tL.ug)(g9.KS),(0,tL.ug)(g9.un),oN.register(f7),um.register(new f9),i(7513);var f8=function(e,t){return function(i,n){t(i,n,e)}};let f6=class{static{e1=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new t0.Cm,this.toUnhookForKeyboard=new t0.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new ad(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)})),this.toUnhook.add(s.onExecute(e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch(e=>{(0,iT.dz)(e)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(e1.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){let t;this.toUnhookForKeyboard.clear();let i=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;let n=new iY.$t(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,tJ.SS)(t=>this.findDefinition(e,t));try{t=await this.previousPromise}catch(e){(0,iT.dz)(e);return}if(!t||!t.length||!n.validate(this.editor))return void this.removeLinkDecorations();let s=t[0].originSelectionRange?t2.Q.lift(t[0].originSelectionRange):new t2.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(t.length>1){let e=s;for(let{originSelectionRange:i}of t)i&&(e=t2.Q.plusRange(e,i));this.addDecoration(e,new tj.Bc().appendText(tx.kg(1072,"Click to show {0} definitions.",t.length)))}else{let e=t[0];if(!e.uri)return;return this.textModelResolverService.createModelReference(e.uri).then(t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();let{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();let o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(s,o?new tj.Bc().appendCodeblock(r||"",o):void 0),t.dispose()})}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=e1.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),n=e.validateRange(n),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s<i.endLineNumber;s++)n=Math.min(n,e.getLineFirstNonWhitespaceColumn(s));return e.getValueInRange(i).replace(RegExp(`^\\s{${n-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+e1.MAX_SOURCE_PREVIEW_LINES),s=t+1;for(;s<n&&i!==e.getLineFirstNonWhitespaceColumn(s);s++);return new t2.Q(t,1,s+1,1)}addDecoration(e,t){this.linkDecorations.set([{range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}}])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&6===e.target.type&&!(e.target.detail.injectedText?.options instanceof t4.Ho)&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let i=this.editor.getModel();return i?lw(this.languageFeaturesService.definitionProvider,i,e,!1,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(e=>{let i=!t&&this.editor.getOption(101)&&!this.isInPeekEditor(e);return new lN({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)})}isInPeekEditor(e){let t=e.get(tI.fN);return ev.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};f6=e1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([f8(1,as.b),f8(2,rN.L),f8(3,iQ.u)],f6),(0,tw.HW)(f6.ID,f6,2);var _e=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_t=function(e,t){return function(i,n){t(i,n,e)}};class _i{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let _n=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new i5.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new t0.Cm,this._markers=[],this._nextIdx=-1,iW.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,iZ.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?t2.Q.compareRangesUsingStarts(e,t)||sO.cj.compare(e.severity,t.severity):sO.cj.compare(e.severity,t.severity)||t2.Q.compareRangesUsingStarts(e,t)),i},o=()=>{let t=this._markerService.read({resource:iW.r.isUri(e)?e:void 0,severities:sO.cj.Error|sO.cj.Warning|sO.cj.Info});return"function"==typeof e&&(t=t.filter(e=>this._resourceFilter(e.resource))),t.sort(s),!(0,iy.aI)(t,this._markers,(e,t)=>e.resource.toString()===t.resource.toString()&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn&&e.severity===t.severity&&e.message===t.message)&&(this._markers=t,!0)};o(),this._dispoables.add(t.onMarkerChanged(e=>{(!this._resourceFilter||e.some(e=>this._resourceFilter(e)))&&o()&&(this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!!this._resourceFilter&&!!e&&this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new _i(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=this._markers.findIndex(t=>(0,nt.n4)(t.resource,e.uri));if(n<0)(n=(0,iy.Uw)(this._markers.length,t=>(0,iZ.UD)(this._markers[t].resource.toString(),e.uri.toString())))<0&&(n=~n),i?this._nextIdx=n:this._nextIdx=(this._markers.length+n-1)%this._markers.length;else{let s=!1,o=!1;for(let i=n;i<this._markers.length;i++){let n=t2.Q.lift(this._markers[i]);if(n.isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());t&&(n=new t2.Q(n.startLineNumber,t.startColumn,n.startLineNumber,t.endColumn))}if(t&&(n.containsPosition(t)||t.isBeforeOrEqual(n.getStartPosition()))){this._nextIdx=i,s=!0,o=!n.containsPosition(t);break}if(this._markers[i].resource.toString()!==e.uri.toString())break}s?o&&!i&&(this._nextIdx-=1):this._nextIdx=i?0:this._markers.length-1}this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(0===this._markers.length)return!1;let n=this._nextIdx;return -1===this._nextIdx?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex(t=>t.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(t2.Q.containsPosition(this._markers[i],t))return new _i(this._markers[i],i+1,this._markers.length)}}};_n=_e([_t(1,sO.DR),_t(2,tD.pG)],_n);let _s=(0,i_.u1)("IMarkerNavigationService"),_o=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new pm.w}getMarkerList(e){for(let t of this._provider){let i=t.getMarkerList(e);if(i)return i}return new _n(e,this._markerService,this._configService)}};_o=_e([_t(0,sO.DR),_t(1,tD.pG)],_o),(0,nX.v)(_s,_o,1),i(20700),i(44269);var _r=i(41132);(e2||(e2={})).className=function(e){switch(e){case _r.A.Ignore:return"severity-ignore "+iX.L.asClassName(tb.W.info);case _r.A.Info:return iX.L.asClassName(tb.W.info);case _r.A.Warning:return iX.L.asClassName(tb.W.warning);case _r.A.Error:return iX.L.asClassName(tb.W.error);default:return""}};var _a=function(e,t){return function(i,n){t(i,n,e)}};class _l{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new t0.Cm,this._editor=t;const o=document.createElement("div");o.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.add(tC.un(this._relatedBlock,"click",e=>{e.preventDefault();let t=this._relatedDiagnostics.get(e.target);t&&i(t)})),this._scrollable=new pI.Se(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(e=>{o.style.left=`-${e.scrollLeft}px`,o.style.top=`-${e.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,t0.AS)(this._disposables)}update(e){let{source:t,message:i,relatedInformation:n,code:s}=e,o=(t?.length||0)+2;s&&("string"==typeof s?o+=s.length:o+=s.value.length);let r=(0,iZ.uz)(i);for(let e of(this._lines=r.length,this._longestLineLength=0,r))this._longestLineLength=Math.max(e.length+o,this._longestLineLength);tC.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(let e of r)(a=document.createElement("div")).innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){let e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){let i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){let t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=tC.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},tC.BC(this._codeLink,tC.$("span")).innerText=s.value,e.appendChild(this._codeLink)}if(tC.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,iy.EI)(n)){let e=this._relatedBlock.appendChild(document.createElement("div"));for(let t of(e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(75))}px`,this._lines+=1,n)){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}let l=this._editor.getOption(59),h=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:h,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case sO.cj.Error:t=tx.kg(1019,"Error");break;case sO.cj.Warning:t=tx.kg(1020,"Warning");break;case sO.cj.Info:t=tx.kg(1021,"Info");break;case sO.cj.Hint:t=tx.kg(1022,"Hint")}let i=tx.kg(1023,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){let t=n.getLineContent(e.startLineNumber);i=`${t}, ${i}`}return i}}let _h=class extends aO{static{e5=this}static{this.TitleMenu=new tL.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,s,o,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=o,this._labelService=r,this._callOnDispose=new t0.Cm,this._onDidSelectRelatedInformation=new i5.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=sO.cj.Warning,this._backgroundColor=oE.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(_b);let t=_g,i=_p;this._severity===sO.cj.Warning?(t=_m,i=_f):this._severity===sO.cj.Info&&(t=__,i=_v);let n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(aA),secondaryHeadingColor:e.getColor(aF)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(e=>this.editor.focus()));let t=this._menuService.getMenuActions(e5.TitleMenu,this._contextKeyService),i=(0,o5.ej)(t);this._actionbarWidget.push(i,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=tC.BC(e,tC.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new _l(this._container,this.editor,e=>this._onDidSelectRelatedInformation.fire(e),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=t2.Q.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());let r=this.editor.getModel();if(r){let e=i>1?tx.kg(1024,"{0} of {1} problems",t,i):tx.kg(1025,"{0} of {1} problem",t,i);this.setTitle((0,nt.P8)(r.uri),e)}this._icon.className=`codicon ${e2.className(sO.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};_h=e5=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_a(1,t7.Gy),_a(2,i3.Cr),_a(3,tL.ez),_a(4,i_._Y),_a(5,tI.fN),_a(6,aJ.L)],_h);let _d=(0,t3.yLr)(t3.Rbi,t3.AN$),_c=(0,t3.yLr)(t3.Hng,t3.Stt),_u=(0,t3.yLr)(t3.pOz,t3.IIb),_g=(0,t3.x1A)("editorMarkerNavigationError.background",{dark:_d,light:_d,hcDark:t3.b1q,hcLight:t3.b1q},tx.kg(1026,"Editor marker navigation widget error color.")),_p=(0,t3.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,t3.JO0)(_g,.1),light:(0,t3.JO0)(_g,.1),hcDark:null,hcLight:null},tx.kg(1027,"Editor marker navigation widget error heading background.")),_m=(0,t3.x1A)("editorMarkerNavigationWarning.background",{dark:_c,light:_c,hcDark:t3.b1q,hcLight:t3.b1q},tx.kg(1028,"Editor marker navigation widget warning color.")),_f=(0,t3.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,t3.JO0)(_m,.1),light:(0,t3.JO0)(_m,.1),hcDark:"#0C141F",hcLight:(0,t3.JO0)(_m,.2)},tx.kg(1029,"Editor marker navigation widget warning heading background.")),__=(0,t3.x1A)("editorMarkerNavigationInfo.background",{dark:_u,light:_u,hcDark:t3.b1q,hcLight:t3.b1q},tx.kg(1030,"Editor marker navigation widget info color.")),_v=(0,t3.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,t3.JO0)(__,.1),light:(0,t3.JO0)(__,.1),hcDark:null,hcLight:null},tx.kg(1031,"Editor marker navigation widget info heading background.")),_b=(0,t3.x1A)("editorMarkerNavigation.background",t3.YtV,tx.kg(1032,"Editor marker navigation widget background."));var _C=function(e,t){return function(i,n){t(i,n,e)}};let _w=class{static{e4=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(e4.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new t0.Cm,this._editor=e,this._widgetVisible=_D.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(_h,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e=>{this._model?.selected&&t2.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:t2.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=this._getOrCreateModel(t.uri);i.resetIndex(),i.move(!0,t,new t1.y(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}async navigate(e,t){if(!this._editor.hasModel())return;let i=this._editor.getModel(),n=this._getOrCreateModel(t?void 0:i.uri);if(n.move(e,i,this._editor.getPosition()),n.selected)if(n.selected.marker.resource.toString()!==i.uri.toString()){this._cleanUp();let i=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);i&&(e4.get(i)?.close(),e4.get(i)?.navigate(e,t))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}};_w=e4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_C(1,_s),_C(2,tI.fN),_C(3,ty.T),_C(4,i_._Y)],_w);class _y extends tw.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&await _w.get(t)?.navigate(this._next,this._multiFile)}}class _S extends _y{static{this.ID="editor.action.marker.next"}static{this.LABEL=tx.aS(1015,"Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:_S.ID,label:_S.LABEL,precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:578,weight:100},menuOpts:{menuId:_h.TitleMenu,title:_S.LABEL.value,icon:(0,sQ.pU)("marker-navigation-next",tb.W.arrowDown,tx.kg(1011,"Icon for goto next marker.")),group:"navigation",order:1}})}}class _k extends _y{static{this.ID="editor.action.marker.prev"}static{this.LABEL=tx.aS(1016,"Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:_k.ID,label:_k.LABEL,precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:1602,weight:100},menuOpts:{menuId:_h.TitleMenu,title:_k.LABEL.value,icon:(0,sQ.pU)("marker-navigation-previous",tb.W.arrowUp,tx.kg(1012,"Icon for goto previous marker.")),group:"navigation",order:2}})}}class _x extends _y{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:tx.aS(1017,"Go to Next Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:66,weight:100},menuOpts:{menuId:tL.D8.MenubarGoMenu,title:tx.kg(1013,"Next &&Problem"),group:"6_problem_nav",order:1}})}}class _L extends _y{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:tx.aS(1018,"Go to Previous Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:1090,weight:100},menuOpts:{menuId:tL.D8.MenubarGoMenu,title:tx.kg(1014,"Previous &&Problem"),group:"6_problem_nav",order:2}})}}(0,tw.HW)(_w.ID,_w,4),(0,tw.Fl)(_S),(0,tw.Fl)(_k),(0,tw.Fl)(_x),(0,tw.Fl)(_L);let _D=new tI.N1("markersNavigationVisible",!1),_I=tw.DX.bindToContribution(_w.get);(0,tw.E_)(new _I({id:"closeMarkersNavigation",precondition:_D,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:tk.R.focus,primary:9,secondary:[1033]}}));var _N=i(2281),_E=i(57270),_M=i(65212),_T=i(55146);class _R extends tw.ks{constructor(){super({id:"editor.action.debugEditorGpuRenderer",label:(0,tx.aS)(1096,"Developer: Debug Editor GPU Renderer"),precondition:tI.M$.true()})}async run(e,t){let i=e.get(i_._Y),n=e.get(iF.GK),s=await n.pick([{label:(0,tx.kg)(1093,"Log Texture Atlas Stats"),id:"logTextureAtlasStats"},{label:(0,tx.kg)(1094,"Save Texture Atlas"),id:"saveTextureAtlas"},{label:(0,tx.kg)(1095,"Draw Glyph"),id:"drawGlyph"}],{canPickMany:!1});if(s)switch(s.id){case"logTextureAtlasStats":i.invokeFunction(e=>{let t=e.get(im.rr),i=_T.n.atlas;if(!_T.n.atlas)return void t.error("No texture atlas found");let n=i.getStats();t.info(["Texture atlas stats",...n].join("\n\n"))});break;case"saveTextureAtlas":i.invokeFunction(async e=>{let t=e.get(ni.VR),i=e.get(pT),n=t.getWorkspace().folders;if(n.length>0){let e=_T.n.atlas,t=[];for(let[s,o]of e.pages.entries())t.push(i.writeFile(iW.r.joinPath(n[0].uri,`textureAtlasPage${s}_actual.png`),_N.MB.wrap(new Uint8Array(await (await o.source.convertToBlob()).arrayBuffer()))),i.writeFile(iW.r.joinPath(n[0].uri,`textureAtlasPage${s}_usage.png`),_N.MB.wrap(new Uint8Array(await (await o.getUsagePreview()).arrayBuffer()))));await Promise.all(t)}});break;case"drawGlyph":i.invokeFunction(async e=>{let t=e.get(tD.pG),i=e.get(pT),n=e.get(iF.GK),s=e.get(ni.VR).getWorkspace().folders;if(0===s.length)return;let o=_T.n.atlas,r=t.getValue("editor.fontFamily"),a=t.getValue("editor.fontSize"),l=new _M.O(a,r,(0,tC.fz)().devicePixelRatio,_T.n.decorationStyleCache),h=await n.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!h)return;let d=h.match(/0x(?<codePoint>[0-9a-f]+)/i)?.groups?.codePoint;void 0!==d&&(h=String.fromCodePoint(parseInt(d,16)));let c=o.getGlyph(l,h,0,0,0);if(!c)return;let u=o.pages[c.pageIndex].source.getContext("2d")?.getImageData(c.x,c.y,c.w,c.h);if(!u)return;let g=new OffscreenCanvas(u.width,u.height);(0,_E.HS)(g.getContext("2d")).putImageData(u,0,0);let p=await g.convertToBlob({type:"image/png"}),m=iW.r.joinPath(s[0].uri,`glyph_${h}_0_${a}px_${r.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await i.writeFile(m,_N.MB.wrap(new Uint8Array(await p.arrayBuffer())))})}}}(0,tw.Fl)(_R),($=e3||(e3={})).NoAutoFocus="noAutoFocus",$.FocusIfVisible="focusIfVisible",$.AutoFocusImmediately="autoFocusImmediately";class _O extends tw.ks{constructor(){super({id:oq,label:tx.aS(1102,"Show or Focus Hover"),metadata:{description:tx.aS(1103,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[e3.NoAutoFocus,e3.FocusIfVisible,e3.AutoFocusImmediately],enumDescriptions:[tx.kg(1099,"The hover will not automatically take focus."),tx.kg(1100,"The hover will take focus only if it is already visible."),tx.kg(1101,"The hover will automatically take focus when it appears.")],default:e3.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:(0,t$.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;let n=l1.get(t);if(!n)return;let s=i?.focus,o=e3.FocusIfVisible;Object.values(e3).includes(s)?o=s:"boolean"==typeof s&&s&&(o=e3.AutoFocusImmediately);let r=e=>{let i=t.getPosition(),s=new t2.Q(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(s,1,2,e)},a=2===t.getOption(2);n.isHoverVisible?o!==e3.NoAutoFocus?n.focus():r(a):r(a||o===e3.AutoFocusImmediately)}}class _P extends tw.ks{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:tx.aS(1104,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:tx.aS(1105,"Show the definition preview hover in the editor.")}})}run(e,t){let i=l1.get(t);if(!i)return;let n=t.getPosition();if(!n)return;let s=new t2.Q(n.lineNumber,n.column,n.lineNumber,n.column),o=f6.get(t);o&&o.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,2,!0)})}}class _A extends tw.ks{constructor(){super({id:"editor.action.hideHover",label:tx.aS(1106,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(e,t){l1.get(t)?.hideContentHover()}}class _F extends tw.ks{constructor(){super({id:"editor.action.scrollUpHover",label:tx.aS(1107,"Scroll Up Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:16,weight:100},metadata:{description:tx.aS(1108,"Scroll up the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.scrollUp()}}class _B extends tw.ks{constructor(){super({id:"editor.action.scrollDownHover",label:tx.aS(1109,"Scroll Down Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:18,weight:100},metadata:{description:tx.aS(1110,"Scroll down the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.scrollDown()}}class _W extends tw.ks{constructor(){super({id:"editor.action.scrollLeftHover",label:tx.aS(1111,"Scroll Left Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:15,weight:100},metadata:{description:tx.aS(1112,"Scroll left the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.scrollLeft()}}class _H extends tw.ks{constructor(){super({id:"editor.action.scrollRightHover",label:tx.aS(1113,"Scroll Right Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:17,weight:100},metadata:{description:tx.aS(1114,"Scroll right the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.scrollRight()}}class _V extends tw.ks{constructor(){super({id:"editor.action.pageUpHover",label:tx.aS(1115,"Page Up Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:tx.aS(1116,"Page up the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.pageUp()}}class _z extends tw.ks{constructor(){super({id:"editor.action.pageDownHover",label:tx.aS(1117,"Page Down Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:tx.aS(1118,"Page down the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.pageDown()}}class _U extends tw.ks{constructor(){super({id:"editor.action.goToTopHover",label:tx.aS(1119,"Go To Top Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:tx.aS(1120,"Go to the top of the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.goToTop()}}class _j extends tw.ks{constructor(){super({id:"editor.action.goToBottomHover",label:tx.aS(1121,"Go To Bottom Hover"),precondition:tk.R.hoverFocused,kbOpts:{kbExpr:tk.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:tx.aS(1122,"Go to the bottom of the editor hover.")}})}run(e,t){let i=l1.get(t);i&&i.goToBottom()}}class _$ extends tw.ks{constructor(){super({id:oQ,label:oY,alias:"Increase Hover Verbosity Level",precondition:tk.R.hoverVisible})}run(e,t,i){let n=l1.get(t);if(!n)return;let s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(iq.M$.Increase,s,i?.focus)}}class _K extends tw.ks{constructor(){super({id:oZ,label:oX,alias:"Decrease Hover Verbosity Level",precondition:tk.R.hoverVisible})}run(e,t,i){let n=l1.get(t);if(!n)return;let s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();l1.get(t)?.updateHoverVerbosityLevel(iq.M$.Decrease,s,i?.focus)}}var _G=i(28137),_q=function(e,t){return function(i,n){t(i,n,e)}};let _Q=tC.$;class _Y{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let _Z={type:1,filter:{include:sv.QuickFix},triggerAction:el.QuickFixHover},_X=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];let i=this._editor.getModel(),n=e.range;if(!i.isValidRange(e.range))return[];let s=n.startLineNumber,o=i.getLineMaxColumn(s),r=[];for(let n of t){let t=n.range.startLineNumber===s?n.range.startColumn:1,a=n.range.endLineNumber===s?n.range.endColumn:o,l=this._markerDecorationsService.getMarker(i.uri,n);if(!l)continue;let h=new t2.Q(e.range.startLineNumber,t,e.range.startLineNumber,a);r.push(new _Y(this,h,l))}return r}renderHoverParts(e,t){if(!t.length)return new oI([]);let i=[];t.forEach(t=>{let n=this._renderMarkerHover(t);e.fragment.appendChild(n.hoverElement),i.push(n)});let n=1===t.length?t[0]:t.sort((e,t)=>sO.cj.compare(e.marker.severity,t.marker.severity))[0];return new oI(i,this._renderMarkerStatusbar(e,n))}_renderMarkerHover(e){let t=new t0.Cm,i=_Q("div.hover-row"),n=tC.BC(i,_Q("div.marker.hover-contents")),{source:s,message:o,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);let l=tC.BC(n,_Q("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=o,s||r)if(r&&"string"!=typeof r){let e=_Q("span");s&&(tC.BC(e,_Q("span")).innerText=s);let i=tC.BC(e,_Q("a.code-link"));i.setAttribute("href",r.target.toString(!0)),t.add(tC.ko(i,"click",e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})),tC.BC(i,_Q("span")).innerText=r.value;let o=tC.BC(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{let e=tC.BC(n,_Q("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&r?`${s}(${r})`:s||`(${r})`}if((0,iy.EI)(a))for(let{message:e,resource:i,startLineNumber:s,startColumn:o}of a){let r=tC.BC(n,_Q("div"));r.style.marginTop="8px";let a=tC.BC(r,_Q("a"));a.innerText=`${(0,nt.P8)(i)}(${s}, ${o}): `,a.style.cursor="pointer",t.add(tC.ko(a,"click",e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){let e={selection:{startLineNumber:s,startColumn:o}};this._openerService.open(i,{fromUserGesture:!0,editorOptions:e}).catch(iT.dz)}}));let l=tC.BC(r,_Q("span"));l.innerText=e,this._editor.applyFontInfo(l)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}_renderMarkerStatusbar(e,t){let i=new t0.Cm;if(t.marker.severity===sO.cj.Error||t.marker.severity===sO.cj.Warning||t.marker.severity===sO.cj.Info){let i=_w.get(this._editor);i&&e.statusBar.addAction({label:tx.kg(1132,"View Problem"),commandId:_S.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(104)){let n=e.statusBar.append(_Q("div"));this.recentMarkerCodeActionsInfo&&(sO.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===sO.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=tx.kg(1133,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?t0.jG.None:(0,tJ.EQ)(()=>n.textContent=tx.kg(1134,"Checking for quick fixes..."),200,i);n.textContent||(n.textContent=String.fromCharCode(160));let o=this.getCodeActions(t.marker);i.add((0,t0.s)(()=>o.cancel())),o.then(o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),n.textContent=tx.kg(1135,"No quick fixes available");return}n.style.display="none";let r=!1;i.add((0,t0.s)(()=>{r||o.dispose()})),e.statusBar.addAction({label:tx.kg(1136,"Quick Fix..."),commandId:sS,run:t=>{r=!0;let i=s3.get(this._editor),n=tC.BK(t);e.hide(),i?.showCodeActions(_Z,o,{x:n.left,y:n.top,width:n.width,height:n.height})}});let a=o.validActions.find(e=>e.action.isAI);a&&e.statusBar.addAction({label:a.action.title,commandId:a.action.command?.id??"",iconClass:iX.L.asClassName(tb.W.sparkle),run:()=>{let e=s3.get(this._editor);e?.applyCodeAction(a,!1,!1,eh.FromProblemsHover)}}),e.onContentsChanged()},iT.dz)}return i}getCodeActions(e){return(0,tJ.SS)(t=>sM(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new t2.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),_Z,iA.ke.None,t))}};_X=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_q(1,_G.A),_q(2,i3.Cr),_q(3,iQ.u)],_X);class _J{constructor(e){this._editor=e}computeSync(e){let t=e=>({value:e}),i=this._editor.getLineDecorations(e.lineNumber),n=[],s="lineNo"===e.laneOrLine;if(!i)return n;for(let o of i){let i=o.options.glyphMargin?.position??t5.ZS.Center;if(!s&&i!==e.laneOrLine)continue;let r=s?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;!r||(0,tj.it)(r)||n.push(...(0,iy._j)(r).map(t))}return n}}var _0=function(e,t){return function(i,n){t(i,n,e)}};let _1=tC.$,_2=class extends t0.jG{static{e7=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new t0.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new r_.N4(!0)),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=new i4.T({editor:this._editor},t,i),this._hoverOperation=this._register(new rc(this._editor,new _J(this._editor))),this._register(this._hoverOperation.onResult(e=>this._withResult(e))),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()})),this._register(tC.un(this._hover.containerDomNode,"mouseleave",e=>{this._onMouseLeave(e)})),this._editor.addOverlayWidget(this)}dispose(){this._hoverComputerOptions=void 0,this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e7.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(e=>this._editor.applyFontInfo(e))}_onModelDecorationsChanged(){this._isVisible&&this._hoverComputerOptions&&(this._hoverOperation.cancel(),this._hoverOperation.start(0,this._hoverComputerOptions))}showsOrWillShow(e){let t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._hoverComputerOptions&&this._hoverComputerOptions.lineNumber===e&&this._hoverComputerOptions.laneOrLine===t||(this._hoverOperation.cancel(),this.hide(),this._hoverComputerOptions={lineNumber:e,laneOrLine:t},this._hoverOperation.start(0,this._hoverComputerOptions))}hide(){this._hoverComputerOptions=void 0,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e.value,this._messages.length>0?this._renderMessages(e.options.lineNumber,e.options.laneOrLine,this._messages):this.hide()}_renderMessages(e,t,i){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let e of i){let t=_1("div.hover-row.markdown-hover"),i=tC.BC(t,_1("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(e.value));i.appendChild(s.element),n.appendChild(t)}this._updateContents(n),this._showAt(e,t)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e,t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),o=this._editor.getOption(75),r=this._hover.containerDomNode.clientHeight,a=i.glyphMarginLeft+i.glyphMarginWidth+("lineNo"===t?i.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${a}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(n-s-(r-o)/2),0)}px`,this._hover.containerDomNode.style.zIndex="11"}_onMouseLeave(e){let t=this._editor.getDomNode();t&&rh(t,e.x,e.y)||this.hide()}};_2=e7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_0(1,rN.L),_0(2,i3.Cr)],_2);let _5=class extends t0.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new t0.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new tJ.uC(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){let e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(e=>this._onEditorMouseDown(e))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._listenersStore.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))):(this._listenersStore.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._listenersStore.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))),this._listenersStore.add(this._editor.onMouseLeave(e=>this._onEditorMouseLeave(e))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this.hideGlyphHover()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(e=>this._onEditorScrollChanged(e)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideGlyphHover()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._isMouseOnGlyphHoverWidget(e)||this.hideGlyphHover()}_isMouseOnGlyphHoverWidget(e){let t=this._glyphWidget?.getDomNode();return!!t&&rh(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnGlyphHoverWidget(e)||this.hideGlyphHover())}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,i=this._isMouseOnGlyphHoverWidget(e);return t&&i}_onEditorMouseMove(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||((this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e))?this._reactToEditorMouseMoveRunner.cancel():this._reactToEditorMouseMove(e))}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||this.hideGlyphHover()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this.hideGlyphHover()}hideGlyphHover(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(_2,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};_5=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(K=i_._Y,function(e,t){K(e,t,1)})],_5);class _4{}class _3{}class _7{}(0,tw.HW)(l1.ID,l1,2),(0,tw.HW)(_5.ID,_5,2),(0,tw.Fl)(_O),(0,tw.Fl)(_P),(0,tw.Fl)(_A),(0,tw.Fl)(_F),(0,tw.Fl)(_B),(0,tw.Fl)(_W),(0,tw.Fl)(_H),(0,tw.Fl)(_V),(0,tw.Fl)(_z),(0,tw.Fl)(_U),(0,tw.Fl)(_j),(0,tw.Fl)(_$),(0,tw.Fl)(_K),oN.register(rH),oN.register(_X),(0,t7.zy)((e,t)=>{let i=e.getColor(t3.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}),um.register(new _4),um.register(new _3),um.register(new _7);var _9=i(39443);function _8(e,t){let i=0;for(let n=0;n<e.length;n++)" "===e.charAt(n)?i+=t:i++;return i}function _6(e,t,i){e=e<0?0:e;let n="";if(!i){let i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+=" "}for(let t=0;t<e;t++)n+=" ";return n}var ve=i(49402),vt=i(74813),vi=i(71179);function vn(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let s=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!s)return[];let o=new vi.no(e,s,t);for(n=Math.min(n,e.getLineCount());i<=n&&o.shouldIgnore(i);)i++;if(i>n-1)return[];let{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=(e,t)=>(t=t||1,_9.Y.shiftIndent(e,e.length+t,r,a,l)),d=(e,t)=>(t=t||1,_9.Y.unshiftIndent(e,e.length+t,r,a,l)),c=[],u=e.getLineContent(i),g=iZ.UU(u),p=g;o.shouldIncrease(i)?(p=h(p),g=h(g)):o.shouldIndentNextLine(i)&&(p=h(p)),i++;for(let t=i;t<=n;t++){var m,f;if(m=e,f=t,m.tokenization.isCheapToTokenize(f)&&2===m.tokenization.getLineTokens(f).getStandardTokenType(0))continue;let i=e.getLineContent(t),n=iZ.UU(i),s=p;o.shouldDecrease(t,s)&&(p=d(p),g=d(g)),n!==p&&c.push(ao.k.replaceMove(new tK.L(t,1,t,n.length+1),(0,vt.P)(p,a,l))),o.shouldIgnore(t)||(p=o.shouldIncrease(t,s)?g=h(g):o.shouldIndentNextLine(t,s)?h(p):g)}return c}class vs extends tw.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:vs.ID,label:tx.aS(1141,"Convert Indentation to Spaces"),precondition:tk.R.writable,metadata:{description:tx.aS(1142,"Convert the tab indentation to spaces.")}})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;let o=new vf(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class vo extends tw.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:vo.ID,label:tx.aS(1143,"Convert Indentation to Tabs"),precondition:tk.R.writable,metadata:{description:tx.aS(1144,"Convert the spaces indentation to tabs.")}})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;let o=new v_(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class vr extends tw.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let i=e.get(iF.GK),n=e.get(sf.S),s=t.getModel();if(!s)return;let o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map(e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?tx.kg(1137,"Configured Tab Size"):e===o.tabSize?tx.kg(1138,"Default Tab Size"):e===r.tabSize?tx.kg(1139,"Current Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:tx.kg(1140,"Select Tab Size for Current File"),activeItem:a[l]}).then(e=>{if(e&&s&&!s.isDisposed()){let t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}})},50)}}class va extends vr{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:va.ID,label:tx.aS(1145,"Indent Using Tabs"),precondition:void 0,metadata:{description:tx.aS(1146,"Use indentation with tabs.")}})}}class vl extends vr{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:vl.ID,label:tx.aS(1147,"Indent Using Spaces"),precondition:void 0,metadata:{description:tx.aS(1148,"Use indentation with spaces.")}})}}class vh extends vr{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:vh.ID,label:tx.aS(1149,"Change Tab Display Size"),precondition:void 0,metadata:{description:tx.aS(1150,"Change the space size equivalent of the tab.")}})}}class vd extends tw.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:vd.ID,label:tx.aS(1151,"Detect Indentation from Content"),precondition:void 0,metadata:{description:tx.aS(1152,"Detect the indentation from content.")}})}run(e,t){let i=e.get(sf.S),n=t.getModel();if(!n)return;let s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}class vc extends tw.ks{constructor(){super({id:"editor.action.reindentlines",label:tx.aS(1153,"Reindent Lines"),precondition:tk.R.writable,metadata:{description:tx.aS(1154,"Reindent the lines of the editor.")}})}run(e,t){let i=e.get(af.JZ),n=t.getModel();if(!n)return;let s=vn(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class vu extends tw.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:tx.aS(1155,"Reindent Selected Lines"),precondition:tk.R.writable,metadata:{description:tx.aS(1156,"Reindent the selected lines of the editor.")}})}run(e,t){let i=e.get(af.JZ),n=t.getModel();if(!n)return;let s=t.getSelections();if(null===s)return;let o=[];for(let e of s){let t=e.startLineNumber,s=e.endLineNumber;if(t!==s&&1===e.endColumn&&s--,1===t){if(t===s)continue}else t--;let r=vn(n,i,t,s);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class vg{constructor(e,t){for(const i of(this._initialSelection=t,this._edits=[],this._selectionId=null,e))i.range&&"string"==typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(t2.Q.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let vp=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new t0.Cm,this.callOnModel=new t0.Cm,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!this.editor.getOption(17)||4>this.editor.getOption(16)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){var t,i;let n,s=this.editor.getSelections();if(null===s||s.length>1)return;let o=this.editor.getModel();if(!o||this.rangeContainsOnlyWhitespaceCharacters(o,e)||!this.editor.getOption(18)&&(t=o,i=e,(n=e=>2===(0,p3.Tf)(t,e))(i.getStartPosition())||n(i.getEndPosition()))||!o.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let r=this.editor.getOption(16),{tabSize:a,indentSize:l,insertSpaces:h}=o.getOptions(),d=[],c={shiftIndent:e=>_9.Y.shiftIndent(e,e.length+1,a,l,h),unshiftIndent:e=>_9.Y.unshiftIndent(e,e.length+1,a,l,h)},u=e.startLineNumber,g=o.getLineContent(u);if(!/\S/.test(g.substring(0,e.startColumn-1))){let e=(0,ve.$f)(r,o,o.getLanguageId(),u,c,this._languageConfigurationService);if(null!==e){let t=iZ.UU(g),i=_8(e,a);if(i!==_8(t,a)){let e=_6(i,a,h);d.push({range:new t2.Q(u,1,u,t.length+1),text:e}),g=e+g.substring(t.length)}else{let e=(0,ve.Yb)(o,u,this._languageConfigurationService);if(0===e||8===e)return}}}let p=u;for(;u<e.endLineNumber;){if(!/\S/.test(o.getLineContent(u+1))){u++;continue}break}if(u!==e.endLineNumber){let t=(0,ve.$f)(r,{tokenization:{getLineTokens:e=>o.tokenization.getLineTokens(e),getLanguageId:()=>o.getLanguageId(),getLanguageIdAtPosition:(e,t)=>o.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===p?g:o.getLineContent(e)},o.getLanguageId(),u+1,c,this._languageConfigurationService);if(null!==t){let i=_8(t,a),n=_8(iZ.UU(o.getLineContent(u+1)),a);if(i!==n){let t=i-n;for(let i=u+1;i<=e.endLineNumber;i++){let e=o.getLineContent(i),n=iZ.UU(e),s=_6(_8(n,a)+t,a,h);s!==n&&d.push({range:new t2.Q(i,1,i,n.length+1),text:s})}}}}if(d.length>0){this.editor.pushUndoStop();let e=new vg(d,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){let i=e=>0===e.trim().length,n=!0;if(t.startLineNumber===t.endLineNumber)n=i(e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1));else for(let s=t.startLineNumber;s<=t.endLineNumber;s++){let o=e.getLineContent(s);if(!(n=s===t.startLineNumber?i(o.substring(t.startColumn-1)):s===t.endLineNumber?i(o.substring(0,t.endColumn-1)):0===e.getLineFirstNonWhitespaceColumn(s)))break}return n}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function vm(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let e=0;e<i;e++)s+=" ";let o=RegExp(s,"gi");for(let i=1,r=e.getLineCount();i<=r;i++){let r=e.getLineFirstNonWhitespaceColumn(i);if(0===r&&(r=e.getLineMaxColumn(i)),1===r)continue;let a=new t2.Q(i,1,i,r),l=e.getValueInRange(a),h=n?l.replace(/\t/ig,s):l.replace(o," ");t.addEditOperation(a,h)}}vp=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(G=af.JZ,function(e,t){G(e,t,1)})],vp);class vf{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),vm(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class v_{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),vm(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,tw.HW)(vp.ID,vp,2),(0,tw.Fl)(vs),(0,tw.Fl)(vo),(0,tw.Fl)(va),(0,tw.Fl)(vl),(0,tw.Fl)(vh),(0,tw.Fl)(vd),(0,tw.Fl)(vc),(0,tw.Fl)(vu),(0,tw.HW)(lz.ID,lz,1),oN.register(l$);class vv{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new tK.L(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new tK.L(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}i(9177);let vb=class{static{e9=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(e9.ID)}static{this.DECORATION=t4.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();let i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;let o=new iY.$t(this.editor,5),r=n.uri;return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=(0,tJ.SS)(e=>this.editorWorkerService.navigateValueSet(r,s,t)),this.currentRequest.then(t=>{if(!t||!t.range||!t.value||!o.validate(this.editor))return;let i=t2.Q.lift(t.range),n=t.range,r=t.value.length-(s.endColumn-s.startColumn);n={startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.startColumn+t.value.length},r>1&&(s=new tK.L(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+r-1));let a=new vv(i,s,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,a),this.editor.pushUndoStop(),this.decorations.set([{range:n,options:e9.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,tJ.wR)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(iT.dz)}).catch(iT.dz)):Promise.resolve(void 0)}};vb=e9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(q=oM.w,function(e,t){q(e,t,1)})],vb);class vC extends tw.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:tx.aS(1230,"Replace with Previous Value"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){let i=vb.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class vw extends tw.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:tx.aS(1231,"Replace with Next Value"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){let i=vb.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,tw.HW)(vb.ID,vb,4),(0,tw.Fl)(vC),(0,tw.Fl)(vw);class vy{constructor(e){this._selection=e,this._selectionId=null}getEditOperations(e,t){let i=function(e){let t=e.getLineCount(),i=e.getLineContent(t),n=-1===iZ.lT(i);if(t&&!n)return ao.k.insert(new t1.y(t,e.getLineMaxColumn(t)),e.getEOL())}(e);i&&t.addEditOperation(i.range,i.text),this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class vS extends tw.ks{static{this.ID="editor.action.insertFinalNewLine"}constructor(){super({id:vS.ID,label:tx.aS(1232,"Insert Final New Line"),precondition:tk.R.writable})}run(e,t,i){let n=t.getSelection();if(null===n)return;let s=new vy(n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}(0,tw.Fl)(vS);var vk=i(6351);class vx extends tw.ks{constructor(){super({id:"expandLineSelection",label:tx.aS(1233,"Expand Line Selection"),precondition:void 0,kbOpts:{weight:0,kbExpr:tk.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;let n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,vk.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,tw.Fl)(vx);class vL{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){let i=function(e,t,i){t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber);for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let n=[],s=0,o=0,r=t.length;for(let a=1,l=e.getLineCount();a<=l;a++){let l=e.getLineContent(a),h=l.length+1,d=0;if(o<r&&t[o].lineNumber===a&&(d=t[o].column,o++,d===h)||0===l.length)continue;let c=iZ.lT(l),u=0;if(-1===c)u=1;else{if(c===l.length-1)continue;u=c+2}if(!i){if(!e.tokenization.hasAccurateTokensForLine(a))continue;let t=e.tokenization.getLineTokens(a),i=t.getStandardTokenType(t.findTokenIndexAtOffset(u));if(2===i||3===i)continue}u=Math.max(d,u),n[s++]=ao.k.delete(new t2.Q(a,u,a,h))}return n}(e,this._cursors,this._trimInRegexesAndStrings);for(let e=0,n=i.length;e<n;e++){let n=i[e];t.addEditOperation(n.range,n.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var vD=i(56274),vI=i(17182);class vN{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)n.push(e.getLineContent(t));let s=n.join("\n");""===s&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new t2.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new t2.Q(i.startLineNumber,1,i.startLineNumber,1),s+"\n"):t.addEditOperation(new t2.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,s=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,s=1),i=tK.L.createWithDirection(e,t,n,s,this._selectionDirection)}return i}}var vE=i(14585),vM=i(62709);let vT=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=()=>e.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),s=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s||!this._isMovingDown&&1===this._selection.startLineNumber){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumber<o.endLineNumber&&1===o.endColumn&&(this._moveEndPositionDown=!0,o=o.setEndPosition(o.endLineNumber-1,e.getLineMaxColumn(o.endLineNumber-1)));let{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=this.buildIndentConverter(r,a,l);if(o.startLineNumber===o.endLineNumber&&1===e.getLineMaxColumn(o.startLineNumber)){let i=o.startLineNumber,n=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(n)?t.addEditOperation(new t2.Q(1,1,1,1),null):(t.addEditOperation(new t2.Q(i,1,i,1),e.getLineContent(n)),t.addEditOperation(new t2.Q(n,1,n,e.getLineMaxColumn(n)),null)),o=new tK.L(n,1,n,1)}else{let s,a;if(this._isMovingDown){s=o.endLineNumber+1,a=e.getLineContent(s),t.addEditOperation(new t2.Q(s-1,e.getLineMaxColumn(s-1),s,e.getLineMaxColumn(s)),null);let d=a;if(this.shouldAutoIndent(e,o)){let c=this.matchEnterRule(e,h,r,s,o.startLineNumber-1);if(null!==c)d=_6(c+_8(iZ.UU(e.getLineContent(s)),r),r,l)+this.trimStart(a);else{let t=(0,ve.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?e.getLineContent(s):e.getLineContent(t)},e.getLanguageIdAtPosition(s,1),o.startLineNumber,h,this._languageConfigurationService);if(null!==t){let i=iZ.UU(e.getLineContent(s)),n=_8(t,r);n!==_8(i,r)&&(d=_6(n,r,l)+this.trimStart(a))}}t.addEditOperation(new t2.Q(o.startLineNumber,1,o.startLineNumber,1),d+"\n");let u=this.matchEnterRuleMovingDown(e,h,r,o.startLineNumber,s,d);if(null!==u)0!==u&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,u);else{let a=(0,ve.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?d:t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},e.getLanguageIdAtPosition(s,1),o.startLineNumber+1,h,this._languageConfigurationService);if(null!==a){let i=iZ.UU(e.getLineContent(o.startLineNumber)),n=_8(a,r),s=_8(i,r);n!==s&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,n-s)}}}else t.addEditOperation(new t2.Q(o.startLineNumber,1,o.startLineNumber,1),d+"\n")}else if(s=o.startLineNumber-1,a=e.getLineContent(s),t.addEditOperation(new t2.Q(s,1,s+1,1),null),t.addEditOperation(new t2.Q(o.endLineNumber,e.getLineMaxColumn(o.endLineNumber),o.endLineNumber,e.getLineMaxColumn(o.endLineNumber)),"\n"+a),this.shouldAutoIndent(e,o)){let a=this.matchEnterRule(e,h,r,o.startLineNumber,o.startLineNumber-2);if(null!==a)0!==a&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,a);else{let a=(0,ve.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===s?e.tokenization.getLineTokens(o.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s?e.getLineContent(o.startLineNumber):e.getLineContent(t)},e.getLanguageIdAtPosition(o.startLineNumber,1),s,h,this._languageConfigurationService);if(null!==a){let i=iZ.UU(e.getLineContent(o.startLineNumber)),n=_8(a,r),s=_8(i,r);n!==s&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,n-s)}}}}this._selectionId=t.trackSelection(o)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_9.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_9.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===vE.l.None||s.indentAction===vE.l.Indent?o=s.indentation+s.appendText:s.indentAction===vE.l.IndentOutdent?o=s.indentation:s.indentAction===vE.l.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);let r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){let s=iZ.UU(e.getLineContent(n)),r=iZ.UU(o),a=(0,ve.Yb)(e,n,this._languageConfigurationService);return null!==a&&2&a&&(r=t.unshiftIndent(r)),_8(r,i)-_8(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(iZ.lT(o)>=0){let o=e.getLineMaxColumn(s),r=(0,vM.h)(this._autoIndent,e,new t2.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){let t=e.getLineContent(s);if(iZ.lT(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;let o=e.getLineMaxColumn(s),r=(0,vM.h)(this._autoIndent,e,new t2.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;if(t=r===s&&void 0!==o?o:e.getLineContent(r),iZ.lT(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(r),l=(0,vM.h)(this._autoIndent,e,new t2.Q(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){let a=e.getLineContent(r),l=iZ.UU(a),h=_6(_8(l,n)+o,n,s);h!==l&&(t.addEditOperation(new t2.Q(r,1,r,l.length+1),h),r===i.endLineNumber&&i.endColumn<=l.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};vT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(Q=af.JZ,function(e,t){Q(e,t,3)})],vT);var vR=i(93003);class vO{static{this._COLLATOR=vR.x.Collator()}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){var i,n;let s,o=(i=e,n=this.selection,(s=vP(i,n,this.descending))?ao.k.replace(new t2.Q(s.startLineNumber,1,s.endLineNumber,i.getLineMaxColumn(s.endLineNumber)),s.after.join("\n")):null);o&&t.addEditOperation(o.range,o.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;let n=vP(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e<t;e++)if(n.before[e]!==n.after[e])return!0;return!1}}function vP(e,t,i){let n=t.startLineNumber,s=t.endLineNumber;if(1===t.endColumn&&s--,n>=s)return null;let o=[];for(let t=n;t<=s;t++)o.push(e.getLineContent(t));let r=o.slice(0);return r.sort(vO._COLLATOR.value.compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}class vA extends tw.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let i=t.getSelections().map((e,t)=>({selection:e,index:t,ignore:!1}));i.sort((e,t)=>t2.Q.compareRangesUsingStarts(e.selection,t.selection));let n=i[0];for(let e=1;e<i.length;e++){let t=i[e];n.selection.endLineNumber===t.selection.startLineNumber&&(n.index<t.index?t.ignore=!0:(n.ignore=!0,n=t))}let s=[];for(let e of i)s.push(new vN(e.selection,this.down,e.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vF extends vA{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:tx.aS(1239,"Copy Line Up"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"2_line",title:tx.kg(1234,"&&Copy Line Up"),order:1}})}}class vB extends vA{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:tx.aS(1240,"Copy Line Down"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"2_line",title:tx.kg(1235,"Co&&py Line Down"),order:2}})}}class vW extends tw.ks{constructor(){super({id:"editor.action.duplicateSelection",label:tx.aS(1241,"Duplicate Selection"),precondition:tk.R.writable,menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"2_line",title:tx.kg(1236,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;let n=[],s=t.getSelections(),o=t.getModel();for(let e of s)if(e.isEmpty())n.push(new vN(e,!0));else{let t=new tK.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new il.tA(t,o.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class vH extends tw.ks{constructor(e,t){super(t),this.down=e}run(e,t){let i=e.get(af.JZ),n=[],s=t.getSelections()||[],o=t.getOption(16);for(let e of s)n.push(new vT(e,this.down,o,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class vV extends vH{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:tx.aS(1242,"Move Line Up"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"2_line",title:tx.kg(1237,"Mo&&ve Line Up"),order:3}})}}class vz extends vH{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:tx.aS(1243,"Move Line Down"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"2_line",title:tx.kg(1238,"Move &&Line Down"),order:4}})}}class vU extends tw.ks{constructor(e,t){super(t),this.descending=e}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections();for(let e of(1===n.length&&n[0].isEmpty()&&(n=[new tK.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]),n))if(!vO.canRun(t.getModel(),e,this.descending))return;let s=[];for(let e=0,t=n.length;e<t;e++)s[e]=new vO(n[e],this.descending);t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vj extends vU{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:tx.aS(1244,"Sort Lines Ascending"),precondition:tk.R.writable})}}class v$ extends vU{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:tx.aS(1245,"Sort Lines Descending"),precondition:tk.R.writable})}}class vK extends tw.ks{constructor(){super({id:"editor.action.removeDuplicateLines",label:tx.aS(1246,"Delete Duplicate Lines"),precondition:tk.R.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let n=[],s=[],o=0,r=!0,a=t.getSelections();for(let e of(1===a.length&&a[0].isEmpty()&&(a=[new tK.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))],r=!1),a)){let t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}let a=new tK.L(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),l=e.startLineNumber-o,h=new tK.L(l,1,l+r.length-1,r[r.length-1].length);n.push(ao.k.replace(a,r.join("\n"))),s.push(h),o+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,r?s:void 0),t.pushUndoStop()}}class vG extends tw.ks{constructor(){super({id:"editor.action.reverseLines",label:tx.aS(1247,"Reverse lines"),precondition:tk.R.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections(),s=n;1===s.length&&s[0].isEmpty()&&(s=[new tK.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]);let o=[],r=[];for(let e=0;e<s.length;e++){let t=s[e],a=n[e],l=t.endLineNumber;t.startLineNumber<t.endLineNumber&&1===t.endColumn&&l--;let h=new t2.Q(t.startLineNumber,1,l,i.getLineMaxColumn(l));l===i.getLineCount()&&""===i.getLineContent(h.endLineNumber)&&(h=h.setEndPosition(h.endLineNumber-1,i.getLineMaxColumn(h.endLineNumber-1)));let d=[];for(let e=h.endLineNumber;e>=h.startLineNumber;e--)d.push(i.getLineContent(e));let c=ao.k.replace(h,d.join("\n"));o.push(c);let u=function(e){return e<=h.endLineNumber?h.endLineNumber-e+h.startLineNumber:e};r.push(function(e){if(e.isEmpty())return new tK.L(u(e.positionLineNumber),e.positionColumn,u(e.positionLineNumber),e.positionColumn);{let t=u(e.selectionStartLineNumber),i=u(e.positionLineNumber),n=e.selectionStartColumn,s=e.positionColumn;return new tK.L(t,n,i,s)}}(a))}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}}class vq extends tw.ks{static{this.ID="editor.action.trimTrailingWhitespace"}constructor(){super({id:vq.ID,label:tx.aS(1248,"Trim Trailing Whitespace"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:(0,t$.m5)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map(e=>new t1.y(e.positionLineNumber,e.positionColumn)));let s=t.getSelection();if(null===s)return;let o=e.get(tD.pG),r=t.getModel(),a=new vL(s,n,o.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}));t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop()}}class vQ extends tw.ks{constructor(){super({id:"editor.action.deleteLines",label:tx.aS(1249,"Delete Line"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0,o=[],r=[];for(let e=0,t=i.length;e<t;e++){let t=i[e],a=t.startLineNumber,l=t.endLineNumber,h=1,d=n.getLineMaxColumn(l);l<n.getLineCount()?(l+=1,d=1):a>1&&(a-=1,h=n.getLineMaxColumn(a)),o.push(ao.k.replace(new tK.L(a,h,l,d),"")),r.push(new tK.L(a-s,t.positionColumn,a-s,t.positionColumn)),s+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}});t.sort((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber);let i=[],n=t[0];for(let e=1;e<t.length;e++)n.endLineNumber+1>=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class vY extends tw.ks{constructor(){super({id:"editor.action.indentLines",label:tx.aS(1250,"Indent Line"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,vD.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class vZ extends tw.ks{constructor(){super({id:"editor.action.outdentLines",label:tx.aS(1251,"Outdent Line"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){t_.Yh.Outdent.runEditorCommand(e,t,null)}}class vX extends tw.ks{constructor(){super({id:"editor.action.insertLineBefore",label:tx.aS(1252,"Insert Line Above"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,vI.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class vJ extends tw.ks{constructor(){super({id:"editor.action.insertLineAfter",label:tx.aS(1253,"Insert Line Below"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,vI.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class v0 extends tw.ks{run(e,t){if(!t.hasModel())return;let i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let e=0,t=n.length-1;e<t;e++){let t=n[e],i=n[e+1];null===t2.Q.intersectRanges(t,i)?s.push(t):n[e+1]=t2.Q.plusRange(t,i)}s.push(n[n.length-1]);let o=this._getEndCursorState(i,s),r=s.map(e=>ao.k.replace(e,""));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class v1 extends v0{constructor(){super({id:"deleteAllLeft",label:tx.aS(1254,"Delete All Left"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],s=0;return t.forEach(t=>{let o;if(1===t.endColumn&&s>0){let e=t.startLineNumber-s;o=new tK.L(e,t.startColumn,e,t.startColumn)}else o=new tK.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(t2.Q.compareRangesUsingStarts),i=i.map(e=>{if(!e.isEmpty())return new t2.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn);if(1!==e.startColumn)return new t2.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn);{let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new t2.Q(t,i,e.startLineNumber,1)}}))}}class v2 extends v0{constructor(){super({id:"deleteAllRight",label:tx.aS(1255,"Delete All Right"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let s=0,o=t.length;s<o;s++){let o=t[s],r=new tK.L(o.startLineNumber-0,o.startColumn,o.startLineNumber-0,o.startColumn);o.intersectRanges(e)?i=r:n.push(r)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(null===t)return[];let i=e.getSelections();if(null===i)return[];let n=i.map(e=>{if(e.isEmpty()){let i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new t2.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new t2.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e});return n.sort(t2.Q.compareRangesUsingStarts),n}}class v5 extends tw.ks{constructor(){super({id:"editor.action.joinLines",label:tx.aS(1256,"Join Lines"),precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(t2.Q.compareRangesUsingStarts);let s=[],o=i.reduce((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new tK.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new tK.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn));s.push(o);let r=t.getModel();if(null===r)return;let a=[],l=[],h=n,d=0;for(let e=0,t=s.length;e<t;e++){let t,i,o=s[e],c=o.startLineNumber,u=0,g=r.getLineLength(o.endLineNumber)-o.endColumn;if(o.isEmpty()||o.startLineNumber===o.endLineNumber){let e=o.getStartPosition();e.lineNumber<r.getLineCount()?(t=c+1,i=r.getLineMaxColumn(t)):(t=e.lineNumber,i=r.getLineMaxColumn(e.lineNumber))}else t=o.endLineNumber,i=r.getLineMaxColumn(t);let p=r.getLineContent(c);for(let e=c+1;e<=t;e++){let t=r.getLineContent(e),i=r.getLineFirstNonWhitespaceColumn(e);if(i>=1){let e=!0;""===p&&(e=!1),e&&(" "===p.charAt(p.length-1)||" "===p.charAt(p.length-1))&&(e=!1,p=p.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);p+=(e?" ":"")+n,u=e?n.length+1:n.length}else u=0}let m=new t2.Q(c,1,t,i);if(!m.isEmpty()){let e;o.isEmpty()?(a.push(ao.k.replace(m,p)),e=new tK.L(m.startLineNumber-d,p.length-u+1,c-d,p.length-u+1)):o.startLineNumber===o.endLineNumber?(a.push(ao.k.replace(m,p)),e=new tK.L(o.startLineNumber-d,o.startColumn,o.endLineNumber-d,o.endColumn)):(a.push(ao.k.replace(m,p)),e=new tK.L(o.startLineNumber-d,o.startColumn,o.startLineNumber-d,p.length-g)),null!==t2.Q.intersectRanges(m,n)?h=e:l.push(e)}d+=m.endLineNumber-m.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class v4 extends tw.ks{constructor(){super({id:"editor.action.transpose",label:tx.aS(1257,"Transpose Characters around the Cursor"),precondition:tk.R.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let s=[];for(let e=0,t=i.length;e<t;e++){let t=i[e];if(!t.isEmpty())continue;let o=t.getStartPosition(),r=n.getLineMaxColumn(o.lineNumber);if(o.column>=r){if(o.lineNumber===n.getLineCount())continue;let e=new t2.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new il.iu(new tK.L(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{let e=new t2.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new il.ui(e,t,new tK.L(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class v3 extends tw.ks{run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let s=t.getOption(148),o=[];for(let e of i)if(e.isEmpty()){let i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;let a=new t2.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),l=n.getValueInRange(a);o.push(ao.k.replace(a,this._modifyText(l,s)))}else{let t=n.getValueInRange(e);o.push(ao.k.replace(e,this._modifyText(t,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class v7 extends v3{constructor(){super({id:"editor.action.transformToUppercase",label:tx.aS(1258,"Transform to Uppercase"),precondition:tk.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class v9 extends v3{constructor(){super({id:"editor.action.transformToLowercase",label:tx.aS(1259,"Transform to Lowercase"),precondition:tk.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class v8{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class v6 extends v3{static{this.titleBoundary=new v8("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:tx.aS(1260,"Transform to Title Case"),precondition:tk.R.writable})}_modifyText(e,t){let i=v6.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,e=>e.toLocaleUpperCase()):e}}class be extends v3{static{this.caseBoundary=new v8("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new v8("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:tx.aS(1261,"Transform to Snake Case"),precondition:tk.R.writable})}_modifyText(e,t){let i=be.caseBoundary.get(),n=be.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class bt extends v3{static{this.singleLineWordBoundary=new v8("[_\\s-]+","gm")}static{this.multiLineWordBoundary=new v8("[_-]+","gm")}static{this.validWordStart=new v8("^(\\p{Lu}[^\\p{Lu}])","gmu")}constructor(){super({id:"editor.action.transformToCamelcase",label:tx.aS(1262,"Transform to Camel Case"),precondition:tk.R.writable})}_modifyText(e,t){let i=/\r\n|\r|\n/.test(e)?bt.multiLineWordBoundary.get():bt.singleLineWordBoundary.get(),n=bt.validWordStart.get();if(!i||!n)return e;let s=e.split(i);return s.shift()?.replace(n,e=>e.toLocaleLowerCase())+s.map(e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1)).join("")}}class bi extends v3{static{this.wordBoundary=new v8("[_ \\t-]","gm")}static{this.wordBoundaryToMaintain=new v8("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:tx.aS(1263,"Transform to Pascal Case"),precondition:tk.R.writable})}_modifyText(e,t){let i=bi.wordBoundary.get(),n=bi.wordBoundaryToMaintain.get();return i&&n?e.split(n).map(e=>e.split(i)).flat().map(e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1)).join(""):e}}class bn extends v3{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(e=>e.isSupported())}static{this.caseBoundary=new v8("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new v8("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new v8("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:tx.aS(1264,"Transform to Kebab Case"),precondition:tk.R.writable})}_modifyText(e,t){let i=bn.caseBoundary.get(),n=bn.singleLetters.get(),s=bn.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,tw.Fl)(vF),(0,tw.Fl)(vB),(0,tw.Fl)(vW),(0,tw.Fl)(vV),(0,tw.Fl)(vz),(0,tw.Fl)(vj),(0,tw.Fl)(v$),(0,tw.Fl)(vK),(0,tw.Fl)(vq),(0,tw.Fl)(vQ),(0,tw.Fl)(vY),(0,tw.Fl)(vZ),(0,tw.Fl)(vX),(0,tw.Fl)(vJ),(0,tw.Fl)(v1),(0,tw.Fl)(v2),(0,tw.Fl)(v5),(0,tw.Fl)(v4),(0,tw.Fl)(v7),(0,tw.Fl)(v9),(0,tw.Fl)(vG),be.caseBoundary.isSupported()&&be.singleLetters.isSupported()&&(0,tw.Fl)(be),bt.singleLineWordBoundary.isSupported()&&bt.multiLineWordBoundary.isSupported()&&(0,tw.Fl)(bt),bi.wordBoundary.isSupported()&&(0,tw.Fl)(bi),v6.titleBoundary.isSupported()&&(0,tw.Fl)(v6),bn.isSupported()&&(0,tw.Fl)(bn),i(40217);var bs=function(e,t){return function(i,n){t(i,n,e)}};let bo=new tI.N1("LinkedEditingInputVisible",!1),br=class extends t0.jG{static{e8=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=t4.kI.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"})}static get(e){return e.getContribution(e8.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new t0.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=bo.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new t0.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(e=>{(e.hasChanged(78)||e.hasChanged(106))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(78)||this._editor.getOption(106))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t))return;this._localToDispose.add(i5.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let n=new tJ.ve(this._debounceInformation.get(t)),s=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},o=new tJ.ve(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(e))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let t=this._currentDecorations.getRange(0);if(t&&e.changes.every(e=>t.intersectRanges(e.range)))return void r(this._syncRangesToken)}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),o.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;let t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();let n=t.getValueInRange(i);if(this._currentWordPattern){let e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let s=[];for(let e=1,i=this._currentDecorations.length;e<i;e++){let i=this._currentDecorations.getRange(e);if(i)if(i.startLineNumber!==i.endLineNumber)s.push({range:i,text:n});else{let e=t.getValueInRange(i),o=n,r=i.startColumn,a=i.endColumn,l=iZ.Qp(e,o);r+=l,e=e.substr(l),o=o.substr(l);let h=iZ.Vi(e,o);a-=h,e=e.substr(0,e.length-h),o=o.substr(0,o.length-h),(r!==a||0!==o.length)&&s.push({range:new t2.Q(i.startLineNumber,r,i.endLineNumber,a),text:o})}}if(0!==s.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",s),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(e=!1){if(!this._editor.hasModel())return void this.clearRanges();let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1)return void this.clearRanges();let i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}if(!this._currentRequestPosition?.equals(t)){let e=this._currentDecorations.getRange(0);e?.containsPosition(t)||this.clearRanges()}this._currentRequestPosition=t,this._currentRequestModelVersion=n;let s=this._currentRequestCts=new iS.Qi;try{let e=new ig.W(!1),o=await bh(this._providers,i,t,s.token);if(this._debounceInformation.update(i,e.elapsed()),s!==this._currentRequestCts||(this._currentRequestCts=null,n!==i.getVersionId()))return;let r=[];o?.ranges&&(r=o.ranges),this._currentWordPattern=o?.wordPattern||this._languageWordPattern;let a=!1;for(let e=0,i=r.length;e<i;e++)if(t2.Q.containsPosition(r[e],t)){if(a=!0,0!==e){let t=r[e];r.splice(e,1),r.unshift(t)}break}if(!a)return void this.clearRanges();let l=r.map(e=>({range:e,options:e8.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(l),this._syncRangesToken++}catch(e){(0,iT.MB)(e)||(0,iT.dz)(e),this._currentRequestCts!==s&&this._currentRequestCts||this.clearRanges()}}};br=e8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bs(1,tI.fN),bs(2,iQ.u),bs(3,af.JZ),bs(4,oy.U)],br);class ba extends tw.ks{constructor(){super({id:"editor.action.linkedEditing",label:tx.aS(1266,"Start Linked Editing"),precondition:tI.M$.and(tk.R.writable,tk.R.hasRenameProvider),kbOpts:{kbExpr:tk.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let i=e.get(ty.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return iW.r.isUri(n)&&t1.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},iT.dz):super.runCommand(e,t)}run(e,t){let i=br.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}let bl=tw.DX.bindToContribution(br.get);function bh(e,t,i,n){let s=e.ordered(t);return(0,tJ.$1)(s.map(e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){(0,iT.M_)(e);return}}),e=>!!e&&iy.EI(e?.ranges))}(0,tw.E_)(new bl({id:"cancelLinkedEditingInput",precondition:bo,handler:e=>e.clearRanges(),kbOpts:{kbExpr:tk.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,t3.x1A)("editor.linkedEditingBackground",{dark:oE.Q1.fromHex("#f00").transparent(.3),light:oE.Q1.fromHex("#f00").transparent(.3),hcDark:oE.Q1.fromHex("#f00").transparent(.3),hcLight:oE.Q1.white},tx.kg(1265,"Background color when the editor auto renames on type.")),(0,tw.ke)("_executeLinkedEditingProvider",(e,t,i)=>{let{linkedEditingRangeProvider:n}=e.get(iQ.u);return bh(n,t,i,iS.XO.None)}),(0,tw.HW)(br.ID,br,1),(0,tw.Fl)(ba),i(2533);class bd{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url)?this.resolve(e):Promise.reject(Error("missing"))):Promise.reject(Error("missing"))}}class bc{static{this.Empty=new bc([])}constructor(e){this._disposables=new t0.Cm;let t=[];for(const[i,n]of e){const e=i.links.map(e=>new bd(e,n));t=bc._union(t,e),(0,t0.Xm)(i)&&(this._disposables??=new t0.Cm,this._disposables.add(i))}this.links=t}dispose(){this._disposables?.dispose(),this.links.length=0}static _union(e,t){let i,n,s,o,r=[];for(i=0,s=0,n=e.length,o=t.length;i<n&&s<o;){let n=e[i],o=t[s];if(t2.Q.areIntersectingOrTouching(n.range,o.range)){i++;continue}0>t2.Q.compareRangesUsingStarts(n.range,o.range)?(r.push(n),i++):(r.push(o),s++)}for(;i<n;i++)r.push(e[i]);for(;s<o;s++)r.push(t[s]);return r}}async function bu(e,t,i){let n=[],s=e.ordered(t).reverse().map(async(e,s)=>{try{let o=await e.provideLinks(t,i);o&&(n[s]=[o,e])}catch(e){(0,iT.M_)(e)}});await Promise.all(s);let o=new bc((0,iy.Yc)(n));return i.isCancellationRequested&&(o.dispose(),o=bc.Empty),o}tz.w.registerCommand("_executeLinkProvider",async(e,...t)=>{let[i,n]=t;(0,iP.j)(i instanceof iW.r),"number"!=typeof n&&(n=0);let{linkProvider:s}=e.get(iQ.u),o=e.get(sf.S).getModel(i);if(!o)return[];let r=await bu(s,o,iS.XO.None);if(!r)return[];for(let e=0;e<Math.min(n,r.links.length);e++)await r.links[e].resolve(iS.XO.None);let a=r.links.slice(0);return r.dispose(),a});var bg=function(e,t){return function(i,n){t(i,n,e)}};let bp=class extends t0.jG{static{e6=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(e6.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new tJ.uC(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const o=this._register(new ad(e));this._register(o.onMouseMoveOrRelevantKeyDown(([e,t])=>{this._onEditorMouseMove(e,t)})),this._register(o.onExecute(e=>{this.onEditorMouseUp(e)})),this._register(o.onCancel(e=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(79)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(e=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(e=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(79))return;let e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,tJ.SS)(t=>bu(this.providers,e,t));try{let t=new ig.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,iT.dz)(e)}finally{this.computePromise=null}}}updateDecorations(e){let t="altKey"===this.editor.getOption(86),i=[];for(let e of Object.keys(this.currentOccurrences)){let t=this.currentOccurrences[e];i.push(t.decorationId)}let n=[];if(e)for(let i of e)n.push(bf.decoration(i,t));this.editor.changeDecorations(t=>{let s=t.deltaDecorations(i,n);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=s.length;t<i;t++){let i=new bf(e[t],s[t]);this.currentOccurrences[i.decorationId]=i}})}_onEditorMouseMove(e,t){let i="altKey"===this.editor.getOption(86);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations(e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e="altKey"===this.editor.getOption(86);if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;let{link:n}=e;n.resolve(iS.XO.None).then(e=>{if("string"==typeof e&&this.editor.hasModel()){let t=this.editor.getModel().uri;if(t.scheme===ne.ny.file&&e.startsWith(`${ne.ny.file}:`)){let i=iW.r.parse(e);if(i.scheme===ne.ny.file){let n=nt.su(i),s=null;n.startsWith("/./")||n.startsWith("\\.\\")?s=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(s=`.${n.substr(2)}`),s&&(e=nt.uJ(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},e=>{let t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(tx.kg(1267,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(tx.kg(1268,"Failed to open this link because its target is missing.")):(0,iT.dz)(e)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;for(let t of this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0)){let e=this.currentOccurrences[t.id];if(e)return e}return null}isEnabled(e,t){return!!(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey||e.isMiddleClick&&"openLink"===e.mouseMiddleClickAction))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};bp=e6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bg(1,i3.Cr),bg(2,n5.Ot),bg(3,iQ.u),bg(4,oy.U)],bp);let bm={general:t4.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:t4.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class bf{static decoration(e,t){return{range:e.range,options:bf._getOptions(e,t,!1)}}static _getOptions(e,t,i){let n={...i?bm.active:bm.general};return n.hoverMessage=function(e,t){let i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?tx.kg(1269,"Execute command"):tx.kg(1270,"Follow link"),s=t?iu.zx?tx.kg(1271,"cmd + click"):tx.kg(1272,"ctrl + click"):iu.zx?tx.kg(1273,"option + click"):tx.kg(1274,"alt + click");if(!e.url)return new tj.Bc().appendText(`${n} (${s})`);{let t="";if(/^command:/i.test(e.url.toString())){let i=e.url.toString().match(/^command:([^?#]+)/);if(i){let e=i[1];t=tx.kg(1275,"Execute command {0}",e)}}return new tj.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,bf._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,bf._getOptions(this.link,t,!1))}}class b_ extends tw.ks{constructor(){super({id:"editor.action.openLink",label:tx.aS(1276,"Open Link"),precondition:void 0})}run(e,t){let i=bp.get(t);if(i&&t.hasModel())for(let e of t.getSelections()){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,tw.HW)(bp.ID,bp,1),(0,tw.Fl)(b_);class bv extends t0.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(e=>{let t=this._editor.getOption(133);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}(0,tw.HW)(bv.ID,bv,2);var bb=i(16427);i(77721);class bC extends t0.jG{static{this.ID="editor.contrib.middleScroll"}constructor(e){super(),this._editor=e;const t=(0,aI.U)(this._editor),i=t.getOption(171);this._register((0,o2.fm)(e=>{if(!i.read(e))return;let n=t.domNode.read(e);if(!n)return;let s=e.store.add((0,o2.X2)("scrollingSession",void 0));e.store.add(this._editor.onMouseDown(e=>{var t,i,o;let r;if(s.read(void 0))return void s.set(void 0,void 0);if(!e.event.middleButton)return;e.event.stopPropagation(),e.event.preventDefault();let a=new t0.Cm,l=new mf.b(e.event.posx,e.event.posy),h=(t=(0,tC.zk)(n),i=l,o=a,r=(0,o2.FY)("pos",i),o.add((0,tC.ko)(t,"mousemove",e=>{r.set(new mf.b(e.pageX,e.pageY),void 0)})),r).map(e=>e.subtract(l).withThreshold(5)),d=n.getBoundingClientRect(),c=new mf.b(l.x-d.left,l.y-d.top);s.set({mouseDeltaAfterThreshold:h,initialMousePosInEditor:c,didScroll:!1,dispose:()=>a.dispose()},void 0),a.add(this._editor.onMouseUp(e=>{let t=s.read(void 0);t&&t.didScroll&&s.set(void 0,void 0)})),a.add(this._editor.onKeyDown(e=>{s.set(void 0,void 0)}))})),e.store.add((0,o2.fm)(e=>{let t=s.read(e);if(!t)return;let i=Date.now();e.store.add((0,o2.fm)(e=>{var n;gr.instance.invalidateOnNextAnimationFrame(e);let s=Date.now(),o=s-i;i=s;let r=t.mouseDeltaAfterThreshold.read(void 0).scale(o/32),a=new mf.b(this._editor.getScrollLeft(),this._editor.getScrollTop());this._editor.setScrollPosition({scrollLeft:(n=a.add(r)).x,scrollTop:n.y}),r.isZero()||(t.didScroll=!0)}));let o=(0,o2.un)(e=>{let i=t.mouseDeltaAfterThreshold.read(e),n="";return n+((i.y<0?"n":i.y>0?"s":"")+(i.x<0?"w":i.x>0?"e":""))});e.store.add((0,o2.fm)(e=>{n.setAttribute("data-scroll-direction",o.read(e))}))}));let o=e.store.add(tC.n.div({class:["scroll-editor-on-middle-click-dot",s.map(e=>e?"":"hidden")],style:{left:s.map(e=>e?e.initialMousePosInEditor.x:0),top:s.map(e=>e?e.initialMousePosInEditor.y:0)}}).toDisposableLiveElement());e.store.add((0,bb.rX)(n,o.element)),e.store.add((0,o2.fm)(e=>{let t=s.read(e);n.classList.toggle("scroll-editor-on-middle-click-editor",!!t)}))}))}}(0,tw.HW)(bC.ID,bC,2),i(50577);let bw=(0,t3.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},tx.kg(1548,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,t3.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},tx.kg(1549,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,t3.x1A)("editor.wordHighlightTextBackground",bw,tx.kg(1550,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);let by=(0,t3.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:t3.buw,hcLight:t3.buw},tx.kg(1551,"Border color of a symbol during read-access, like reading a variable."));(0,t3.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:t3.buw,hcLight:t3.buw},tx.kg(1552,"Border color of a symbol during write-access, like writing to a variable.")),(0,t3.x1A)("editor.wordHighlightTextBorder",by,tx.kg(1553,"Border color of a textual occurrence for a symbol."));let bS=(0,t3.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",tx.kg(1554,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),bk=(0,t3.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",tx.kg(1555,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),bx=(0,t3.x1A)("editorOverviewRuler.wordHighlightTextForeground",t3.z5H,tx.kg(1556,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),bL=t4.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,t7.Yf)(bk),position:t5.A5.Center},minimap:{color:(0,t7.Yf)(t3.Xp1),position:1}}),bD=t4.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,t7.Yf)(bx),position:t5.A5.Center},minimap:{color:(0,t7.Yf)(t3.Xp1),position:1}}),bI=t4.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,t7.Yf)(t3.z5H),position:t5.A5.Center},minimap:{color:(0,t7.Yf)(t3.Xp1),position:1}}),bN=t4.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),bE=t4.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,t7.Yf)(bS),position:t5.A5.Center},minimap:{color:(0,t7.Yf)(t3.Xp1),position:1}});function bM(e,t){let i=t.filter(t=>!e.find(e=>e.equals(t)));if(i.length>=1){let e=i.map(e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`).join(", "),t=1===i.length?tx.kg(1278,"Cursor added: {0}",e):tx.kg(1279,"Cursors added: {0}",e);(0,tU.h5)(t)}}(0,t7.zy)((e,t)=>{let i=e.getColor(t3.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)});class bT extends tw.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:tx.aS(1288,"Add Cursor Above"),precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"3_multi",title:tx.kg(1280,"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);let s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();let o=s.getCursorStates();s.setCursorStates(i.source,3,vk.c.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),bM(o,s.getCursorStates())}}class bR extends tw.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:tx.aS(1289,"Add Cursor Below"),precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"3_multi",title:tx.kg(1281,"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);let s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();let o=s.getCursorStates();s.setCursorStates(i.source,3,vk.c.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),bM(o,s.getCursorStates())}}class bO extends tw.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:tx.aS(1290,"Add Cursors to Line Ends"),precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"3_multi",title:tx.kg(1282,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let e=t.getLineMaxColumn(n);i.push(new tK.L(n,e,n,e))}e.endColumn>1&&i.push(new tK.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach(e=>this.getCursorsForSelection(e,i,r)),r.length>0&&t.setSelections(r),bM(o,s.getCursorStates())}}class bP extends tw.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:tx.aS(1291,"Add Cursors to Bottom"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let e=i[0].startLineNumber;e<=n;e++)s.push(new tK.L(e,i[0].startColumn,e,i[0].endColumn));let o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),bM(r,o.getCursorStates())}}class bA extends tw.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:tx.aS(1292,"Add Cursors to Top"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new tK.L(e,i[0].startColumn,e,i[0].endColumn));let s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),bM(o,s.getCursorStates())}}class bF{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class bB{static create(e,t){let i,n,s;if(!e.hasModel())return null;let o=t.getState();if(!e.hasTextFocus()&&o.isRevealed&&o.searchString.length>0)return new bB(e,t,!1,o.searchString,o.wholeWord,o.matchCase,null);let r=!1,a=e.getSelections();1===a.length&&a[0].isEmpty()?(r=!0,i=!0,n=!0):(i=o.wholeWord,n=o.matchCase);let l=e.getSelection(),h=null;if(l.isEmpty()){let t=e.getConfiguredWordAtPosition(l.getStartPosition());if(!t)return null;s=t.word,h=new tK.L(l.startLineNumber,t.startColumn,l.startLineNumber,t.endColumn)}else s=e.getModel().getValueInRange(l).replace(/\r\n/g,"\n");return new bB(e,t,r,s,i,n,h)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();return e?new bF(this._editor.getSelections().concat(e),e,0):null}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new bF(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new tK.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();return e?new bF(this._editor.getSelections().concat(e),e,0):null}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new bF(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new tK.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,0x40000000):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,0x40000000)}}class bW extends t0.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(bW.ID)}constructor(e){super(),this._sessionDispose=this._register(new t0.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=bB.create(this._editor,e);if(!t)return;this._session=t;let i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(e=>{(e.matchCase||e.wholeWord)&&this._endSession()}))}}_endSession(){this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController&&this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1),this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new tK.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let i=e.getState().matchCase;if(!bQ(this._editor.getModel(),t,i)){let e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n<s;n++)i[n]=this._expandEmptyToWord(e,t[n]);this._editor.setSelections(i);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){let e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,0x40000000):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,0x40000000)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){let e=this._editor.getSelection();for(let i=0,n=t.length;i<n;i++){let n=t[i];if(n.range.intersectRanges(e)){t[i]=t[0],t[0]=n;break}}this._setSelections(t.map(e=>new tK.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)))}}}class bH extends tw.ks{run(e,t){let i=bW.get(t);if(!i)return;let n=t._getViewModel();if(n){let s=n.getCursorStates(),o=d0.get(t);if(o)this._run(i,o);else{let n=e.get(i_._Y).createInstance(d0,t);this._run(i,n),n.dispose()}bM(s,n.getCursorStates())}}}class bV extends bH{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:tx.aS(1293,"Add Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:2082,weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"3_multi",title:tx.kg(1283,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class bz extends bH{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:tx.aS(1294,"Add Selection to Previous Find Match"),precondition:void 0,menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"3_multi",title:tx.kg(1284,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class bU extends bH{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:tx.aS(1295,"Move Last Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:(0,t$.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class bj extends bH{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:tx.aS(1296,"Move Last Selection to Previous Find Match"),precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class b$ extends bH{constructor(){super({id:"editor.action.selectHighlights",label:tx.aS(1297,"Select All Occurrences of Find Match"),precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:3114,weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"3_multi",title:tx.kg(1285,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class bK extends bH{constructor(){super({id:"editor.action.changeAll",label:tx.aS(1298,"Change All Occurrences"),precondition:tI.M$.and(tk.R.writable,tk.R.editorTextFocus),kbOpts:{kbExpr:tk.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class bG{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._cachedFindMatches=null,this._modelVersionId=this._model.getVersionId(),s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(t2.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let bq=class extends t0.jG{static{te=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new tJ.uC(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123)})),this._register(e.onDidChangeCursorSelection(e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(e=>{this._setState(null)})),this._register(e.onDidChangeModelContent(e=>{this._isEnabled&&this.updateSoon.schedule()}));const i=d0.get(e);i&&this._register(i.getState().onFindReplaceStateChange(e=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(te._createState(this.state,this._isEnabled,this._isEnabledMultiline,this._maxLength,this.editor))}static _createState(e,t,i,n,s){if(!t||!s.hasModel())return null;if(!i){let e=s.getSelection();if(e.startLineNumber!==e.endLineNumber)return null}let o=bW.get(s);if(!o)return null;let r=d0.get(s);if(!r)return null;let a=o.getSession(r);if(!a){let e=s.getSelections();if(e.length>1){let t=r.getState().matchCase;if(!bQ(s.getModel(),e,t))return null}a=bB.create(s,r)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||n>0&&a.searchText.length>n)return null;let l=r.getState(),h=l.matchCase;if(l.isRevealed){let e=l.searchString;h||(e=e.toLowerCase());let t=a.searchText;if(h||(t=t.toLowerCase()),e===t&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new bG(s.getModel(),a.searchText,a.matchCase,a.wholeWord?s.getOption(148):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let i=this.state.findMatches(),n=this.editor.getSelections();n.sort(t2.Q.compareRangesUsingStarts);let s=[];for(let e=0,t=0,o=i.length,r=n.length;e<o;){let o=i[e];if(t>=r)s.push(o),e++;else{let i=t2.Q.compareRangesUsingStarts(o,n[t]);i<0?((n[t].isEmpty()||!t2.Q.areIntersecting(o,n[t]))&&s.push(o),e++):(i>0||e++,t++)}}let o="off"!==this.editor.getOption(90),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&o,a=s.map(e=>({range:e,options:r?bN:bI}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function bQ(e,t,i){let n=bY(e,t[0],!i);for(let s=1,o=t.length;s<o;s++){let o=t[s];if(o.isEmpty()||n!==bY(e,o,!i))return!1}return!0}function bY(e,t,i){let n=e.getValueInRange(t);return i?n.toLowerCase():n}bq=te=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(Y=iQ.u,function(e,t){Y(e,t,1)})],bq);class bZ extends tw.ks{constructor(){super({id:"editor.action.focusNextCursor",label:tx.aS(1299,"Focus Next Cursor"),metadata:{description:tx.kg(1286,"Focuses the next cursor"),args:[]},precondition:void 0})}run(e,t,i){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),bM(s,n.getCursorStates()))}}class bX extends tw.ks{constructor(){super({id:"editor.action.focusPreviousCursor",label:tx.aS(1300,"Focus Previous Cursor"),metadata:{description:tx.kg(1287,"Focuses the previous cursor"),args:[]},precondition:void 0})}run(e,t,i){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),bM(s,n.getCursorStates()))}}(0,tw.HW)(bW.ID,bW,4),(0,tw.HW)(bq.ID,bq,1),(0,tw.Fl)(bT),(0,tw.Fl)(bR),(0,tw.Fl)(bO),(0,tw.Fl)(bV),(0,tw.Fl)(bz),(0,tw.Fl)(bU),(0,tw.Fl)(bj),(0,tw.Fl)(b$),(0,tw.Fl)(bK),(0,tw.Fl)(bP),(0,tw.Fl)(bA),(0,tw.Fl)(bZ),(0,tw.Fl)(bX);let bJ={Visible:new tI.N1("parameterHintsVisible",!1),MultipleSignatures:new tI.N1("parameterHintsMultipleSignatures",!1)};async function b0(e,t,i,n,s){for(let o of e.ordered(t))try{let e=await o.provideSignatureHelp(t,i,s,n);if(e)return e}catch(e){(0,iT.M_)(e)}}tz.w.registerCommand("_executeSignatureHelpProvider",async(e,...t)=>{let[i,n,s]=t;(0,iP.j)(iW.r.isUri(i)),(0,iP.j)(t1.y.isIPosition(n)),(0,iP.j)("string"==typeof s||!s);let o=e.get(iQ.u),r=await e.get(as.b).createModelReference(i);try{let e=await b0(o.signatureHelpProvider,r.object.textEditorModel,t1.y.lift(n),{triggerKind:iq.WA.Invoke,isRetrigger:!1,triggerCharacter:s},iS.XO.None);if(!e)return;return setTimeout(()=>e.dispose(),0),e.value}finally{r.dispose()}});var b1=tt||(tt={});b1.Default={type:0};class b2{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}}b1.Pending=b2;class b5{constructor(e){this.hints=e,this.type=1}}b1.Active=b5;class b4 extends t0.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=b4.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new i5.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=tt.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new t0.HE),this.triggerChars=new c6.y,this.retriggerChars=new c6.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new tJ.ve(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(e=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(e=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(e=>this.onCursorChange(e))),this._register(this.editor.onDidChangeModelContent(e=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(e=>this.onDidType(e))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=tt.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let i=this.editor.getModel();if(!i||!this.providers.has(i))return;let n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(iT.dz)}next(){if(1!==this.state.type)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(98).cycle;(e<2||i)&&!n?this.cancel():this.updateActiveSignature(i&&n?0:t+1)}previous(){if(1!==this.state.type)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(98).cycle;(e<2||i)&&!n?this.cancel():this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){1===this.state.type&&(this.state=new tt.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){let t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;let n=this._pendingTriggers.reduce(b3);this._pendingTriggers=[];let s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;let o=this.editor.getModel(),r=this.editor.getPosition();this.state=new tt.Pending((0,tJ.SS)(e=>b0(this.providers,o,r,s,e)),i);try{let t=await this.state.request;if(e!==this.triggerId)return t?.dispose(),!1;if(!t||!t.value.signatures||0===t.value.signatures.length)return t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1;return this.state=new tt.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0}catch(t){return e===this.triggerId&&(this.state=tt.Default),(0,iT.dz)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let e of t.signatureHelpTriggerCharacters||[])if(e.length){let t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(let e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:iq.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:iq.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:iq.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(98).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function b3(e,t){switch(t.triggerKind){case iq.WA.Invoke:return t;case iq.WA.ContentChange:return e;case iq.WA.TriggerCharacter:default:return t}}i(97631);var b7=function(e,t){return function(i,n){t(i,n,e)}};let b9=tC.$,b8=(0,sQ.pU)("parameter-hints-next",tb.W.chevronDown,tx.kg(1302,"Icon for show next parameter hint.")),b6=(0,sQ.pU)("parameter-hints-previous",tb.W.chevronUp,tx.kg(1303,"Icon for show previous parameter hint.")),Ce=class extends t0.jG{static{ti=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new t0.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=new i4.T({editor:e},s,n),this.keyVisible=bJ.Visible.bindTo(i),this.keyMultipleSignatures=bJ.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){let e=b9(".editor-widget.parameter-hints-widget"),t=tC.BC(e,b9(".phwrapper"));t.tabIndex=-1;let i=tC.BC(t,b9(".controls")),n=tC.BC(i,b9(".button"+iX.L.asCSSSelector(b6))),s=tC.BC(i,b9(".overloads")),o=tC.BC(i,b9(".button"+iX.L.asCSSSelector(b8)));this._register(tC.ko(n,"click",e=>{tC.fs.stop(e),this.previous()})),this._register(tC.ko(o,"click",e=>{tC.fs.stop(e),this.next()}));let r=b9(".body"),a=new pI.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());let l=tC.BC(r,b9(".signature")),h=tC.BC(r,b9(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:h,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(e=>{this.visible&&this.editor.layoutContentWidget(this)}));let d=()=>{if(!this.domNodes)return;let e=this.editor.getOption(59),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=`${e.lineHeight/e.fontSize}`,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",sW.jU.fontFamily)};d(),this._register(i5.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),e=>e.filter(e=>e.hasChanged(59)))(d)),this._register(this.editor.onDidLayoutChange(e=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;let t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let i=e.signatures[e.activeSignature];if(!i)return;let n=tC.BC(this.domNodes.signature,b9(".code")),s=i.parameters.length>0,o=i.activeParameter??e.activeParameter;s?this.renderParameters(n,i,o):tC.BC(n,b9("span")).textContent=i.label;let r=i.parameters[o];if(r?.documentation){let e=b9("span.documentation");if("string"==typeof r.documentation)e.textContent=r.documentation;else{let t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}tC.BC(this.domNodes.docs,b9("p",{},e))}if(void 0===i.documentation);else if("string"==typeof i.documentation)tC.BC(this.domNodes.docs,b9("p",{},i.documentation));else{let e=this.renderMarkdownDocs(i.documentation);tC.BC(this.domNodes.docs,e.element)}let a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="",t=i.parameters[o];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"==typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(tU.xE(tx.kg(1304,"{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!t&&"string"==typeof t.documentation&&!!((0,iP.ni)(t.documentation).length>0)||!!t&&"object"==typeof t.documentation&&!!((0,iP.ni)(t.documentation).value.length>0)||!!e.documentation&&"string"==typeof e.documentation&&!!((0,iP.ni)(e.documentation).length>0)||!!e.documentation&&"object"==typeof e.documentation&&!!((0,iP.ni)(e.documentation.value).length>0)}renderParameters(e,t,i){let[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);let r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";let a=document.createElement("span");a.textContent=t.label.substring(s),tC.BC(e,o,r,a)}getParameterLabelOffsets(e,t){let i=e.parameters[t];if(!i)return[0,0];{if(Array.isArray(i.label))return i.label;if(!i.label.length)return[0,0];let t=RegExp(`(\\W|^)${(0,iZ.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);let n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return ti.ID}updateMaxHeight(){if(!this.domNodes)return;let e=Math.max(this.editor.getLayoutInfo().height/4,250),t=`${e}px`;this.domNodes.element.style.maxHeight=t;let i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};Ce=ti=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([b7(2,tI.fN),b7(3,i3.Cr),b7(4,rN.L)],Ce),(0,t3.x1A)("editorHoverWidget.highlightForeground",t3.QI5,tx.kg(1305,"Foreground color of the active item in the parameter hint."));var Ct=function(e,t){return function(i,n){t(i,n,e)}};let Ci=class extends t0.jG{static{tn=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(tn.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new b4(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()})),this.widget=new sR.d(()=>this._register(t.createInstance(Ce,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};Ci=tn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Ct(1,i_._Y),Ct(2,iQ.u)],Ci);class Cn extends tw.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:tx.aS(1301,"Trigger Parameter Hints"),precondition:tk.R.hasSignatureHelpProvider,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){let i=Ci.get(t);i?.trigger({triggerKind:iq.WA.Invoke})}}(0,tw.HW)(Ci.ID,Ci,2),(0,tw.Fl)(Cn);let Cs=tw.DX.bindToContribution(Ci.get);(0,tw.E_)(new Cs({id:"closeParameterHints",precondition:bJ.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:tk.R.focus,primary:9,secondary:[1033]}})),(0,tw.E_)(new Cs({id:"showPrevParameterHint",precondition:tI.M$.and(bJ.Visible,bJ.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:tk.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,tw.E_)(new Cs({id:"showNextParameterHint",precondition:tI.M$.and(bJ.Visible,bJ.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:tk.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}})),i(77513);class Co extends t0.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){var t,i;super(),this._editor=e,this._editorObs=(0,aI.U)(this._editor),this._placeholderText=this._editorObs.getOption(100),this._state=(0,o2.C)({owner:this,equalsFn:uO.dB},e=>{let t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}}),this._shouldViewBeAlive=(t=this,i=e=>this._state.read(e)?.placeholder!==void 0,(0,o2.ZX)(t,(e,t)=>!0===t||i(e))),this._view=(0,o2.un)(e=>{if(!this._shouldViewBeAlive.read(e))return;let t=(0,tC.h)("div.editorPlaceholder");e.store.add((0,o2.fm)(e=>{let i=this._state.read(e),n=i?.placeholder!==void 0;t.root.style.display=n?"block":"none",t.root.innerText=i?.placeholder??""})),e.store.add((0,o2.fm)(e=>{let i=this._editorObs.layoutInfo.read(e);t.root.style.left=`${i.contentLeft}px`,t.root.style.width=i.contentWidth-i.verticalScrollbarWidth+"px",t.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),e.store.add((0,o2.fm)(e=>{t.root.style.fontFamily=this._editorObs.getOption(58).read(e),t.root.style.fontSize=this._editorObs.getOption(61).read(e)+"px",t.root.style.lineHeight=this._editorObs.getOption(75).read(e)+"px"})),e.store.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,o2.lk)(0),position:(0,o2.lk)(null),domNode:t.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}}class Cr{constructor(e){this.instantiationService=e}init(){}}let Ca=class extends Cr{constructor(e,t){super(t),this.init(e)}};Ca=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(Z=i_._Y,function(e,t){Z(e,t,1)})],Ca),(0,tw.HW)(Co.ID,(X=()=>Co,(0,uf.e)()?(J=Ca,class extends J{constructor(){super(...arguments),this._autorun=void 0}init(...e){this._autorun=(0,o2.yC)((t,i)=>{let n=(0,o1.b6)(X(),t);i.add(this.instantiationService.createInstance(n,...e))})}dispose(){this._autorun?.dispose()}}):X()),0),(0,mm.x1)("editor.placeholder.foreground",hN.Ek,(0,tx.kg)(1324,"Foreground color of the placeholder text in the editor."));var Cl=i(64059),Ch=i(23001),Cd=i(1315);i(24289);var Cc=function(e,t){return function(i,n){t(i,n,e)}};let Cu=new tI.N1("renameInputVisible",!1,tx.kg(1376,"Whether the rename input widget is visible"));new tI.N1("renameInputFocused",!1,tx.kg(1377,"Whether the rename input widget is focused"));let Cg=class{constructor(e,t,i,n,s,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new t0.Cm,this._visibleContextKey=Cu.bindTo(s),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new ig.W,this._inputWithButton=new Cm,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new Cp(this._domNode,{fontInfo:this._editor.getOption(59),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;let t=e.getColor(t3.f9l),i=e.getColor(t3.DSL);this._domNode.style.backgroundColor=String(e.getColor(t3.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor(t3.cws)??"");let n=e.getColor(t3.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(t3.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(t3.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,iP.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);let e=this._editor.getOption(59);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return .8*e}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;let e=tC.tG(this.getDomNode().ownerDocument.body),t=tC.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;let n=this._editor.getOption(75),{totalHeight:s}=Cf.getLayoutInfo({lineHeight:n}),o=this._nPxAvailableBelow>6*s?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){let[e,t]=this._acceptKeybindings;return this._label.innerText=tx.kg(1378,"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){let t;if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,iP.j)(this._renameCandidateListView),(0,iP.j)(void 0!==this._nPxAvailableAbove),(0,iP.j)(void 0!==this._nPxAvailableBelow);let i=tC.OK(this._inputWithButton.domNode),n=tC.OK(this._label);t=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:t-n-i,width:tC.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,s){let{start:o,end:r}=this._getSelection(e,t);this._renameCts=s;let a=new t0.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),a.add(tC.ko(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),a.add(tC.ko(this._inputWithButton.button,tC.Bx.KEY_DOWN,e=>{let i=new Ch.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new t1.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",o.toString()),this._inputWithButton.input.setAttribute("selectionEnd",r.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),a.add((0,t0.s)(()=>{this._renameCts=void 0,s.dispose(!0)})),a.add((0,t0.s)(()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),a.add((0,t0.s)(()=>this._candidates.clear()));let l=new tJ.Zv;return l.p.finally(()=>{a.dispose(),this._hide()}),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),l.complete(e),!0),this._currentAcceptInput=e=>{let n,s;this._trace("invoking _currentAcceptInput"),(0,iP.j)(void 0!==this._renameCandidateListView);let o=this._renameCandidateListView.nCandidates,r=this._renameCandidateListView.focusedCandidate;(void 0!==r?(this._trace("using new name from renameSuggestion"),n=r,s={k:"renameSuggestion"}):(this._trace("using new name from inputField"),n=this._inputWithButton.input.value,s=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),n===t||0===n.trim().length)?this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)"):(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),l.complete({newName:n,wantsPreview:i&&e,stats:{source:s,nRenameSuggestions:o,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}}))},a.add(s.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),l.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,iP.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new iS.Qi;let i=t?iq.YT.Invoke:iq.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,iP.j)(this._editor.hasModel());let i=this._editor.getSelection(),n=0,s=t.length;return!t2.Q.isEmpty(i)&&!t2.Q.spansMultipleLines(i)&&t2.Q.containsRange(e,i)&&(n=Math.max(0,i.startColumn-e.startColumn),s=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:s}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,i){let n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");let s=await (0,tJ.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===s)return void n("returning early - received updateRenameCandidates results - undefined");let o=s.flatMap(e=>"fulfilled"===e.status&&(0,iP.O9)(e.value)?e.value:[]);n(`received updateRenameCandidates results - total (unfiltered) ${o.length} candidates.`);let r=iy.dM(o,e=>e.newSymbolName);n(`distinct candidates - ${r.length} candidates.`);let a=r.filter(({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e));(n(`valid distinct candidates - ${o.length} candidates.`),a.forEach(e=>this._candidates.add(e.newSymbolName)),a.length<1)?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._renameCandidateListView.setCandidates(a),n("asking editor to re-layout"),this._editor.layoutContentWidget(this))}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){let e,t=this._editor.getVisibleRanges();return t.length>0?e=t[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),e=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(e)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Cg=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Cc(2,t7.Gy),Cc(3,nF.b),Cc(4,tI.fN),Cc(5,im.rr)],Cg);class Cp{constructor(e,t){this._disposables=new t0.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=Cp._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._disposables.add(this._listWidget.onDidChangeFocus(e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)},this._disposables)),this._disposables.add(this._listWidget.onDidChangeSelection(e=>{1===e.elements.length&&t.onSelectionChange()},this._disposables)),this._disposables.add(this._listWidget.onDidBlur(e=>{this._listWidget.setFocus([])})),this._listWidget.style((0,nB.t8)({listInactiveFocusForeground:t3.nH,listInactiveFocusBackground:t3.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);let t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,tU.h5(tx.kg(1379,"Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;let e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;let t=this._listWidget.getFocusedElements()[0];if(void 0!==t)return t.newSymbolName}focusNext(){if(0===this._listWidget.length)return!1;let e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;let e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){let{totalHeight:e}=Cf.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){return Math.min(this._candidateViewHeight*e,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){let t=Math.ceil(Math.max(...e.map(e=>e.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){let n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},s=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new Cf(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new nP.B8("NewSymbolNameCandidates",e,n,[s],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class Cm{constructor(){this._buttonHoverContent="",this._onDidInputChange=new i5.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new t0.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",tx.kg(1380,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=tx.kg(1381,"Generate new name suggestions"),this._buttonCancelHoverText=tx.kg(1382,"Cancel"),this._buttonHoverContent=this._buttonGenHoverText,this._disposables.add((0,Cd.i)().setupDelayedHover(this._buttonNode,()=>({content:this._buttonHoverContent,appearance:{showPointer:!0,compact:!0}}))),this._domNode.appendChild(this._buttonNode),this._disposables.add(tC.ko(this.input,tC.Bx.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(tC.ko(this.input,tC.Bx.KEY_DOWN,e=>{let t=new Ch.Z(e);(15===t.keyCode||17===t.keyCode)&&this._onDidInputChange.fire()})),this._disposables.add(tC.ko(this.input,tC.Bx.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(tC.ko(this.input,tC.Bx.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(tC.ko(this.input,tC.Bx.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return(0,iP.j)(this._inputNode),this._inputNode}get button(){return(0,iP.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,of.s)(tb.W.sparkle),tC.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHoverContent=this._buttonGenHoverText,this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,of.s)(tb.W.stopCircle),tC.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHoverContent=this._buttonCancelHoverText,this.input.focus()}dispose(){this._disposables.dispose()}}class Cf{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${Cf._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=`${.8*t.lineHeight}px`,this._domNode.appendChild(i),this._icon=(0,of.s)(tb.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),p5.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){let t=!!e.tags?.includes(iq.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*Cf._PADDING}}dispose(){}}var C_=function(e,t){return function(i,n){t(i,n,e)}};class Cv{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let i=this._providers[this._providerRenameIdx];if(!i.resolveRenameLocation)break;let n=await i.resolveRenameLocation(this.model,this.position,e);if(n){if(n.rejectReason){t.push(n.rejectReason);continue}return n}}this._providerRenameIdx=0;let i=this.model.getWordAtPosition(this.position);return i?{range:new t2.Q(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join("\n"):void 0}:{range:t2.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){let s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};let o=await s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(tx.kg(1365,"No result.")),n)}}async function Cb(e,t,i,n){let s=new Cv(t,i,e),o=await s.resolveRenameLocation(iS.XO.None);return o?.rejectReason?{edits:[],rejectReason:o.rejectReason}:s.provideRenameEdits(n,iS.XO.None)}let CC=class{static{ts=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(ts.ID)}constructor(e,t,i,n,s,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=r,this._languageFeaturesService=a,this._disposableStore=new t0.Cm,this._cts=new iS.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Cg,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){let e,t=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new iS.Qi,!this.editor.hasModel())return void t("editor has no model");let i=this.editor.getPosition(),n=new Cv(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return void t("skeleton has no provider");let s=new iY.gI(this.editor,5,void 0,this._cts.token);try{t("resolving rename location");let i=n.resolveRenameLocation(s.token);this._progressService.showWhile(i,250),e=await i,t("resolved rename location")}catch(e){e instanceof iT.AL?t("resolve rename location cancelled",JSON.stringify(e,null," ")):(t("resolve rename location failed",e instanceof Error?e:JSON.stringify(e,null," ")),("string"==typeof e||(0,tj.VS)(e))&&i9.get(this.editor)?.showMessage(e||tx.kg(1366,"An unknown error occurred while resolving rename location"),i));return}finally{s.dispose()}if(!e)return void t("returning early - no loc");if(e.rejectReason){t(`returning early - rejected with reason: ${e.rejectReason}`,e.rejectReason),i9.get(this.editor)?.showMessage(e.rejectReason,i);return}if(s.token.isCancellationRequested)return void t("returning early - cts1 cancelled");let o=new iY.gI(this.editor,5,e.range,this._cts.token),r=this.editor.getModel(),a=this._languageFeaturesService.newSymbolNamesProvider.all(r),l=await Promise.all(a.map(async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1]));t("creating rename input field and awaiting its result");let h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=await this._renameWidget.getInput(e.range,e.text,h,a.length>0?(t,i)=>{let n=l.slice();return t===iq.YT.Automatic&&(n=n.filter(([e,t])=>t)),n.map(([n])=>n.provideNewSymbolNames(r,e.range,t,i))}:void 0,o);if(t("received response from rename input field"),"boolean"==typeof d){t(`returning early - rename input field response - ${d}`),d&&this.editor.focus(),o.dispose();return}this.editor.focus(),t("requesting rename edits");let c=(0,tJ.PK)(n.provideRenameEdits(d.newName,o.token),o.token).then(async i=>{if(!i)return void t("returning early - no rename edits result");if(!this.editor.hasModel())return void t("returning early - no model after rename edits are provided");if(i.rejectReason){t(`returning early - rejected with reason: ${i.rejectReason}`),this._notificationService.info(i.rejectReason);return}this.editor.setSelection(t2.Q.fromPositions(this.editor.getSelection().getPosition())),t("applying edits"),this._bulkEditService.apply(i,{editor:this.editor,showPreview:d.wantsPreview,label:tx.kg(1367,"Renaming '{0}' to '{1}'",e?.text,d.newName),code:"undoredo.rename",quotableLabel:tx.kg(1368,"Renaming {0} to {1}",e?.text,d.newName),respectAutoSaveConfig:!0,reason:s_.dg.rename()}).then(i=>{t("edits applied"),i.ariaSummary&&(0,tU.xE)(tx.kg(1369,"Successfully renamed '{0}' to '{1}'. Summary: {2}",e.text,d.newName,i.ariaSummary))}).catch(e=>{t(`error when applying edits ${JSON.stringify(e,null," ")}`),this._notificationService.error(tx.kg(1370,"Rename failed to apply edits")),this._logService.error(e)})},e=>{t("error when providing rename edits",JSON.stringify(e,null," ")),this._notificationService.error(tx.kg(1371,"Rename failed to compute edits")),this._logService.error(e)}).finally(()=>{o.dispose()});return t("returning rename operation"),this._progressService.showWhile(c,250),c}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}};CC=ts=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([C_(1,i_._Y),C_(2,n5.Ot),C_(3,iG.nu),C_(4,iA.N8),C_(5,im.rr),C_(6,Cl.U),C_(7,iQ.u)],CC);class Cw extends tw.ks{constructor(){super({id:"editor.action.rename",label:tx.aS(1373,"Rename Symbol"),precondition:tI.M$.and(tk.R.writable,tk.R.hasRenameProvider),kbOpts:{kbExpr:tk.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let i=e.get(ty.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return iW.r.isUri(n)&&t1.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},iT.dz):super.runCommand(e,t)}run(e,t){let i=e.get(im.rr),n=CC.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,tw.HW)(CC.ID,CC,4),(0,tw.Fl)(Cw);let Cy=tw.DX.bindToContribution(CC.get);(0,tw.E_)(new Cy({id:"acceptRenameInput",precondition:Cu,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:tI.M$.and(tk.R.focus,tI.M$.not("isComposing")),primary:3}})),(0,tw.E_)(new Cy({id:"acceptRenameInputWithPreview",precondition:tI.M$.and(Cu,tI.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:tI.M$.and(tk.R.focus,tI.M$.not("isComposing")),primary:2051}})),(0,tw.E_)(new Cy({id:"cancelRenameInput",precondition:Cu,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:tk.R.focus,primary:9,secondary:[1033]}})),(0,tL.ug)(class extends tL.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...tx.aS(1374,"Focus Next Rename Suggestion")},precondition:Cu,keybinding:[{primary:18,weight:199}]})}run(e){let t=e.get(ty.T).getFocusedCodeEditor();if(!t)return;let i=CC.get(t);i&&i.focusNextRenameSuggestion()}}),(0,tL.ug)(class extends tL.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...tx.aS(1375,"Focus Previous Rename Suggestion")},precondition:Cu,keybinding:[{primary:16,weight:199}]})}run(e){let t=e.get(ty.T).getFocusedCodeEditor();if(!t)return;let i=CC.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,tw.ke)("_executeDocumentRenameProvider",function(e,t,i,...n){let[s]=n;(0,iP.j)("string"==typeof s);let{renameProvider:o}=e.get(iQ.u);return Cb(o,t,i,s)}),(0,tw.ke)("_executePrepareRename",async function(e,t,i){let{renameProvider:n}=e.get(iQ.u),s=new Cv(t,i,n),o=await s.resolveRenameLocation(iS.XO.None);if(o?.rejectReason)throw Error(o.rejectReason);return o}),iH.O.as(or.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:6,description:tx.kg(1372,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var CS=function(e,t){return function(i,n){t(i,n,e)}};let Ck=class extends t0.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(t=>{let i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(t=>{(!this.options||t.hasChanged(81))&&(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(e=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new tJ.uC(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;let t=this.editor.getModel().getLanguageId();if(!t)return;let i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(i||n?.markers)return{foldingRules:n,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;let e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;let t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)})}updateDecorations(e){let t=this.editor.getModel();t&&(e=e.filter(e=>{if(!e.shouldBeInComments)return!0;let i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),s=n.findTokenIndexAtOffset(i.startColumn-1),o=n.getStandardTokenType(s);return n.getLanguageId(s)===t.getLanguageId()&&1===o}));let i=Object.values(this.currentOccurrences).map(e=>e.decorationId),n=e.map(e=>{var t;return{range:(t=e).range,options:t4.kI.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:t.hasSeparatorLine?2:1,sectionHeaderText:t.text}})}});this.editor.changeDecorations(t=>{let s=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=s.length;t<i;t++){let i={sectionHeader:e[t],decorationId:s[t]};this.currentOccurrences[i.decorationId]=i}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}};Ck=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([CS(1,af.JZ),CS(2,oM.w)],Ck),(0,tw.HW)(Ck.ID,Ck,1);var Cx=i(78087),CL=i(7712);function CD(e){let t,i=new Uint32Array(function(e){let t;if(t=2,"full"===e.type)t+=1+e.data.length;else for(let i of(t+=1,t+=3*e.deltas.length,e.deltas))i.data&&(t+=i.data.length);return t}(e)),n=0;if(i[n++]=e.id,"full"===e.type)i[n++]=1,i[n++]=e.data.length,i.set(e.data,n),n+=e.data.length;else for(let t of(i[n++]=2,i[n++]=e.deltas.length,e.deltas))i[n++]=t.start,i[n++]=t.deleteCount,t.data?(i[n++]=t.data.length,i.set(t.data,n),n+=t.data.length):i[n++]=0;return t=new Uint8Array(i.buffer,i.byteOffset,4*i.length),iu.cm()||function(e){for(let t=0,i=e.length;t<i;t+=4){let i=e[t+0],n=e[t+1],s=e[t+2],o=e[t+3];e[t+0]=o,e[t+1]=s,e[t+2]=n,e[t+3]=i}}(t),_N.MB.wrap(t)}function CI(e){return e&&!!e.data}function CN(e){return e&&Array.isArray(e.edits)}class CE{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}async function CM(e,t,i,n,s){let o,r=(o=e.orderedGroups(t)).length>0?o[0]:[],a=await Promise.all(r.map(async e=>{let o,r=null;try{o=await e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(e){r=e,o=null}return o&&(CI(o)||CN(o))||(o=null),new CE(e,o,r)}));for(let e of a){if(e.error)throw e.error;if(e.tokens)return e}return a.length>0?a[0]:null}class CT{constructor(e,t){this.provider=e,this.tokens=t}}function CR(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function CO(e,t,i,n){let s=CR(e,t),o=await Promise.all(s.map(async e=>{let s;try{s=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,iT.M_)(e),s=null}return s&&CI(s)||(s=null),new CT(e,s)}));for(let e of o)if(e.tokens)return e;return o.length>0?o[0]:null}tz.w.registerCommand("_provideDocumentSemanticTokensLegend",async(e,...t)=>{let i,[n]=t;(0,iP.j)(n instanceof iW.r);let s=e.get(sf.S).getModel(n);if(!s)return;let{documentSemanticTokensProvider:o}=e.get(iQ.u),r=(i=o.orderedGroups(s)).length>0?i[0]:null;return r?r[0].getLegend():e.get(tz.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",n)}),tz.w.registerCommand("_provideDocumentSemanticTokens",async(e,...t)=>{let[i]=t;(0,iP.j)(i instanceof iW.r);let n=e.get(sf.S).getModel(i);if(!n)return;let{documentSemanticTokensProvider:s}=e.get(iQ.u);if(!s.has(n))return e.get(tz.d).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());let o=await CM(s,n,null,null,iS.XO.None);if(!o)return;let{provider:r,tokens:a}=o;if(!a||!CI(a))return;let l=CD({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l}),tz.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(e,...t)=>{let[i,n]=t;(0,iP.j)(i instanceof iW.r);let s=e.get(sf.S).getModel(i);if(!s)return;let{documentRangeSemanticTokensProvider:o}=e.get(iQ.u),r=CR(o,s);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!t2.Q.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();let a=await CO(o,s,t2.Q.lift(n),iS.XO.None);if(a)return a.provider.getLegend()}),tz.w.registerCommand("_provideDocumentRangeSemanticTokens",async(e,...t)=>{let[i,n]=t;(0,iP.j)(i instanceof iW.r),(0,iP.j)(t2.Q.isIRange(n));let s=e.get(sf.S).getModel(i);if(!s)return;let{documentRangeSemanticTokensProvider:o}=e.get(iQ.u),r=await CO(o,s,t2.Q.lift(n),iS.XO.None);if(r&&r.tokens)return CD({id:0,type:"full",data:r.tokens.data})});let CP="editor.semanticHighlighting";function CA(e,t,i){let n=i.getValue(CP,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"==typeof n?n:t.getColorTheme().semanticHighlighting}var CF=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CB=function(e,t){return function(i,n){t(i,n,e)}};let CW=class extends t0.jG{constructor(e,t,i,n,s,o){super(),this._watchers=new od.fT;const r=t=>{this._watchers.get(t.uri)?.dispose(),this._watchers.set(t.uri,new CH(t,e,i,s,o))},a=(e,t)=>{t.dispose(),this._watchers.delete(e.uri)},l=()=>{for(let e of t.getModels()){let t=this._watchers.get(e.uri);CA(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach(e=>{CA(e,i,n)&&r(e)}),this._register(t.onModelAdded(e=>{CA(e,i,n)&&r(e)})),this._register(t.onModelRemoved(e=>{let t=this._watchers.get(e.uri);t&&a(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(CP)&&l()})),this._register(i.onDidColorThemeChange(l))}dispose(){(0,t0.AS)(this._watchers.values()),this._watchers.clear(),super.dispose()}};CW=CF([CB(0,CL.F),CB(1,sf.S),CB(2,t7.Gy),CB(3,tD.pG),CB(4,oy.U),CB(5,iQ.u)],CW);let CH=class extends t0.jG{static{to=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:to.REQUEST_MIN_DELAY,max:to.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new tJ.uC(()=>this._fetchDocumentSemanticTokensNow(),to.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const o=()=>{for(let t of((0,t0.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._provider.all(e)))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,t0.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){var e,t;if(this._currentDocumentRequestCancellationTokenSource)return;if(e=this._provider,t=this._model,!e.has(t)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let i=new iS.Qi,n=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,s=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,o=CM(this._provider,this._model,n,s,i.token);this._currentDocumentRequestCancellationTokenSource=i,this._providersChangedDuringRequest=!1;let r=[],a=this._model.onDidChangeContent(e=>{r.push(e)}),l=new ig.W(!1);o.then(e=>{if(this._debounceInformation.update(this._model,l.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),e){let{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,r)}else this._setDocumentSemanticTokens(null,null,null,r)},e=>{e&&(iT.MB(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||iT.dz(e),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o<s;o++)i[n+o]=e[t+o]}_setDocumentSemanticTokens(e,t,i,n){let s=this._currentDocumentResponse,o=()=>{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i)return void this._model.tokenization.setSemanticTokens(null,!1);if(!t){this._model.tokenization.setSemanticTokens(null,!0),o();return}if(CN(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(let i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;let n=s.data,o=new Uint32Array(n.length+e),r=n.length,a=o.length;for(let e=t.edits.length-1;e>=0;e--){let l=t.edits[e];if(l.start>n.length){i.warnInvalidEditStart(s.resultId,t.resultId,e,l.start,n.length),this._model.tokenization.setSemanticTokens(null,!0);return}let h=r-(l.start+l.deleteCount);h>0&&(to._copy(n,r-h,o,a-h,h),a-=h),l.data&&(to._copy(l.data,0,o,a-l.data.length,l.data.length),a-=l.data.length),r=l.start}r>0&&to._copy(n,0,o,0,r),t={resultId:t.resultId,data:o}}}if(CI(t)){this._currentDocumentResponse=new CV(e,t.resultId,t.data);let s=(0,Cx.b)(t,i,this._model.getLanguageId());if(n.length>0)for(let e of n)for(let t of s)for(let i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(s,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}};CH=to=CF([CB(1,CL.F),CB(2,t7.Gy),CB(3,oy.U),CB(4,iQ.u)],CH);class CV{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,ox.x)(CW);var Cz=function(e,t){return function(i,n){t(i,n,e)}};let CU=class extends t0.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,n,s,o){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new tJ.uC(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const r=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{r()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),r()})),this._register(this._editor.onDidChangeModelContent(e=>{this._cancelAll(),r()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),r()})),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(CP)&&(this._cancelAll(),r())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),r()})),r()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){var e;if(!this._editor.hasModel())return;let t=this._editor.getModel();if(t.tokenization.hasCompleteSemanticTokens())return;if(!CA(t,this._themeService,this._configurationService)||(e=this._provider,!e.has(t))){t.tokenization.hasSomeSemanticTokens()&&t.tokenization.setSemanticTokens(null,!1);return}let i=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(i.map(e=>this._requestRange(t,e)))}_requestRange(e,t){let i=e.getVersionId(),n=(0,tJ.SS)(i=>Promise.resolve(CO(this._provider,e,t,i))),s=new ig.W(!1);return n.then(n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;let{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,Cx.b)(r,a,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};CU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Cz(1,CL.F),Cz(2,t7.Gy),Cz(3,tD.pG),Cz(4,oy.U),Cz(5,iQ.u)],CU),(0,tw.HW)(CU.ID,CU,1);class Cj{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let i=[];for(let n of t){let t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){let n=t.getWordAtPosition(i);if(!n)return;let{word:s,startColumn:o}=n,r=i.column-o,a=r,l=r,h=0;for(;a>=0;a--){let e=s.charCodeAt(a);if(a!==r&&(95===e||45===e)||(0,iZ.Lv)(e)&&(0,iZ.Wv)(h))break;h=e}for(a+=1;l<s.length;l++){let e=s.charCodeAt(l);if((0,iZ.Wv)(e)&&(0,iZ.Lv)(h)||95===e||45===e)break;h=e}a<l&&e.push({range:new t2.Q(i.lineNumber,o+a,i.lineNumber,o+l)})}_addWordRanges(e,t,i){let n=t.getWordAtPosition(i);n&&e.push({range:new t2.Q(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new t2.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}class C${constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let i=new C$(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let CK=class{static{tr=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(tr.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await CY(this._languageFeaturesService.selectionRangeProvider,i,t.map(e=>e.getPosition()),this._editor.getOption(129),iS.XO.None).then(e=>{if(iy.EI(e)&&e.length===t.length&&this._editor.hasModel()&&iy.aI(this._editor.getSelections(),t,(e,t)=>e.equalsSelection(t))){for(let i=0;i<e.length;i++)e[i]=e[i].filter(e=>e.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition())),e[i].unshift(t[i]);this._state=e.map(e=>new C$(0,e)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(t=>t.mov(e));let n=this._state.map(e=>tK.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}};CK=tr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(ee=iQ.u,function(e,t){ee(e,t,1)})],CK);class CG extends tw.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){let i=CK.get(t);i&&await i.run(this._forward)}}class Cq extends CG{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:tx.aS(1385,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"1_basic",title:tx.kg(1383,"&&Expand Selection"),order:2}})}}tz.w.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class CQ extends CG{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:tx.aS(1386,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:tL.D8.MenubarSelectionMenu,group:"1_basic",title:tx.kg(1384,"&&Shrink Selection"),order:3}})}}async function CY(e,t,i,n,s){let o=e.all(t).concat(new Cj(n.selectSubwords));1===o.length&&o.unshift(new pf);let r=[],a=[];for(let e of o)r.push(Promise.resolve(e.provideSelectionRanges(t,i,s)).then(e=>{if(iy.EI(e)&&e.length===i.length)for(let t=0;t<i.length;t++)for(let n of(a[t]||(a[t]=[]),e[t]))t2.Q.isIRange(n.range)&&t2.Q.containsPosition(n.range,i[t])&&a[t].push(t2.Q.lift(n.range))},iT.M_));return await Promise.all(r),a.map(e=>{let i;if(0===e.length)return[];e.sort((e,t)=>t1.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:t1.y.isBefore(t.getStartPosition(),e.getStartPosition())?-1:t1.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:1*!!t1.y.isBefore(t.getEndPosition(),e.getEndPosition()));let s=[];for(let t of e)(!i||t2.Q.containsRange(t,i)&&!t2.Q.equalsRange(t,i))&&(s.push(t),i=t);if(!n.selectLeadingAndTrailingWhitespace)return s;let o=[s[0]];for(let e=1;e<s.length;e++){let i=s[e-1],n=s[e];if(n.startLineNumber!==i.startLineNumber||n.endLineNumber!==i.endLineNumber){let e=new t2.Q(i.startLineNumber,t.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,t.getLineLastNonWhitespaceColumn(i.endLineNumber));e.containsRange(i)&&!e.equalsRange(i)&&n.containsRange(e)&&!n.equalsRange(e)&&o.push(e);let s=new t2.Q(i.startLineNumber,1,i.endLineNumber,t.getLineMaxColumn(i.endLineNumber));s.containsRange(i)&&!s.equalsRange(e)&&n.containsRange(s)&&!n.equalsRange(s)&&o.push(s)}o.push(n)}return o})}(0,tw.HW)(CK.ID,CK,4),(0,tw.Fl)(Cq),(0,tw.Fl)(CQ),tz.w.registerCommand("_executeSelectionRangeProvider",async function(e,...t){let[i,n]=t;(0,iP.j)(iW.r.isUri(i));let s=e.get(iQ.u).selectionRangeProvider,o=await e.get(as.b).createModelReference(i);try{return CY(s,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},iS.XO.None)}finally{o.dispose()}});let CZ=Object.freeze({View:(0,tx.aS)(1623,"View"),Help:(0,tx.aS)(1624,"Help"),Test:(0,tx.aS)(1625,"Test"),File:(0,tx.aS)(1626,"File"),Preferences:(0,tx.aS)(1627,"Preferences"),Developer:(0,tx.aS)(1628,"Developer")});class CX extends tw.qO{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,tx.aS)(1433,"Toggle Editor Sticky Scroll"),mnemonicTitle:(0,tx.kg)(1429,"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,tx.aS)(1434,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:CZ.View,toggled:{condition:tI.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,tx.kg)(1430,"Sticky Scroll"),mnemonicTitle:(0,tx.kg)(1431,"&&Sticky Scroll")},menu:[{id:tL.D8.CommandPalette},{id:tL.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:tL.D8.StickyScrollContext}]})}async runEditorCommand(e,t){let i=e.get(tD.pG),n=!i.getValue("editor.stickyScroll.enabled"),s=mz.get(t)?.isFocused();i.updateValue("editor.stickyScroll.enabled",n),s&&t.focus()}}class CJ extends tw.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,tx.aS)(1435,"Focus Editor Sticky Scroll"),mnemonicTitle:(0,tx.kg)(1432,"&&Focus Editor Sticky Scroll")},precondition:tI.M$.and(tI.M$.has("config.editor.stickyScroll.enabled"),tk.R.stickyScrollVisible),menu:[{id:tL.D8.CommandPalette}]})}runEditorCommand(e,t){mz.get(t)?.focus()}}class C0 extends tw.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,tx.aS)(1436,"Select the next editor sticky scroll line"),precondition:tk.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:18}})}runEditorCommand(e,t){mz.get(t)?.focusNext()}}class C1 extends tw.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,tx.aS)(1437,"Select the previous sticky scroll line"),precondition:tk.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:16}})}runEditorCommand(e,t){mz.get(t)?.focusPrevious()}}class C2 extends tw.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,tx.aS)(1438,"Go to the focused sticky scroll line"),precondition:tk.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:3}})}runEditorCommand(e,t){mz.get(t)?.goToFocused()}}class C5 extends tw.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,tx.aS)(1439,"Select Editor"),precondition:tk.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:9}})}runEditorCommand(e,t){mz.get(t)?.selectEditor()}}(0,tw.HW)(mz.ID,mz,1),(0,tL.ug)(CX),(0,tL.ug)(CJ),(0,tL.ug)(C1),(0,tL.ug)(C0),(0,tL.ug)(C2),(0,tL.ug)(C5);var C4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C3=function(e,t){return function(i,n){t(i,n,e)}};class C7{constructor(e,t,i,n,s,o,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.action=o,this.completion=r}}let C9=class extends t0.mp{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&0===this.completionModel.getIncompleteProvider().size}get items(){let e=[],{items:t}=this.completionModel,i=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),n=ik.f.slice(t,i),s=ik.f.slice(t,0,i),o=5;for(let t of ik.f.concat(n,s)){if(t.score===aX.ne.Default)continue;let i=new t2.Q(t.editStart.lineNumber,t.editStart.column,t.editInsertEnd.lineNumber,t.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),n=t.completion.insertTextRules&&4&t.completion.insertTextRules?{snippet:t.completion.insertText}:t.completion.insertText;e.push(new C7(i,n,t.filterTextLow??t.labelLow,t.completion.additionalTextEdits,t.completion.command,t.completion.action,t)),o-- >=0&&t.resolve(iS.XO.None)}return e}};C9=C4([C3(5,pc)],C9);let C8=class extends t0.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){let s,o,r;if(i.selectedSuggestionInfo)return;for(let t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;let a=s.getOption(102);if(uD.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let l=e.tokenization.getLineTokens(t.lineNumber),h=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==uD.valueFor(a,h))return;let d=e.getWordAtPosition(t);if(d?.word||(o=this._getTriggerCharacterInfo(e,t)),!d?.word&&!o||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let c=e.getValueInRange(new t2.Q(t.lineNumber,1,t.lineNumber,t.column));if(!o&&this._lastResult?.canBeReused(e,t.lineNumber,d)){let e=new pv(c,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),r=this._lastResult}else{let i,a=await uk(this._languageFeatureService.completionProvider,e,t,new uy(void 0,pS.createSuggestFilter(s).itemKind,o?.providers),o&&{triggerKind:1,triggerCharacter:o.ch},n);a.needsClipboard&&(i=await this._clipboardService.readText());let l=new pb(a.items,t.column,new pv(c,0),p_.None,s.getOption(134),s.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},i);r=new C9(e,t.lineNumber,d,l,a,this._suggestMemoryService)}return this._lastResult=r,r}handleItemDidShow(e,t){t.completion.resolve(iS.XO.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){let i=e.getValueInRange(t2.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(let t of this._languageFeatureService.completionProvider.all(e))t.triggerCharacters?.includes(i)&&n.add(t);if(0!==n.size)return{providers:n,ch:i}}};C8=C4([C3(0,iQ.u),C3(1,ip.h),C3(2,pc),C3(3,ty.T)],C8),(0,ox.x)(C8);class C6 extends tw.ks{constructor(){super({id:"editor.action.forceRetokenize",label:tx.aS(1517,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getModel();i.tokenization.resetTokenization();let n=new ig.W;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}(0,tw.Fl)(C6);var we=i(96444);class wt extends tL.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:wt.ID,title:tx.aS(1515,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:tx.aS(1516,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){let e=!we.M.getTabFocusMode();we.M.setTabFocusMode(e),e?(0,tU.xE)(tx.kg(1513,"Pressing Tab will now move focus to the next focusable element")):(0,tU.xE)(tx.kg(1514,"Pressing Tab will now insert the tab character"))}}(0,tL.ug)(wt),i(76825);var wi=i(44624);i(83085);var wn=i(9634);i(36046);var ws=function(e,t){return function(i,n){t(i,n,e)}};let wo=class extends t0.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,tC.BC)(e,(0,tC.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,rx.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const o=this._register(new wn.f(this.el,"click")),r=this._register(new wn.f(this.el,"keypress")),a=i5.Jh.chain(r.event,e=>e.map(e=>new Ch.Z(e)).filter(e=>3===e.keyCode)),l=this._register(new wn.f(this.el,sG.B.Tap)).event;this._register(sG.q.addTarget(this.el));const h=i5.Jh.any(o.event,a,l);this._register(h(e=>{this.enabled&&(tC.fs.stop(e,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};wo=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ws(3,rk.TN),ws(4,i3.Cr)],wo);var wr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wa=function(e,t){return function(i,n){t(i,n,e)}};let wl=class extends t0.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(wh))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,26)}};wl=wr([wa(1,i_._Y)],wl);let wh=class extends t0.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(i4.T,{}),this.element=(0,tC.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){let t=(0,tC.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,tC.w_)(this.element)}show(e){(0,tC.w_)(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let i=(0,tC.BC)(this.element,(0,tC.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,tC.$)(`div${iX.L.asCSSSelector(e.icon)}`));let n=(0,tC.BC)(this.element,(0,tC.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,tC.BC)(this.element,(0,tC.$)("div.message-actions-container")),e.actions)for(let t of e.actions)this._register(this.instantiationService.createInstance(wo,this.messageActionsContainer,{...t,tabIndex:-1},{}));let s=(0,tC.BC)(this.element,(0,tC.$)("div.action-container"));this.actionBar=this._register(new nR.E(s)),this.actionBar.push(this._register(new o0.rc("banner.close",(0,tx.kg)(1518,"Close Banner"),iX.L.asClassName(sQ.$_),!0,()=>{"function"==typeof e.onClose&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};wh=wr([wa(0,i_._Y)],wh);var wd=i(50502),wc=i(56636),wu=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wg=function(e,t){return function(i,n){t(i,n,e)}};let wp=(0,sQ.pU)("extensions-warning-message",tb.W.warning,tx.kg(1519,"Icon shown with a warning message in the extensions editor.")),wm=class extends t0.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){let t;if(this._bannerClosed)return;let i=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);if(e.nonBasicAsciiCharacterCount>=i)t={message:tx.kg(1520,"This document contains many non-basic ASCII unicode characters"),command:new wI};else if(e.ambiguousCharacterCount>=i)t={message:tx.kg(1521,"This document contains many ambiguous unicode characters"),command:new wL};else if(e.invisibleCharacterCount>=i)t={message:tx.kg(1522,"This document contains many invisible unicode characters"),command:new wD};else throw Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:t.message,icon:wp,actions:[{label:t.command.shortLabel,href:`command:${t.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(wl,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(e=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){var e,t;if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let i=(e=this._workspaceTrustService.isWorkspaceTrusted(),{nonBasicASCII:(t=this._options).nonBasicASCII===sW.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===sW.XR?!e:t.includeComments,includeStrings:t.includeStrings===sW.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales});if([i.nonBasicASCII,i.ambiguousCharacters,i.invisibleCharacters].every(e=>!1===e))return;let n={nonBasicASCII:i.nonBasicASCII,ambiguousCharacters:i.ambiguousCharacters,invisibleCharacters:i.invisibleCharacters,includeComments:i.includeComments,includeStrings:i.includeStrings,allowedCodePoints:Object.keys(i.allowedCharacters).map(e=>e.codePointAt(0)),allowedLocales:Object.keys(i.allowedLocales).map(e=>"_os"===e?vR.x.NumberFormat().value.resolvedOptions().locale:"_vscode"===e?iu.BH:e)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new wf(this._editor,n,this._updateState,this._editorWorkerService):this._highlighter=new w_(this._editor,n,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};wm=wu([wg(1,oM.w),wg(2,wd.L),wg(3,i_._Y)],wm);let wf=class extends t0.jG{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new tJ.uC(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let i=[];if(!t.hasMore)for(let e of t.ranges)i.push({range:e,options:wS.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();return(0,wc.GN)(t,e)?{reason:wy(t.getValueInRange(e.range),this._options),inComment:(0,wc.a6)(t,e),inString:(0,wc.wc)(t,e)}:null}};wf=wu([wg(3,oM.w)],wf);class w_ extends t0.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new tJ.uC(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();let e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let t of e){let e=wi.P.computeUnicodeHighlights(this._model,this._options,t);for(let t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(let e of i.ranges)t.push({range:e,options:wS.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,wc.GN)(t,e)?{reason:wy(i,this._options),inComment:(0,wc.a6)(t,e),inString:(0,wc.wc)(t,e)}:null}}let wv=tx.kg(1523,"Configure Unicode Highlight Options"),wb=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];let i=this._editor.getModel(),n=this._editor.getContribution(wm.ID);if(!n)return[];let s=[],o=new Set,r=300;for(let e of t){let t,a=n.getDecorationInfo(e);if(!a)continue;let l=i.getValueInRange(e.range).codePointAt(0),h=ww(l);switch(a.reason.kind){case 0:t=(0,iZ.aC)(a.reason.confusableWith)?tx.kg(1524,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,ww(a.reason.confusableWith.codePointAt(0))):tx.kg(1525,"The character {0} could be confused with the character {1}, which is more common in source code.",h,ww(a.reason.confusableWith.codePointAt(0)));break;case 1:t=tx.kg(1526,"The character {0} is invisible.",h);break;case 2:t=tx.kg(1527,"The character {0} is not a basic ASCII character.",h)}if(o.has(t))continue;o.add(t);let d={codePoint:l,reason:a.reason,inComment:a.inComment,inString:a.inString},c=tx.kg(1528,"Adjust settings"),u=(0,tj.AV)(wN.ID,d),g=new tj.Bc("",!0).appendMarkdown(t).appendText(" ").appendLink(u,c,wv);s.push(new rB(this,e.range,[g],!1,r++))}return s}renderHoverParts(e,t){return function(e,t,i,n,s){t.sort((0,iy.VE)(e=>e.ordinal,iy.U9));let o=[];for(let r of t){let t=rU(i,r,n,s,e.onContentsChanged);e.fragment.appendChild(t.hoverElement),o.push(t)}return new oI(o)}(e,t,this._editor,this._languageService,this._openerService)}};function wC(e){return`U+${e.toString(16).padStart(4,"0")}`}function ww(e){var t;let i=`\`${wC(e)}\``;return iZ.y_.isInvisibleCharacter(e)||(i+=` "${96===(t=e)?"`` ` ``":"`"+String.fromCodePoint(t)+"`"}"`),i}function wy(e,t){return wi.P.computeUnicodeHighlightReason(e,t)}wb=wu([wg(1,rN.L),wg(2,i3.Cr)],wb);class wS{constructor(){this.map=new Map}static{this.instance=new wS}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let i=`${e}${t}`,n=this.map.get(i);return n||(n=t4.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class wk extends tw.ks{constructor(){super({id:wL.ID,label:tx.aS(1537,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=tx.kg(1529,"Disable Highlight In Comments")}async run(e,t,i){let n=e.get(tD.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sW.Of.includeComments,!1,2)}}class wx extends tw.ks{constructor(){super({id:wL.ID,label:tx.aS(1538,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=tx.kg(1530,"Disable Highlight In Strings")}async run(e,t,i){let n=e.get(tD.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sW.Of.includeStrings,!1,2)}}class wL extends tL.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:wL.ID,title:tx.aS(1539,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=tx.kg(1531,"Disable Ambiguous Highlight")}async run(e,t,i){let n=e.get(tD.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sW.Of.ambiguousCharacters,!1,2)}}class wD extends tL.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:wD.ID,title:tx.aS(1540,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=tx.kg(1532,"Disable Invisible Highlight")}async run(e,t,i){let n=e.get(tD.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sW.Of.invisibleCharacters,!1,2)}}class wI extends tL.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:wI.ID,title:tx.aS(1541,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=tx.kg(1533,"Disable Non ASCII Highlight")}async run(e,t,i){let n=e.get(tD.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sW.Of.nonBasicASCII,!1,2)}}class wN extends tL.L{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:wN.ID,title:tx.aS(1542,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){let{codePoint:i,reason:n,inString:s,inComment:o}=t,r=String.fromCodePoint(i),a=e.get(iF.GK),l=e.get(tD.pG),h=[];if(0===n.kind)for(let e of n.notAmbiguousInLocales)h.push({label:tx.kg(1536,'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{wM(l,[e])}});if(h.push({label:iZ.y_.isInvisibleCharacter(i)?tx.kg(1534,"Exclude {0} (invisible character) from being highlighted",wC(i)):tx.kg(1535,"Exclude {0} from being highlighted",`${wC(i)} "${r}"`),run:()=>wE(l,[i])}),o){let e=new wk;h.push({label:e.label,run:async()=>e.runAction(l)})}else if(s){let e=new wx;h.push({label:e.label,run:async()=>e.runAction(l)})}function d(e){return"string"==typeof e.desc.title?e.desc.title:e.desc.title.value}if(0===n.kind){let e=new wL;h.push({label:d(e),run:async()=>e.runAction(l)})}else if(1===n.kind){let e=new wD;h.push({label:d(e),run:async()=>e.runAction(l)})}else if(2===n.kind){let e=new wI;h.push({label:d(e),run:async()=>e.runAction(l)})}else{var c=n;throw Error(`Unexpected value: ${c}`)}let u=await a.pick(h,{title:wv});u&&await u.run()}}async function wE(e,t){let i,n=e.getValue(sW.Of.allowedCharacters);for(let e of(i="object"==typeof n&&n?n:{},t))i[String.fromCodePoint(e)]=!0;await e.updateValue(sW.Of.allowedCharacters,i,2)}async function wM(e,t){let i,n=e.inspect(sW.Of.allowedLocales).user?.value;for(let e of(i="object"==typeof n&&n?Object.assign({},n):{},t))i[e]=!0;await e.updateValue(sW.Of.allowedLocales,i,2)}(0,tL.ug)(wL),(0,tL.ug)(wD),(0,tL.ug)(wI),(0,tL.ug)(wN),(0,tw.HW)(wm.ID,wm,1),oN.register(wb);var wT=i(85360),wR=function(e,t){return function(i,n){t(i,n,e)}};let wO="ignoreUnusualLineTerminators",wP=class extends t0.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(e=>{e.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){var e,t;let i;if("off"===this._config||!this._editor.hasModel())return;let n=this._editor.getModel();if(n.mightContainUnusualLineTerminators()){if(!(!0===(e=this._codeEditorService,e.getModelProperty(n.uri,wO))||this._editor.getOption(104))){if("auto"===this._config)return void n.removeUnusualLineTerminators(this._editor.getSelections());if(!this._isPresentingDialog){try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:tx.kg(1543,"Unusual Line Terminators"),message:tx.kg(1544,"Detected unusual line terminators"),detail:tx.kg(1545,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,nt.P8)(n.uri)),primaryButton:tx.kg(1546,"&&Remove Unusual Line Terminators"),cancelButton:tx.kg(1547,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed)return void(t=this._codeEditorService,t.setModelProperty(n.uri,wO,!0));n.removeUnusualLineTerminators(this._editor.getSelections())}}}}};wP=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([wR(1,wT.X),wR(2,ty.T)],wP),(0,tw.HW)(wP.ID,wP,1);var wA=i(27375),wF=i(65825);class wB{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){let n=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return n?e.isDisposed()?void 0:e.findMatches(n.word,!0,!1,!0,wF.J3,!1).map(e=>({range:e.range,kind:iq.Kb.Text})):Promise.resolve([])}provideMultiDocumentHighlights(e,t,i,n){let s=new od.fT,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(s);for(let t of[e,...i]){if(t.isDisposed())continue;let e=t.findMatches(o.word,!0,!1,!0,wF.J3,!1).map(e=>({range:e.range,kind:iq.Kb.Text}));e&&s.set(t.uri,e)}return s}}let wW=class extends t0.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new wB)),this._register(e.multiDocumentHighlightProvider.register("*",new wB))}};wW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(et=iQ.u,function(e,t){et(e,t,0)})],wW);var wH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wV=function(e,t){return function(i,n){t(i,n,e)}};let wz=new tI.N1("hasWordHighlights",!1);function wU(e,t,i,n){let s=e.ordered(t);return(0,tJ.$1)(s.map(e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,iT.M_)),e=>null!=e).then(e=>{if(e){let i=new od.fT;return i.set(t.uri,e),i}return new od.fT})}class wj{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,tJ.SS)(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let i=e.getWordAtPosition(t.getPosition());return i?new t2.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}}class w$ extends wj{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return wU(this._providers,e,t.getPosition(),n).then(e=>e||new od.fT)}}class wK extends wj{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){var s,o,r;let a;return(s=this._providers,o=t.getPosition(),r=this._otherModels,a=s.ordered(e),(0,tJ.$1)(a.map(t=>()=>{let i=r.filter(e=>(0,t5.vd)(e)).filter(e=>(0,wA.f)(t.selector,e.uri,e.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(t.provideMultiDocumentHighlights(e,o,i,n)).then(void 0,iT.M_)}),e=>null!=e)).then(e=>e||new od.fT)}}(0,tw.ke)("_executeDocumentHighlights",async(e,t,i)=>{let n=e.get(iQ.u),s=await wU(n.documentHighlightProvider,t,i,iS.XO.None);return s?.get(t.uri)});let wG=class{static{ta=this}static{this.storedDecorationIDs=new od.fT}static{this.query=null}constructor(e,t,i,n,s,o,r,a){this.toUnhook=new t0.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new od.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new tJ.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=o,this.textModelService=s,this.configurationService=r,this.logService=a,this._hasWordHighlights=wz.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlightEnablement&&this.runDelayer.trigger(()=>{this._onPositionChanged(e)})})),this.toUnhook.add(e.onDidFocusEditorText(e=>{"off"!==this.occurrencesHighlightEnablement&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(e=>{(0,ne.v$)(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():ta.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(e=>{let t=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==t)switch(this.occurrencesHighlightEnablement=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(ta.query?.modelInfo?.modelURI);break;case"multiFile":ta.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t)}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(e=>{if(e.affectsConfiguration("editor.occurrencesHighlightDelay")){let e=r.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==e&&(this.occurrencesHighlightDelay=e)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{let e=this.codeEditorService.getFocusedCodeEditor();e?e.getModel()?.uri.scheme===ne.ny.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==ne.ny.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,ta.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){"off"!==this.occurrencesHighlightEnablement&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}))}stop(){"off"!==this.occurrencesHighlightEnablement&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(t2.Q.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);let n=this._getWord();if(n){let s=this.editor.getModel().getLineContent(i.startLineNumber);(0,tU.xE)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);let n=this._getWord();if(n){let s=this.editor.getModel().getLineContent(i.startLineNumber);(0,tU.xE)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=ta.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),ta.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){let t=this.codeEditorService.listCodeEditors(),i=[];for(let n of t){if(!n.hasModel()||(0,nt.n4)(n.getModel().uri,e))continue;let t=ta.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);let s=wq.get(n);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(let e of i)ta.storedDecorationIDs.delete(e)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==ne.ny.vscodeNotebookCell&&ta.query?.modelInfo?.modelURI.scheme!==ne.ny.vscodeNotebookCell?(ta.query=null,this._run()):ta.query?.modelInfo&&(ta.query.modelInfo=null)),void 0!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),void 0!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){"off"===this.occurrencesHighlightEnablement||"api"!==e.source&&3!==e.reason?this._stopAll():this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===ne.ny.vscodeNotebookCell){let t=[];for(let i of this.codeEditorService.listCodeEditors()){let n=i.getModel();n&&n!==e&&n.uri.scheme===ne.ny.vscodeNotebookCell&&t.push(n)}return t}let t=[],i=this.codeEditorService.listCodeEditors();for(let n of i){if(!(0,ap.Np)(n))continue;let i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlightEnablement)return[];for(let n of i){let i=n.getModel();i&&i!==e&&t.push(i)}return t}async _run(e,t){if(this.editor.hasTextFocus()){let e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber){ta.query=null,this._stopAll();return}let t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){ta.query=null,this._stopAll();return}ta.query={modelInfo:{modelURI:this.model.uri,selection:e}}}else if(!ta.query)return void this._stopAll();if(this.lastCursorPositionChangeTime=new Date().getTime(),(0,nt.n4)(this.editor.getModel().uri,ta.query.modelInfo?.modelURI)){if(!e){for(let e of this.decorations.getRanges())if(e.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);let i=++this.workerRequestTokenId;this.workerRequestCompleted=!1;let n=this.getOtherModelsToHighlight(this.editor.getModel());if(!ta.query||!ta.query.modelInfo)return;let s=await this.textModelService.createModelReference(ta.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,ta.query.modelInfo.selection,n),this.workerRequest?.result.then(e=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},iT.dz)}catch(e){this.logService.error("Unexpected error during occurrence request. Log: ",e)}finally{s.dispose()}}else if(this.model.uri.scheme===ne.ny.vscodeNotebookCell){let e=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!ta.query||!ta.query.modelInfo)return;let i=await this.textModelService.createModelReference(ta.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(i.object.textEditorModel,ta.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(i=>{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=i||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},iT.dz)}catch(e){this.logService.error("Unexpected error during occurrence request. Log: ",e)}finally{i.dispose()}}}computeWithModel(e,t,i){var n,s;return i.length?(n=this.multiDocumentProviders,new wK(e,t,this.editor.getOption(148),n,i)):(s=this.providers,new w$(e,t,this.editor.getOption(148),s))}_beginRenderDecorations(e){let t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){for(let t of(this.renderDecorationsTimer=void 0,this.codeEditorService.listCodeEditors())){let i=wq.get(t);if(!i)continue;let n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){let o=ta.storedDecorationIDs.get(s),r=this.workerRequestValue.get(s);if(r){for(let t of r)if(t.range){var e;n.push({range:t.range,options:(e=t.kind)===iq.Kb.Write?bL:e===iq.Kb.Text?bD:bE})}}let a=[];t.changeDecorations(e=>{a=e.deltaDecorations(o??[],n)}),ta.storedDecorationIDs=ta.storedDecorationIDs.set(s,a),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}};wG=ta=wH([wV(4,as.b),wV(5,ty.T),wV(6,tD.pG),wV(7,im.rr)],wG);let wq=class extends t0.jG{static{tl=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(tl.ID)}constructor(e,t,i,n,s,o,r){super(),this._wordHighlighter=null;const a=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==ne.ny.accessibleView&&(this._wordHighlighter=new wG(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,o,r))};this._register(e.onDidChangeModel(e=>{this._wordHighlighter&&(e.newModelUrl||e.oldModelUrl?.scheme===ne.ny.vscodeNotebookCell||this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),a()})),a()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};wq=tl=wH([wV(1,tI.fN),wV(2,iQ.u),wV(3,ty.T),wV(4,as.b),wV(5,tD.pG),wV(6,im.rr)],wq);class wQ extends tw.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){let i=wq.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class wY extends wQ{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:tx.aS(1557,"Go to Next Symbol Highlight"),precondition:wz,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:65,weight:100}})}}class wZ extends wQ{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:tx.aS(1558,"Go to Previous Symbol Highlight"),precondition:wz,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:1089,weight:100}})}}class wX extends tw.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:tx.aS(1559,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:tk.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){let n=wq.get(t);n&&n.restoreViewState(!0)}}(0,tw.HW)(wq.ID,wq,0),(0,tw.Fl)(wY),(0,tw.Fl)(wZ),(0,tw.Fl)(wX),(0,ox.x)(wW);var wJ=i(81552),w0=i(92566),w1=i(49117);class w2 extends tw.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;let n=(0,w1.i)(t.getOption(148),t.getOption(147)),s=t.getModel(),o=t.getSelections(),r=o.length>1,a=o.map(e=>{let t=new t1.y(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType,r);return this._moveTo(e,i,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(e=>wJ.MF.fromModelSelection(e))),1===a.length){let e=new t1.y(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new tK.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new tK.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class w5 extends w2{_move(e,t,i,n,s){return w0.z.moveWordLeft(e,t,i,n,s)}}class w4 extends w2{_move(e,t,i,n,s){return w0.z.moveWordRight(e,t,i,n)}}class w3 extends w5{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class w7 extends w5{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class w9 extends w5{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:tI.M$.and(tk.R.textInputFocus,tI.M$.and(rf.f,ll.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class w8 extends w5{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class w6 extends w5{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class ye extends w5{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:tI.M$.and(tk.R.textInputFocus,tI.M$.and(rf.f,ll.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class yt extends w5{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,w1.i)(sW.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class yi extends w5{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,w1.i)(sW.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class yn extends w4{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class ys extends w4{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:tI.M$.and(tk.R.textInputFocus,tI.M$.and(rf.f,ll.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class yo extends w4{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class yr extends w4{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class ya extends w4{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:tI.M$.and(tk.R.textInputFocus,tI.M$.and(rf.f,ll.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class yl extends w4{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class yh extends w4{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,w1.i)(sW.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class yd extends w4{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,w1.i)(sW.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class yc extends tw.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){let n=e?.get(af.JZ);if(!t.hasModel()||!n)return;let s=(0,w1.i)(t.getOption(148),t.getOption(147)),o=t.getModel(),r=t.getSelections(),a=t.getOption(10),l=t.getOption(15),h=n.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),c=r.map(e=>{let i=this._delete({wordSeparators:s,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:h,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new il.iu(i,"")});t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class yu extends yc{_delete(e,t){let i=w0.z.deleteWordLeft(e,t);return i||new t2.Q(1,1,1,1)}}class yg extends yc{_delete(e,t){let i=w0.z.deleteWordRight(e,t);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new t2.Q(n,s,n,s)}}class yp extends yu{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:tk.R.writable})}}class ym extends yu{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:tk.R.writable})}}class yf extends yu{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class y_ extends yg{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:tk.R.writable})}}class yv extends yg{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:tk.R.writable})}}class yb extends yg{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class yC extends tw.ks{constructor(){super({id:"deleteInsideWord",precondition:tk.R.writable,label:tx.aS(1560,"Delete Word")})}run(e,t,i){if(!t.hasModel())return;let n=(0,w1.i)(t.getOption(148),t.getOption(147)),s=t.getModel(),o=t.getSelections().map(e=>{let t=w0.z.deleteInsideWord(n,s,e);return new il.iu(t,"")});t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}(0,tw.E_)(new w3),(0,tw.E_)(new w7),(0,tw.E_)(new w9),(0,tw.E_)(new w8),(0,tw.E_)(new w6),(0,tw.E_)(new ye),(0,tw.E_)(new yn),(0,tw.E_)(new ys),(0,tw.E_)(new yo),(0,tw.E_)(new yr),(0,tw.E_)(new ya),(0,tw.E_)(new yl),(0,tw.E_)(new yt),(0,tw.E_)(new yi),(0,tw.E_)(new yh),(0,tw.E_)(new yd),(0,tw.E_)(new yp),(0,tw.E_)(new ym),(0,tw.E_)(new yf),(0,tw.E_)(new y_),(0,tw.E_)(new yv),(0,tw.E_)(new yb),(0,tw.Fl)(yC);class yw extends yc{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=w0.c.deleteWordPartLeft(e);return i||new t2.Q(1,1,1,1)}}class yy extends yc{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:tk.R.writable,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=w0.c.deleteWordPartRight(e);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new t2.Q(n,s,n,s)}}class yS extends w2{_move(e,t,i,n,s){return w0.c.moveWordPartLeft(e,t,i,s)}}class yk extends yS{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}tz.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class yx extends yS{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}tz.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class yL extends w2{_move(e,t,i,n,s){return w0.c.moveWordPartRight(e,t,i)}}class yD extends yL{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class yI extends yL{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:tk.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,tw.E_)(new yw),(0,tw.E_)(new yy),(0,tw.E_)(new yk),(0,tw.E_)(new yx),(0,tw.E_)(new yD),(0,tw.E_)(new yI);class yN extends t0.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=i9.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(t=new tj.Bc(this.editor.isSimpleWidget?tx.kg(1363,"Cannot edit in read-only input"):tx.kg(1364,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,tw.HW)(yN.ID,yN,2);var yE=i(98178),yM=function(e,t){return function(i,n){t(i,n,e)}};let yT=class extends t0.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,o2.FY)(this,void 0);const n=(0,o2.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=(0,o2.yQ)("_textModel.onDidChangeContent",i5.Jh.debounce(e=>this._textModel.onDidChangeContent(e),()=>void 0,100));this._register((0,o2.yC)(async(e,t)=>{n.read(e),s.read(e);let i=t.add(new bb.MZ),o=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(o,void 0)}))}getBreadcrumbItems(e,t){let i=this._currentModel.read(t);if(!i)return[];let n=i.asListOfDocumentSymbols().filter(t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber));return n.sort((0,iy.Hw)((0,iy.VE)(e=>e.range.endLineNumber-e.range.startLineNumber,iy.U9))),n.map(e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber}))}};yT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yM(1,iQ.u),yM(2,ug)],yT),yE.N.setBreadcrumbsSourceFactory((e,t)=>t.createInstance(yT,e)),i(7675);var yR=function(e,t){return function(i,n){t(i,n,e)}};let yO=class extends t0.jG{static{this.ID="editor.contrib.floatingToolbar"}constructor(e,t,i,n){super();const s=this._register((0,aI.U)(e)),o=this._register(n.createMenu(tL.D8.EditorContent,e.contextKeyService)),r=(0,o2.y0)(this,o.onDidChange,()=>0===o.getActions().length);this._register((0,o2.fm)(e=>{if(r.read(e))return;let n=(0,tC.h)("div.floating-menu-overlay-widget");n.root.style.height="28px";let o=t.createInstance(o4.m,n.root,tL.D8.EditorContent,{actionViewItemProvider:(e,n)=>{if(!(e instanceof tL.Xe))return;let s=i.lookupKeybinding(e.id);if(s)return t.createInstance(class extends o5.oq{updateLabel(){this.options.label&&this.label&&(this.label.textContent=`${this._commandAction.label} (${s.getLabel()})`)}},e,{...n,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});e.store.add(o),e.store.add((0,o2.fm)(e=>{let t=s.model.read(e);o.context=t?.uri})),e.store.add(s.createOverlayWidget({allowEditorOverflow:!1,domNode:n.root,minContentWidthInPx:(0,o2.lk)(0),position:(0,o2.lk)({preference:1})}))}))}};yO=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yR(1,i_._Y),yR(2,nF.b),yR(3,tL.ez)],yO),(0,tw.HW)(yO.ID,yO,1);var yP=i(40514);i(73243);class yA extends t0.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,iu.un&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(104);!this.widget&&e?this.widget=new yF(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class yF extends t0.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(tC.ko(this._domNode,"touchstart",e=>{this.editor.focus()})),this._register(tC.ko(this._domNode,"focus",e=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return yF.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,tw.HW)(yA.ID,yA,3),i(18833);var yB=i(55537),yW=i(17075),yH=i(62747),yV=function(e,t){return function(i,n){t(i,n,e)}};let yz=class extends t0.jG{static{th=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(th.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(e=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(e=>this.stop())),this._register(iq.dG.onDidChange(e=>this.stop())),this._register(this._editor.onKeyUp(e=>9===e.keyCode&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new yj(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};yz=th=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yV(1,yH.L),yV(2,rN.L)],yz);class yU extends tw.ks{constructor(){super({id:"editor.action.inspectTokens",label:yP.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=yz.get(t);i?.launch()}}class yj extends t0.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){let i=iq.dG.get(t);if(i)return i;let n=e.encodeLanguageId(t);return{getInitialState:()=>yW.r3,tokenize:(e,i,n)=>(0,yW.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,yW.Lh)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(e=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return yj._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let n=t.tokens1.length-1;n>=0;n--){let s=t.tokens1[n];if(e.column-1>=s.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}let s=this._model.getLineContent(e.lineNumber),o="";if(i<t.tokens1.length){let e=t.tokens1[i].offset,n=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;o=s.substring(e,n)}(0,tC.Ln)(this._domNode,(0,tC.$)("h2.tm-token",void 0,function(e){let t="";for(let i=0,n=e.length;i<n;i++){let n=e.charCodeAt(i);switch(n){case 9:t+="→";break;case 32:t+="\xb7";break;default:t+=String.fromCharCode(n)}}return t}(o),(0,tC.$)("span.tm-token-length",void 0,`${o.length} ${1===o.length?"char":"chars"}`))),(0,tC.BC)(this._domNode,(0,tC.$)("hr.tokens-inspect-separator",{style:"clear:both"}));let r=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;(0,tC.BC)(this._domNode,(0,tC.$)("table.tm-metadata-table",void 0,(0,tC.$)("tbody",void 0,(0,tC.$)("tr",void 0,(0,tC.$)("td.tm-metadata-key",void 0,"language"),(0,tC.$)("td.tm-metadata-value",void 0,`${r?r.languageId:"-?-"}`)),(0,tC.$)("tr",void 0,(0,tC.$)("td.tm-metadata-key",void 0,"token type"),(0,tC.$)("td.tm-metadata-value",void 0,`${r?this._tokenTypeToString(r.tokenType):"-?-"}`)),(0,tC.$)("tr",void 0,(0,tC.$)("td.tm-metadata-key",void 0,"font style"),(0,tC.$)("td.tm-metadata-value",void 0,`${r?this._fontStyleToString(r.fontStyle):"-?-"}`)),(0,tC.$)("tr",void 0,(0,tC.$)("td.tm-metadata-key",void 0,"foreground"),(0,tC.$)("td.tm-metadata-value",void 0,`${r?oE.Q1.Format.CSS.formatHex(r.foreground):"-?-"}`)),(0,tC.$)("tr",void 0,(0,tC.$)("td.tm-metadata-key",void 0,"background"),(0,tC.$)("td.tm-metadata-value",void 0,`${r?oE.Q1.Format.CSS.formatHex(r.background):"-?-"}`))))),(0,tC.BC)(this._domNode,(0,tC.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,tC.BC)(this._domNode,(0,tC.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=iq.dG.getColorMap(),i=yB.x.getLanguageId(e),n=yB.x.getTokenType(e),s=yB.x.getFontStyle(e),o=yB.x.getForeground(e),r=yB.x.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:s,foreground:t[o],background:t[r]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),0===t.length&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}(0,tw.HW)(yz.ID,yz,4),(0,tw.Fl)(yU);var y$=i(39454),yK=function(e,t){return function(i,n){t(i,n,e)}};let yG=class{static{td=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=iH.O.as(y$.Fd.Quickaccess)}provide(e){let t=new t0.Cm;return t.add(e.onDidAccept(()=>{let[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(e=>{let t=this.registry.getQuickAccessProvider(e.substr(td.PREFIX.length));t&&t.prefix&&t.prefix!==td.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(e=>e.prefix!==td.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((e,t)=>e.prefix.localeCompare(t.prefix)).flatMap(e=>this.createPicks(e))}createPicks(e){return e.helpEntries.map(t=>{let i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,tx.kg)(1730,"{0}, {1}",n,t.description),description:t.description}})}};yG=td=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yK(0,iF.GK),yK(1,nF.b)],yG),iH.O.as(y$.Fd.Quickaccess).registerQuickAccessProvider({ctor:yG,prefix:"",helpEntries:[{description:yP.oq.helpQuickAccessActionLabel}]});var yq=i(67418);class yQ{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){let n=new t0.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s=n.add(new t0.HE);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t,i){let n=new t0.Cm,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){let o={editor:s},r=(0,ap.jA)(s);if(r){let e=s.saveViewState()??void 0;n.add(r.onDidChangeCursorPosition(()=>{e=s.saveViewState()??void 0})),o.restoreViewState=()=>{e&&s===this.activeTextEditorControl&&s.restoreViewState(e)},n.add((0,yq.P)(t.onCancellationRequested)(()=>o.restoreViewState?.()))}n.add((0,t0.s)(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(o,e,t,i))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let i=e.getModel();i&&"getLineContent"in i&&(0,tU.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,ap.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(e=>{let i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,t7.Yf)(hN.vp),position:t5.A5.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class yY extends yQ{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=(0,tx.kg)(1325,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,t0.jG.None}provideWithTextEditor(e,t,i){let n=e.editor,s=new t0.Cm;s.add(t.onDidAccept(i=>{let[s]=t.selectedItems;if(s){if(!this.isValidLineNumber(n,s.lineNumber))return;this.gotoLocation(e,{range:this.toRange(s.lineNumber,s.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}}));let o=()=>{let e=this.parsePosition(n,t.value.trim().substr(yY.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);let s=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(s,0),this.addDecorations(n,s)};o(),s.add(t.onDidChangeValue(()=>o()));let r=(0,ap.jA)(n);return r&&2===r.getOptions().get(76).renderType&&(r.updateOptions({lineNumbers:"on"}),s.add((0,t0.s)(()=>r.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let i=t.split(/,|:|#/).map(e=>parseInt(e,10)).filter(e=>!isNaN(e)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,tx.kg)(1326,"Go to line {0} and character {1}.",t,i):(0,tx.kg)(1327,"Go to line {0}.",t);let n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?(0,tx.kg)(1328,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):(0,tx.kg)(1329,"Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!!t&&"number"==typeof t&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;let n=this.getModel(e);if(!n)return!1;let s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}let yZ=class extends yY{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=i5.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};yZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(ei=ty.T,function(e,t){ei(e,t,0)})],yZ);class yX extends tw.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:yX.ID,label:yP.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(iF.GK).quickAccess.show(yZ.PREFIX)}}(0,tw.Fl)(yX),iH.O.as(y$.Fd.Quickaccess).registerQuickAccessProvider({ctor:yZ,prefix:yZ.PREFIX,helpEntries:[{description:yP.Hw.gotoLineActionLabel,commandId:yX.ID}]});let yJ=[void 0,[]];function y0(e,t,i=0,n=0){return t.values&&t.values.length>1?function(e,t,i,n){let s=0,o=[];for(let r of t){let[t,a]=y1(e,r,i,n);if("number"!=typeof t)return yJ;s+=t,o.push(...a)}return[s,function(e){let t,i=e.sort((e,t)=>e.start-t.start),n=[];for(let e of i){var s,o;!t||(s=t,o=e,s.end<o.start||o.end<s.start)?(t=e,n.push(e)):(t.start=Math.min(t.start,e.start),t.end=Math.max(t.end,e.end))}return n}(o)]}(e,t.values,i,n):y1(e,t,i,n)}function y1(e,t,i,n){let s=(0,aX.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,aX.WJ)(s)]:yJ}function y2(e){return e.startsWith('"')&&e.endsWith('"')}function y5(e){let t;"string"!=typeof e&&(e="");let i=e.toLowerCase(),{pathNormalized:n,normalized:s,normalizedLowercase:o}=y4(e),r=n.indexOf(uz.Vn)>=0,a=y2(e),l=e.split(" ");if(l.length>1)for(let e of l){let i=y2(e),{pathNormalized:n,normalized:s,normalizedLowercase:o}=y4(e);s&&(t||(t=[]),t.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:n,normalized:s,normalizedLowercase:o,expectContiguousMatch:i}))}return{original:e,originalLowercase:i,pathNormalized:n,normalized:s,normalizedLowercase:o,values:t,containsPathSeparator:r,expectContiguousMatch:a}}function y4(e){let t,i=(t=iu.uF?e.replace(/\//g,uz.Vn):e.replace(/\\/g,uz.Vn)).replace(/[\*\u2026\s"]/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function y3(e){return Array.isArray(e)?y5(e.map(e=>e.original).join(" ")):y5(e.original)}Object.freeze({score:0});var y7=function(e,t){return function(i,n){t(i,n,e)}};let y9=class extends yQ{static{tc=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,tx.kg)(1330,"To go to a symbol, first open a text editor with symbol information.")),t0.jG.None}provideWithTextEditor(e,t,i,n){let s=e.editor,o=this.getModel(s);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i,n):this.doProvideWithoutEditorSymbols(e,o,t,i):t0.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){let s=new t0.Cm;return this.provideLabelPick(i,(0,tx.kg)(1331,"The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,s)&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let i=new tJ.Zv,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add((0,t0.s)(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){let o=e.editor,r=new t0.Cm;r.add(i.onDidAccept(t=>{let[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),s?.handleAccept?.(n,t.inBackground),t.inBackground||i.hide())})),r.add(i.onDidTriggerItemButton(({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));let a=this.getDocumentSymbols(t,n),l=r.add(new t0.HE),h=async e=>{l?.value?.cancel(),i.busy=!1,l.value=new iS.Qi,i.busy=!0;try{let s=y5(i.value.substr(tc.PREFIX.length).trim()),o=await this.doGetSymbolPicks(a,s,void 0,l.value.token,t);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===s.original.length){let t=(0,hE.Uk)(o,t=>!!("separator"!==t.type&&t.range&&t2.Q.containsPosition(t.range.decoration,e)));t&&(i.activeItems=[t])}}else s.original.length>0?this.provideLabelPick(i,(0,tx.kg)(1332,"No matching editor symbols")):this.provideLabelPick(i,(0,tx.kg)(1333,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return r.add(i.onDidChangeValue(()=>h(void 0))),h(o.getSelection()?.getPosition()),r.add(i.onDidChangeActive(()=>{let[e]=i.activeItems;e&&e.range&&(o.revealRangeInCenter(e.range.selection,0),this.addDecorations(o,e.range.decoration))})),r}async doGetSymbolPicks(e,t,i,n,s){let o,r,a,l=await e;if(n.isCancellationRequested)return[];let h=0===t.original.indexOf(tc.SCOPE_PREFIX),d=+!!h;t.values&&t.values.length>1?(o=y3(t.values[0]),r=y3(t.values.slice(1))):o=t;let c=this.options?.openSideBySideDirection?.();c&&(a=[{iconClass:"right"===c?iX.L.asClassName(tb.W.splitHorizontal):iX.L.asClassName(tb.W.splitVertical),tooltip:"right"===c?(0,tx.kg)(1334,"Open to the Side"):(0,tx.kg)(1335,"Open to the Bottom")}]);let u=[];for(let e=0;e<l.length;e++){let n,h,c,g,p=l[e],m=(0,iZ.Bq)(p.name),f=`$(${iq.gP.toIcon(p.kind).id}) ${m}`,_=f.length-m.length,v=p.containerName;if(i?.extraContainerLabel&&(v=v?`${i.extraContainerLabel} • ${v}`:i.extraContainerLabel),t.original.length>d){let e=!1;if(o!==t&&([n,h]=y0(f,{...t,values:void 0},d,_),"number"==typeof n&&(e=!0)),"number"!=typeof n&&([n,h]=y0(f,o,d,_),"number"!=typeof n))continue;if(!e&&r){if(v&&r.original.length>0&&([c,g]=y0(v,r)),"number"!=typeof c)continue;"number"==typeof n&&(n+=c)}}let b=p.tags&&p.tags.indexOf(1)>=0;u.push({index:e,kind:p.kind,score:n,label:f,ariaLabel:(0,iq.PK)(p.name,p.kind),description:v,highlights:b?void 0:{label:h,description:g},range:{selection:t2.Q.collapseToStart(p.selectionRange),decoration:p.range},uri:s.uri,symbolName:m,strikethrough:b,buttons:a})}let g=u.sort((e,t)=>h?this.compareByKindAndScore(e,t):this.compareByScore(e,t)),p=[];if(h){let e,t,i=0;function m(){t&&"number"==typeof e&&i>0&&(t.label=(0,iZ.GP)(y6[e]||y8,i))}for(let n of g)e!==n.kind?(m(),e=n.kind,i=1,t={type:"separator"},p.push(t)):i++,p.push(n);m()}else g.length>0&&(p=[{label:(0,tx.kg)(1336,"symbols ({0})",u.length),type:"separator"},...g]);return p}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return -1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return -1;else if(e.score<t.score)return 1}return e.index<t.index?-1:+(e.index>t.index)}compareByKindAndScore(e,t){let i=y6[e.kind]||y8,n=y6[t.kind]||y8,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){let i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};y9=tc=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([y7(0,iQ.u),y7(1,ug)],y9);let y8=(0,tx.kg)(1337,"properties ({0})"),y6={5:(0,tx.kg)(1338,"methods ({0})"),11:(0,tx.kg)(1339,"functions ({0})"),8:(0,tx.kg)(1340,"constructors ({0})"),12:(0,tx.kg)(1341,"variables ({0})"),4:(0,tx.kg)(1342,"classes ({0})"),22:(0,tx.kg)(1343,"structs ({0})"),23:(0,tx.kg)(1344,"events ({0})"),24:(0,tx.kg)(1345,"operators ({0})"),10:(0,tx.kg)(1346,"interfaces ({0})"),2:(0,tx.kg)(1347,"namespaces ({0})"),3:(0,tx.kg)(1348,"packages ({0})"),25:(0,tx.kg)(1349,"type parameters ({0})"),1:(0,tx.kg)(1350,"modules ({0})"),6:(0,tx.kg)(1351,"properties ({0})"),9:(0,tx.kg)(1352,"enumerations ({0})"),21:(0,tx.kg)(1353,"enumeration members ({0})"),14:(0,tx.kg)(1354,"strings ({0})"),0:(0,tx.kg)(1355,"files ({0})"),17:(0,tx.kg)(1356,"arrays ({0})"),15:(0,tx.kg)(1357,"numbers ({0})"),16:(0,tx.kg)(1358,"booleans ({0})"),18:(0,tx.kg)(1359,"objects ({0})"),19:(0,tx.kg)(1360,"keys ({0})"),7:(0,tx.kg)(1361,"fields ({0})"),13:(0,tx.kg)(1362,"constants ({0})")};var Se=function(e,t){return function(i,n){t(i,n,e)}};let St=class extends y9{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=i5.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};St=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Se(0,ty.T),Se(1,iQ.u),Se(2,ug)],St);class Si extends tw.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:Si.ID,label:yP.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:tk.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:tk.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(iF.GK).quickAccess.show(y9.PREFIX,{itemActivation:iF.C1.NONE})}}(0,tw.Fl)(Si),iH.O.as(y$.Fd.Quickaccess).registerQuickAccessProvider({ctor:St,prefix:y9.PREFIX,helpEntries:[{description:yP.n9.quickOutlineActionLabel,prefix:y9.PREFIX,commandId:Si.ID},{description:yP.n9.quickOutlineByCategoryActionLabel,prefix:y9.PREFIX_BY_CATEGORY}]});var Sn=i(65677),Ss=i(9160);class So{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let i=this.computeEmbedding(e),n=new Map,s=[];for(let[e,o]of this.documents){if(t.isCancellationRequested)return[];for(let t of o.chunks){let o=this.computeSimilarityScore(t,i,n);o>0&&s.push({key:e,score:o})}}return s}static termFrequencies(e){var t=So.splitTerms(e);let i=new Map;for(let e of t)i.set(e,(i.get(e)??0)+1);return i}static*splitTerms(e){let t=e=>e.toLowerCase();for(let[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);let e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(let i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(let{key:t}of e)this.deleteDocument(t);for(let t of e){let e=[];for(let i of t.textChunks){let t=So.termFrequencies(i);for(let e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){let t=this.documents.get(e);if(t)for(let i of(this.documents.delete(e),this.chunkCount-=t.chunks.length,t.chunks))for(let e of i.tf.keys()){let t=this.chunkOccurrences.get(e);if("number"==typeof t){let i=t-1;i<=0?this.chunkOccurrences.delete(e):this.chunkOccurrences.set(e,i)}}}computeSimilarityScore(e,t,i){let n=0;for(let[s,o]of Object.entries(t)){let t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r)),n+=t*r*o}return n}computeEmbedding(e){let t=So.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){let t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){let t=Object.create(null);for(let[i,n]of e){let e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}function Sr(e){return Array.isArray(e.items)}function Sa(e){return!!e.picks&&e.additionalPicks instanceof Promise}(en=tu||(tu={}))[en.NO_ACTION=0]="NO_ACTION",en[en.CLOSE_PICKER=1]="CLOSE_PICKER",en[en.REFRESH_PICKER=2]="REFRESH_PICKER",en[en.REMOVE_ITEM=3]="REMOVE_ITEM";class Sl extends t0.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){let n,s=new t0.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=s.add(new t0.HE),r=async()=>{n?.dispose(!0),e.busy=!1;let s=o.value=new t0.Cm,r=(n=s.add(new iS.Qi(t))).token,a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());let l=this._getPicks(a,s,r,i),h=(t,i)=>{let n,s;if(Sr(t)?(n=t.items,s=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,iP.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,s&&(e.activeItems=[s]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{("number"!=typeof t.mergeDelay||(await (0,tJ.wR)(t.mergeDelay),!r.isCancellationRequested))&&(n||(i=h(t.picks,!0)))})(),(async()=>{e.busy=!0;try{let n,s,o,a,l=await t.additionalPicks;if(r.isCancellationRequested)return;if(Sr(t.picks)?(n=t.picks.items,o=t.picks.active):n=t.picks,Sr(l)?(s=l.items,a=l.active):s=l,s.length>0||!i){let t;if(!o&&!a){let i=e.activeItems[0];i&&-1!==n.indexOf(i)&&(t=i)}h({items:[...n,...s],active:o||a||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(Sa(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{let e=await l;if(r.isCancellationRequested)return;Sa(e)?await d(e):h(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else h(l)};s.add(e.onDidChangeValue(()=>r())),r(),s.add(e.onDidAccept(t=>{if(i?.handleAccept){t.inBackground||e.hide(),i.handleAccept?.(e.activeItems[0],t.inBackground);return}let[n]=e.selectedItems;"function"==typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))}));let a=async(i,n)=>{if("function"!=typeof n.trigger)return;let s=n.buttons?.indexOf(i)??-1;if(s>=0){let i=n.trigger(s,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case tu.NO_ACTION:break;case tu.CLOSE_PICKER:e.hide();break;case tu.REFRESH_PICKER:r();break;case tu.REMOVE_ITEM:{let t=e.items.indexOf(n);if(-1!==t){let i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter(e=>e!==n[0]),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}}}}};return s.add(e.onDidTriggerItemButton(({button:e,item:t})=>a(e,t))),s.add(e.onDidTriggerSeparatorButton(({button:e,separator:t})=>a(e,t))),s}}var Sh=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Sd=function(e,t){return function(i,n){t(i,n,e)}};let Sc=class extends Sl{static{tg=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,aX.or)(aX.WP,aX.J1,aX.Tt)}constructor(e,t,i,n,s,o){super(tg.PREFIX,e),this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(t.createInstance(Su)),this.options=e}async _getPicks(e,t,i,n){let s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];let o=(0,yq.P)(()=>{let t=new So;return t.updateDocuments(s.map(e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]}))),(function(e){let t=e.slice(0);t.sort((e,t)=>t.score-e.score);let i=t[0]?.score??0;if(i>0)for(let e of t)e.score/=i;return t})(t.calculateScores(e,i)).filter(e=>e.score>tg.TFIDF_THRESHOLD).slice(0,tg.TFIDF_MAX_RESULTS)}),r=[];for(let t of s){let n=tg.WORD_FILTER(e,t.label)??void 0,s=t.commandAlias?tg.WORD_FILTER(e,t.commandAlias)??void 0:void 0;if(n||s)t.highlights={label:n,detail:this.options.showAlias?s:void 0},r.push(t);else if(e===t.commandId)r.push(t);else if(e.length>=3){let e=o();if(i.isCancellationRequested)return[];let n=e.find(e=>e.key===t.commandId);n&&(t.tfIdfScore=n.score,r.push(t))}}let a=new Map;for(let e of r){let t=a.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):a.set(e.label,e)}r.sort((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return -1;let i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return -1;if(n)return 1;if(this.options.suggestedCommandIds){let i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return -1;if(n)return 1}return e.label.localeCompare(t.label)});let l=[],h=!1,d=!0,c=!!this.options.suggestedCommandIds;for(let e=0;e<r.length;e++){let t=r[e];0===e&&this.commandsHistory.peek(t.commandId)&&(l.push({type:"separator",label:(0,tx.kg)(1723,"recently used")}),h=!0),d&&void 0!==t.tfIdfScore&&(l.push({type:"separator",label:(0,tx.kg)(1724,"similar commands")}),d=!1),c&&void 0===t.tfIdfScore&&!this.commandsHistory.peek(t.commandId)&&this.options.suggestedCommandIds?.has(t.commandId)&&(l.push({type:"separator",label:(0,tx.kg)(1725,"commonly used")}),h=!0,c=!1),!h||void 0!==t.tfIdfScore||this.commandsHistory.peek(t.commandId)||this.options.suggestedCommandIds?.has(t.commandId)||(l.push({type:"separator",label:(0,tx.kg)(1726,"other commands")}),h=!1),l.push(this.toCommandPick(t,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:l,additionalPicks:(async()=>{let t=await this.getAdditionalCommandPicks(s,r,e,i);if(i.isCancellationRequested)return[];let o=t.map(e=>this.toCommandPick(e,n));return d&&o[0]?.type!=="separator"&&o.unshift({type:"separator",label:(0,tx.kg)(1727,"similar commands")}),o})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;let i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,tx.kg)(1728,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,iT.MB)(t)||this.dialogService.error((0,tx.kg)(1729,"Command '{0}' resulted in an error",e.label),nT(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};Sc=tg=Sh([Sd(1,i_._Y),Sd(2,nF.b),Sd(3,tz.d),Sd(4,ib.k),Sd(5,wT.X)],Sc);let Su=class extends t0.jG{static{tp=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===oc.LP.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){(!e||e.affectsConfiguration("workbench.commandPalette.history"))&&(this.configuredCommandsHistoryLength=tp.getConfiguredCommandHistoryLength(this.configurationService),tp.cache&&tp.cache.limit!==this.configuredCommandsHistoryLength&&(tp.cache.limit=this.configuredCommandsHistoryLength,tp.hasChanges=!0))}load(){let e,t=this.storageService.get(tp.PREF_KEY_CACHE,0);if(t)try{e=JSON.parse(t)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}let i=tp.cache=new od.qK(this.configuredCommandsHistoryLength,1);e&&(e.usesLRU?e.entries:e.entries.sort((e,t)=>e.value-t.value)).forEach(e=>i.set(e.key,e.value));tp.counter=this.storageService.getNumber(tp.PREF_KEY_COUNTER,0,tp.counter)}push(e){tp.cache&&(tp.cache.set(e,tp.counter++),tp.hasChanges=!0)}peek(e){return tp.cache?.peek(e)}saveState(){if(!tp.cache||!tp.hasChanges)return;let e={usesLRU:!0,entries:[]};tp.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(tp.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(tp.PREF_KEY_COUNTER,tp.counter,0,0),tp.hasChanges=!1}static getConfiguredCommandHistoryLength(e){let t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"==typeof i?i:tp.DEFAULT_COMMANDS_HISTORY_LENGTH}};Su=tp=Sh([Sd(0,oc.CS),Sd(1,tD.pG),Sd(2,im.rr)],Su);class Sg extends Sc{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,Ss.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,Sn.pS)(i.label)||i.id})}return t}}var Sp=function(e,t){return function(i,n){t(i,n,e)}};let Sm=class extends Sg{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};Sm=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Sp(0,i_._Y),Sp(1,ty.T),Sp(2,nF.b),Sp(3,tz.d),Sp(4,ib.k),Sp(5,wT.X)],Sm);class Sf extends tw.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:Sf.ID,label:yP.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:tk.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(iF.GK).quickAccess.show(Sm.PREFIX)}}(0,tw.Fl)(Sf),iH.O.as(y$.Fd.Quickaccess).registerQuickAccessProvider({ctor:Sm,prefix:Sm.PREFIX,helpEntries:[{description:yP.gf.quickCommandHelp,commandId:Sf.ID}]});var S_=function(e,t){return function(i,n){t(i,n,e)}};let Sv=class extends lc{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};Sv=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([S_(1,tI.fN),S_(2,ty.T),S_(3,n5.Ot),S_(4,i_._Y),S_(5,oc.CS),S_(6,tD.pG)],Sv),(0,tw.HW)(lc.ID,Sv,4);var Sb=i(56303);class SC extends tw.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:yP.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let i=e.get(yH.L),n=i.getColorTheme();(0,sP.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,sP.HD)(n.type)?Sb.po:Sb.tj)),this._originalThemeName=null):(i.setTheme((0,sP.HD)(n.type)?Sb.aQ:Sb.nr),this._originalThemeName=n.themeName)}}(0,tw.Fl)(SC);var Sw=i(96963),Sy=Object.defineProperty,SS=Object.getOwnPropertyDescriptor,Sk=Object.getOwnPropertyNames,Sx=Object.prototype.hasOwnProperty,SL=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of Sk(t))Sx.call(e,s)||s===i||Sy(e,s,{get:()=>t[s],enumerable:!(n=SS(t,s))||n.enumerable});return e},SD={};SL(SD,Sw,"default"),r&&SL(r,Sw,"default");var SI={},SN={},SE=class e{static getOrCreate(t){return SN[t]||(SN[t]=new e(t)),SN[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,SI[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function SM(e){let t=e.id;SI[t]=e,SD.languages.register(e);let i=SE.getOrCreate(t);SD.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),SD.languages.onLanguageEncountered(t,async()=>{let e=await i.load();SD.languages.setLanguageConfiguration(t,e.conf)})}SM({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>i.e(3307).then(i.bind(i,3307))}),SM({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>i.e(36639).then(i.bind(i,36639))}),SM({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>i.e(9829).then(i.bind(i,9829))}),SM({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>i.e(81053).then(i.bind(i,81053))}),SM({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>i.e(32501).then(i.bind(i,32501))}),SM({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>i.e(29653).then(i.bind(i,29653))}),SM({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>i.e(46941).then(i.bind(i,46941))}),SM({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>i.e(78199).then(i.bind(i,78199))}),SM({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>i.e(74513).then(i.bind(i,74513))}),SM({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>i.e(74513).then(i.bind(i,74513))}),SM({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>i.e(76045).then(i.bind(i,76045))}),SM({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>i.e(61541).then(i.bind(i,61541))}),SM({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(57189).then(i.bind(i,57189))}),SM({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>i.e(42565).then(i.bind(i,42565))}),SM({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>i.e(13213).then(i.bind(i,13213))}),SM({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>i.e(77235).then(i.bind(i,77235))}),SM({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>i.e(88293).then(i.bind(i,88293))}),SM({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(58989).then(i.bind(i,58989))}),SM({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>i.e(55925).then(i.bind(i,55925))}),SM({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>i.e(71507).then(i.bind(i,71507))}),SM({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagAutoInterpolationDollar)}),SM({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagAngleInterpolationDollar)}),SM({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagBracketInterpolationDollar)}),SM({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagAngleInterpolationBracket)}),SM({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagBracketInterpolationBracket)}),SM({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagAutoInterpolationDollar)}),SM({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>i.e(37813).then(i.bind(i,37813)).then(e=>e.TagAutoInterpolationBracket)}),SM({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>i.e(35019).then(i.bind(i,35019))}),SM({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>i.e(85181).then(i.bind(i,85181))}),SM({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>i.e(33851).then(i.bind(i,33851))}),SM({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>i.e(39461).then(i.bind(i,39461))}),SM({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>i.e(1297).then(i.bind(i,1297))}),SM({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>i.e(67877).then(i.bind(i,67877))}),SM({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>i.e(55143).then(i.bind(i,77524))}),SM({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(78253).then(i.bind(i,78253))}),SM({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>i.e(71777).then(i.bind(i,71777))}),SM({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>i.e(43405).then(i.bind(i,43405))}),SM({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>i.e(93529).then(i.bind(i,93529))}),SM({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>i.e(26185).then(i.bind(i,26185))}),SM({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>i.e(45585).then(i.bind(i,45585))}),SM({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>i.e(38495).then(i.bind(i,38495))}),SM({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>i.e(58039).then(i.bind(i,58039))}),SM({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(77349).then(i.bind(i,77349))}),SM({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>i.e(66357).then(i.bind(i,66357))}),SM({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>i.e(32149).then(i.bind(i,32149))}),SM({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>i.e(23545).then(i.bind(i,23545))}),SM({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>i.e(62457).then(i.bind(i,62457))}),SM({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>i.e(43637).then(i.bind(i,43637))}),SM({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>i.e(22355).then(i.bind(i,22355))}),SM({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>i.e(28189).then(i.bind(i,28189))}),SM({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>i.e(62389).then(i.bind(i,62389))}),SM({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>i.e(43685).then(i.bind(i,43685))}),SM({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>i.e(29733).then(i.bind(i,29733))}),SM({id:"pla",extensions:[".pla"],loader:()=>i.e(32133).then(i.bind(i,32133))}),SM({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>i.e(16701).then(i.bind(i,16701))}),SM({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>i.e(96901).then(i.bind(i,96901))}),SM({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>i.e(5105).then(i.bind(i,5105))}),SM({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>i.e(8341).then(i.bind(i,8341))}),SM({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>i.e(86073).then(i.bind(i,86073))}),SM({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>i.e(82475).then(i.bind(i,82475))}),SM({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>i.e(92825).then(i.bind(i,92825))}),SM({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>i.e(23449).then(i.bind(i,23449))}),SM({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>i.e(55953).then(i.bind(i,55953))}),SM({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>i.e(98341).then(i.bind(i,98341))}),SM({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>i.e(2597).then(i.bind(i,2597))}),SM({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>i.e(20677).then(i.bind(i,20677))}),SM({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>i.e(47111).then(i.bind(i,47111))}),SM({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>i.e(82351).then(i.bind(i,82351))}),SM({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>i.e(71001).then(i.bind(i,71001))}),SM({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>i.e(80213).then(i.bind(i,80213))}),SM({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>i.e(40725).then(i.bind(i,40725))}),SM({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>i.e(56516).then(i.bind(i,56516))}),SM({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>i.e(44489).then(i.bind(i,44489))}),SM({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>i.e(90025).then(i.bind(i,90025))}),SM({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>i.e(20723).then(i.bind(i,20723))}),SM({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>i.e(74113).then(i.bind(i,74113))}),SM({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(62289).then(i.bind(i,62289))}),SM({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>i.e(82517).then(i.bind(i,82517))}),SM({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>i.e(95309).then(i.bind(i,95309))}),SM({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>i.e(52661).then(i.bind(i,52661))}),SM({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>i.e(52661).then(i.bind(i,52661))}),SM({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>i.e(79813).then(i.bind(i,79813))}),SM({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>i.e(82409).then(i.bind(i,82409))}),SM({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>i.e(90821).then(i.bind(i,90821))}),SM({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>i.e(93909).then(i.bind(i,93909))}),SM({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>i.e(51291).then(i.bind(i,51291))}),SM({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>i.e(72045).then(i.bind(i,72045))}),SM({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>i.e(58869).then(i.bind(i,58869))}),SM({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(57509).then(i.bind(i,57509))});var ST=Object.defineProperty,SR=Object.getOwnPropertyDescriptor,SO=Object.getOwnPropertyNames,SP=Object.prototype.hasOwnProperty,SA=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of SO(t))SP.call(e,s)||s===i||ST(e,s,{get:()=>t[s],enumerable:!(n=SR(t,s))||n.enumerable});return e},SF={};SA(SF,Sw,"default"),a&&SA(a,Sw,"default");var SB=class{constructor(e,t,i){this._onDidChange=new SF.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},SW={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},SH={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},SV=new SB("css",SW,SH),Sz=new SB("scss",SW,SH),SU=new SB("less",SW,SH);function Sj(){return i.e(53342).then(i.bind(i,53342))}SF.languages.css={cssDefaults:SV,lessDefaults:SU,scssDefaults:Sz},SF.languages.onLanguage("less",()=>{Sj().then(e=>e.setupMode(SU))}),SF.languages.onLanguage("scss",()=>{Sj().then(e=>e.setupMode(Sz))}),SF.languages.onLanguage("css",()=>{Sj().then(e=>e.setupMode(SV))});var S$=Object.defineProperty,SK=Object.getOwnPropertyDescriptor,SG=Object.getOwnPropertyNames,Sq=Object.prototype.hasOwnProperty,SQ=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of SG(t))Sq.call(e,s)||s===i||S$(e,s,{get:()=>t[s],enumerable:!(n=SK(t,s))||n.enumerable});return e},SY={};SQ(SY,Sw,"default"),l&&SQ(l,Sw,"default");var SZ=class{constructor(e,t,i){this._onDidChange=new SY.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},SX={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function SJ(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===S0,documentFormattingEdits:e===S0,documentRangeFormattingEdits:e===S0}}var S0="html",S1="handlebars",S2="razor",S5=S6(S0,SX,SJ(S0)),S4=S5.defaults,S3=S6(S1,SX,SJ(S1)),S7=S3.defaults,S9=S6(S2,SX,SJ(S2)),S8=S9.defaults;function S6(e,t=SX,n=SJ(e)){let s,o=new SZ(e,t,n),r=SY.languages.onLanguage(e,async()=>{s=(await i.e(73578).then(i.bind(i,73578))).setupMode(o)});return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}SY.languages.html={htmlDefaults:S4,razorDefaults:S8,handlebarDefaults:S7,htmlLanguageService:S5,handlebarLanguageService:S3,razorLanguageService:S9,registerHTMLLanguageService:S6};var ke=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,ki=Object.getOwnPropertyNames,kn=Object.prototype.hasOwnProperty,ks=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of ki(t))kn.call(e,s)||s===i||ke(e,s,{get:()=>t[s],enumerable:!(n=kt(t,s))||n.enumerable});return e},ko={};ks(ko,Sw,"default"),h&&ks(h,Sw,"default");var kr=new class{constructor(e,t,i){this._onDidChange=new ko.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function ka(){return i.e(56300).then(i.bind(i,56300))}ko.languages.json={jsonDefaults:kr,getWorker:()=>ka().then(e=>e.getWorker())},ko.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),ko.languages.onLanguage("json",()=>{ka().then(e=>e.setupMode(kr))}),i(53779);var kl=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,kd=Object.getOwnPropertyNames,kc=Object.prototype.hasOwnProperty,ku=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of kd(t))kc.call(e,s)||s===i||kl(e,s,{get:()=>t[s],enumerable:!(n=kh(t,s))||n.enumerable});return e},kg={};ku(kg,tf,"default"),d&&ku(d,tf,"default"),tm="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:function(e,t){let i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}("defaultWorkerFactory",{createScriptURL:e=>e});var kp=Sw.editor.createWebWorker;Sw.editor.createWebWorker=function(e){if(void 0===e.worker){let t;return t=Promise.resolve(function(e){let t=e.label,i=globalThis.MonacoEnvironment;if(i){if("function"==typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"==typeof i.getWorkerUrl){let e=i.getWorkerUrl("workerMain.js",t);return new Worker(tm?tm.createScriptURL(e):e,{name:t,type:"module"})}}throw Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}({label:e.label??"monaco-editor-worker",moduleId:e.moduleId})).then(t=>(t.postMessage("ignore"),t.postMessage(e.createData),t)),kg.editor.createWebWorker({worker:t,host:e.host,keepIdleModels:e.keepIdleModels})}return kp(e)}},34604:(e,t,i)=>{"use strict";i.d(t,{wZ:()=>d,zL:()=>h,UW:()=>g,Md:()=>m});var n=i(60414),s=i(32563),o=i(61971),r=i(46130);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}var l=i(96716);class h{get isLTR(){return!this.containsRTL&&this.textDirection!==l.z4.RTL}constructor(e,t,i,n,s,o,a,l,h,d,c,u,g,p,m,f,_,v,b,C,w,y=!1){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=h.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=c,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:3*("trailing"===f),this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort((e,t)=>e.start<t.start?-1:1),this.renderNewLineWhenEmpty=y,this.textDirection=C,this.verticalScrollbarSize=w,Math.abs(p-u)<Math.abs(g-u)?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e||e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&r.d.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)&&this.textDirection===e.textDirection&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.renderNewLineWhenEmpty===e.renderNewLineWhenEmpty}}class d{constructor(e,t){this.partIndex=e,this.charIndex=t}}class c{static getPartIndex(e){return(0xffff0000&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){this._data[e-1]=(i|t<<16)>>>0,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1);return new d(c.getPartIndex(t),c.getCharIndex(t))}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){let n;if(0===this.length)return 0;let s=(i|e<<16)>>>0,o=0,r=this.length-1;for(;o+1<r;){let e=o+r>>>1,t=this._data[e];if(t===s)return e;t>s?r=e:o=e}if(o===r)return o;let a=this._data[o],l=this._data[r];if(a===s)return o;if(l===s)return r;let h=c.getPartIndex(a),d=c.getCharIndex(a);return n=h!==c.getPartIndex(l)?t:c.getCharIndex(l),i-d<=n-i?o:r}}class u{constructor(e,t){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsForeignElements=t}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("<span>");let i=0,n=0,s=0;for(let o of e.lineDecorations)(1===o.type||2===o.type)&&(t.appendString('<span class="'),t.appendString(o.className),t.appendString('"></span>'),1===o.type&&(s|=1,i++),2===o.type&&(s|=2,n++));t.appendString("</span>");let o=new c(1,i+n);return o.setColumnInfo(1,i,0,0),new u(o,s)}return e.renderNewLineWhenEmpty?t.appendString("<span><span>\n</span></span>"):t.appendString("<span><span></span></span>"),new u(new c(0,0),0)}return function(e,t){var i;let o=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,a=e.containsForeignElements,l=e.lineContent,h=e.len,d=e.isOverflowing,g=e.overflowingCharCount,p=e.parts,m=e.fauxIndentLength,f=e.tabSize,v=e.startVisibleColumn,b=e.spaceWidth,C=e.renderSpaceCharCode,w=e.renderWhitespace,y=e.renderControlCharacters,S=new c(h+1,p.length),k=!1,x=0,L=v,D=0,I=0,N=0;t.appendString("<span>");for(let e=0,i=p.length;e<i;e++){let i=p[e],n=i.endIndex,d=i.type,c=i.containsRTL,u=0!==w&&i.isWhitespace(),g=u&&!o&&("mtkw"===d||!a),v=x===n&&i.isPseudoAfter();if(D=0,t.appendString("<span "),c&&t.appendString('style="unicode-bidi:isolate" '),t.appendString('class="'),t.appendString(g?"mtkz":d),t.appendASCIICharCode(34),u){let i=0;{let e=x,t=L;for(;e<n;e++){let n=(9===l.charCodeAt(e)?f-t%f:1)|0;i+=n,e>=m&&(t+=n)}}for(g&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x<n;x++){let i,n;if(S.setColumnInfo(x+1,e-N,D,I),N=0,9===l.charCodeAt(x)){n=i=f-L%f|0,!r||n>1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(C),t.appendCharCode(8204);D+=i,I+=n,x>=m&&(L+=n)}}else for(t.appendASCIICharCode(62);x<n;x++){S.setColumnInfo(x+1,e-N,D,I),N=0;let i=l.charCodeAt(x),n=1,o=1;switch(i){case 9:o=n=f-L%f;for(let e=1;e<=n;e++)t.appendCharCode(160);break;case 32:t.appendCharCode(160);break;case 60:t.appendString("<");break;case 62:t.appendString(">");break;case 38:t.appendString("&");break;case 0:y?t.appendCharCode(9216):t.appendString("�");break;case 65279:case 8232:case 8233:case 133:t.appendCharCode(65533);break;default:s.ne(i)&&o++,y&&i<32?t.appendCharCode(9216+i):y&&127===i?t.appendCharCode(9249):y&&_(i)?(t.appendString("[U+"),t.appendString(i.toString(16).toUpperCase().padStart(4,"0")),t.appendString("]"),o=n=8):t.appendCharCode(i)}D+=n,I+=o,x>=m&&(L+=o)}v?N++:N=0,x>=h&&!k&&i.isPseudoAfter()&&(k=!0,S.setColumnInfo(x+1,e,D,I)),t.appendString("</span>")}return k||S.setColumnInfo(h+1,p.length-1,D,I),d&&(t.appendString('<span class="mtkoverflow">'),t.appendString(n.kg(792,"Show more ({0})",(i=g)<1024?n.kg(793,"{0} chars",i):i<1048576?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`)),t.appendString("</span>")),t.appendString("</span>"),new u(S,a)}(function(e){let t,i,n,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<o.length?(t=!0,i=o.length-e.stopRenderingLineAfter,n=e.stopRenderingLineAfter):(t=!1,i=0,n=o.length);let l=function(e,t,i,n,o){let r=[],l=0;n>0&&(r[l++]=new a(n,"",0,!1));let h=n;for(let d=0,c=i.getCount();d<c;d++){let c=i.getEndOffset(d);if(c<=n)continue;let u=i.getClassName(d);if(c>=o){let i=!!t&&s.E_(e.substring(h,o));r[l++]=new a(o,u,0,i);break}let g=!!t&&s.E_(e.substring(h,c));r[l++]=new a(c,u,0,g),h=c}return r}(o,e.containsRTL,e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){let i=[],n=new a(0,"",0,!1),s=0;for(let o of t){let t=o.endIndex;for(;s<t;s++)_(e.charCodeAt(s))&&(s>n.endIndex&&(n=new a(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new a(s+1,"mtkcontrol",o.metadata,!1),i.push(n));s>n.endIndex&&(n=new a(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(o,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){let o,r=e.continuesWithWrappedLine,l=e.fauxIndentLength,h=e.tabSize,d=e.startVisibleColumn,c=e.useMonospaceOptimizations,u=e.selectionsOnLine,g=1===e.renderWhitespace,p=3===e.renderWhitespace,m=e.renderSpaceWidth!==e.spaceWidth,f=[],_=0,v=0,b=n[0].type,C=n[v].containsRTL,w=n[v].endIndex,y=n.length,S=!1,k=s.HG(t);-1===k?(S=!0,k=i,o=i):o=s.lT(t);let x=!1,L=0,D=u&&u[L],I=d%h;for(let e=l;e<i;e++){let r,d=t.charCodeAt(e);if(D&&D.endExclusive<=e&&(L++,D=u&&u[L]),e<k||e>o)r=!0;else if(9===d)r=!0;else if(32===d)if(g)if(x)r=!0;else{let n=e+1<i?t.charCodeAt(e+1):0;r=32===n||9===n}else r=!0;else r=!1;if(r&&u&&(r=!!D&&D.start<=e&&e<D.endExclusive),r&&p&&(r=S||e>o),r&&C&&e>=k&&e<=o&&(r=!1),x){if(!r||!c&&I>=h){if(m){let t=_>0?f[_-1].endIndex:l;for(let i=t+1;i<=e;i++)f[_++]=new a(i,"mtkw",1,!1)}else f[_++]=new a(e,"mtkw",1,!1);I%=h}}else(e===w||r&&e>l)&&(f[_++]=new a(e,b,0,C),I%=h);for(9===d?I=h:s.ne(d)?I+=2:I++,x=r;e===w;)if(++v<y)b=n[v].type,C=n[v].containsRTL,w=n[v].endIndex;else break}let N=!1;if(x)if(r&&g){let e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;(32!==e||32===n||9===n)&&(N=!0)}else N=!0;if(N)if(m){let e=_>0?f[_-1].endIndex:l;for(let t=e+1;t<=i;t++)f[_++]=new a(t,"mtkw",1,!1)}else f[_++]=new a(i,"mtkw",1,!1);else f[_++]=new a(i,b,0,C);return f}(e,o,n,l));let h=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){let i=e.lineDecorations[t];3===i.type||1===i.type?h|=1:2===i.type&&(h|=2)}l=function(e,t,i,n){n.sort(r.d.compare);let s=r.Bs.normalize(e,n),o=s.length,l=0,h=[],d=0,c=0;for(let e=0,t=i.length;e<t;e++){let t=i[e],n=t.endIndex,r=t.type,u=t.metadata,g=t.containsRTL;for(;l<o&&s[l].startOffset<n;){let e=s[l];if(e.startOffset>c&&(c=e.startOffset,h[d++]=new a(c,r,u,g)),e.endOffset+1<=n)c=e.endOffset+1,h[d++]=new a(c,r+" "+e.className,u|e.metadata,g),l++;else{c=n,h[d++]=new a(c,r+" "+e.className,u|e.metadata,g);break}}n>c&&(c=n,h[d++]=new a(c,r,u,g))}let u=i[i.length-1].endIndex;if(l<o&&s[l].startOffset===u)for(;l<o&&s[l].startOffset===u;){let e=s[l];h[d++]=new a(c,e.className,e.metadata,!1),l++}return h}(o,0,l,e.lineDecorations)}return e.containsRTL||(l=function(e,t,i){let n=0,s=[],o=0;if(i)for(let i=0,r=t.length;i<r;i++){let r=t[i],l=r.endIndex;if(n+50<l){let t=r.type,i=r.metadata,h=r.containsRTL,d=-1,c=n;for(let r=n;r<l;r++)32===e.charCodeAt(r)&&(d=r),-1!==d&&r-c>=50&&(s[o++]=new a(d+1,t,i,h),c=d+1,d=-1);c!==l&&(s[o++]=new a(l,t,i,h))}else s[o++]=r;n=l}else for(let e=0,i=t.length;e<i;e++){let i=t[e],r=i.endIndex,l=r-n;if(l>50){let e=i.type,t=i.metadata,h=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i<d;i++){let r=n+50*i;s[o++]=new a(r,e,t,h)}s[o++]=new a(r,e,t,h)}else s[o++]=i;n=r}return s}(o,l,!e.isBasicASCII||e.fontLigatures)),new f(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,o,n,t,i,l,h,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class p{constructor(e,t,i){this.characterMapping=e,this.html=t,this.containsForeignElements=i}}function m(e){let t=new o.fe(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsForeignElements)}class f{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=o,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=c,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=p}}function _(e){return e<32?9!==e:127===e||!!(e>=8234)&&!!(e<=8238)||!!(e>=8294)&&!!(e<=8297)||!!(e>=8206)&&!!(e<=8207)||1564===e}},34744:(e,t,i)=>{"use strict";i.d(t,{l:()=>c,x:()=>u});var n=i(52161),s=i(1315),o=i(10675),r=i(28500),a=i(17397),l=i(54006);i(36676);var h=i(60414);let d=n.$,c={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class u extends a.jG{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const r=this.options.keybindingLabelForeground;this.domNode=n.BC(e,d(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register((0,s.i)().setupManagedHover((0,o.nZ)("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}set(e,t){this.didEverRender&&this.keybinding===e&&u.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let t=1;t<e.length;t++)n.BC(this.domNode,d("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,e[t],this.matches?this.matches.chordPart:null);let t=this.options.disableTitle?void 0:this.keybinding.getAriaLabel()||void 0;this.hover.update(t),this.domNode.setAttribute("aria-label",t||"")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){n.w_(this.domNode),this.keyElements.clear()}renderChord(e,t,i){let n=r.Of.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,!!i?.ctrlKey,n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,!!i?.shiftKey,n.separator),t.altKey&&this.renderKey(e,n.altKey,!!i?.altKey,n.separator),t.metaKey&&this.renderKey(e,n.metaKey,!!i?.metaKey,n.separator);let s=t.keyLabel;s&&this.renderKey(e,s,!!i?.keyCode,"")}renderKey(e,t,i,s){n.BC(e,this.createKeyElement(t,i?".highlight":"")),s&&n.BC(e,d("span.monaco-keybinding-key-separator",void 0,s))}renderUnbound(e){n.BC(e,this.createKeyElement((0,h.kg)(15,"Unbound")))}createKeyElement(e,t=""){let i=d("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),this.options.keybindingLabelBackground&&(i.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(i.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(i.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),i}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,l.aI)(e.firstPart,t.firstPart)&&(0,l.aI)(e.chordPart,t.chordPart)}}},35468:(e,t,i)=>{"use strict";i.d(t,{L:()=>s,h:()=>o});var n=i(47576);class s{static fromTo(e,t){return new s(e,t)}static addRange(e,t){let i=0;for(;i<t.length&&t[i].endExclusive<e.start;)i++;let n=i;for(;n<t.length&&t[n].start<=e.endExclusive;)n++;if(i===n)t.splice(i,0,e);else{let o=Math.min(e.start,t[i].start),r=Math.max(e.endExclusive,t[n-1].endExclusive);t.splice(i,n-i,new s(o,r))}}static tryCreate(e,t){if(!(e>t))return new s(e,t)}static ofLength(e){return new s(0,e)}static ofStartAndLength(e,t){return new s(e,e+t)}static emptyAt(e){return new s(e,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new s(this.start+e,this.endExclusive+e)}deltaStart(e){return new s(this.start+e,this.endExclusive)}deltaEnd(e){return new s(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new s(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){let t=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(t<=i)return new s(t,i)}intersectionLength(e){let t=Math.max(this.start,e.start);return Math.max(0,Math.min(this.endExclusive,e.endExclusive)-t)}intersects(e){return Math.max(this.start,e.start)<Math.min(this.endExclusive,e.endExclusive)}intersectsOrTouches(e){return Math.max(this.start,e.start)<=Math.min(this.endExclusive,e.endExclusive)}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t<this.endExclusive;t++)e(t)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new n.D7(`Invalid join: ${this.toString()} and ${e.toString()}`);return new s(this.start,e.endExclusive)}}class o{constructor(){this._sortedRanges=[]}addRange(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<e.start;)t++;let i=t;for(;i<this._sortedRanges.length&&this._sortedRanges[i].start<=e.endExclusive;)i++;if(t===i)this._sortedRanges.splice(t,0,e);else{let n=Math.min(e.start,this._sortedRanges[t].start),o=Math.max(e.endExclusive,this._sortedRanges[i-1].endExclusive);this._sortedRanges.splice(t,i-t,new s(n,o))}}toString(){return this._sortedRanges.map(e=>e.toString()).join(", ")}intersectsStrict(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<=e.start;)t++;return t<this._sortedRanges.length&&this._sortedRanges[t].start<e.endExclusive}intersectWithRange(e){let t=new o;for(let i of this._sortedRanges){let n=i.intersect(e);n&&t.addRange(n)}return t}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce((e,t)=>e+t.length,0)}}},35683:(e,t,i)=>{"use strict";var n,s,o;i.d(t,{QO:()=>p,cO:()=>u,db:()=>g,fT:()=>a,qK:()=>c,rm:()=>l});class r{constructor(e,t){this.uri=e,this.value=t}}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[n]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(Array.isArray(e))for(const[i,n]of(this.map=new Map,this.toKey=t??a.defaultToKey,e))this.set(i,n);else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new r(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){for(let[i,n]of(void 0!==t&&(e=e.bind(t)),this.map))e(n.value,n.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(e,t){this[s]="ResourceSet",e&&"function"!=typeof e?(this._map=new a(t),e.forEach(this.add,this)):this._map=new a(e)}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,t){this._map.forEach((i,n)=>e.call(t,n,n,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(s=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}class h{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){let i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let i=this._state,n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw Error("LinkedMap got modified during iteration.");n=n.next}}keys(){let e=this,t=this._state,i=this._head,n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw Error("LinkedMap got modified during iteration.");if(!i)return{value:void 0,done:!0};{let e={value:i.key,done:!1};return i=i.next,e}}};return n}values(){let e=this,t=this._state,i=this._head,n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw Error("LinkedMap got modified during iteration.");if(!i)return{value:void 0,done:!0};{let e={value:i.value,done:!1};return i=i.next,e}}};return n}entries(){let e=this,t=this._state,i=this._head,n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw Error("LinkedMap got modified during iteration.");if(!i)return{value:void 0,done:!0};{let e={value:[i.key,i.value],done:!1};return i=i.next,e}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail)if(this._head)e.next=this._head,this._head.previous=e;else throw Error("Invalid list");else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail)if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error("Invalid list");else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,i=e.previous;if(!t||!i)throw Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error("Invalid list");if(1===t||2===t){if(1===t){if(e===this._head)return;let t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;let t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){for(let[t,i]of(this.clear(),e))this.set(t,i)}}class d extends h{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends d{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class g{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}}class p{constructor(){this._data=new Map}set(e,...t){let i=this._data;for(let e=0;e<t.length-1;e++)i.has(t[e])||i.set(t[e],new Map),i=i.get(t[e]);i.set(t[t.length-1],e)}get(...e){let t=this._data;for(let i=0;i<e.length-1;i++){if(!t.has(e[i]))return;t=t.get(e[i])}return t.get(e[e.length-1])}clear(){this._data.clear()}toString(){let e=(t,i)=>{let n="";for(let[s,o]of t)n+=`${" ".repeat(i)}${s}: `,o instanceof Map?n+="\n"+e(o,i+1):n+=`${o}
|
|
88
|
-
`;return n};return e(this._data,0)}}},35809:()=>{},35859:(e,t,i)=>{"use strict";i.d(t,{W5:()=>p,dr:()=>d,eV:()=>h,hB:()=>u,lt:()=>l,wC:()=>g});var n=i(32563),s=i(49117),o=i(47982),r=i(10902),a=i(96716);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){let e;if(""===this.searchString)return null;e=this.isRegex?h(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,s.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function h(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){let n=e.charCodeAt(t);if(10===n)return!0;if(92===n){if(++t>=i)break;let n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}function d(e,t,i){if(!i)return new a.Dg(e,null);let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new a.Dg(e,n)}class c{constructor(e){const t=[];let i=0;for(let n=0,s=e.length;n<s;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){let t=this._lineFeedsOffsets,i=0,n=t.length-1;if(-1===n||e<=t[0])return 0;for(;i<n;){let s=i+((n-i)/2|0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class u{static findMatches(e,t,i,n,s){let o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new p(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l,h=0;if(n?(h=n.findLineFeedCountBeforeOffset(s),a=t+s+h):a=t+s,n){let e=n.findLineFeedCountBeforeOffset(s+o.length)-h;l=a+o.length+e}else l=a+o.length;let d=e.getPositionAt(a),c=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,i,n,s){let o,r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new c(a):null,h=[],u=0;for(i.reset(0);(o=i.next(a))&&(h[u++]=d(this._getMultilineMatchRange(e,r,a,l,o.index,o[0]),o,n),!(u>=s)););return h}static _doFindMatchesLineByLine(e,t,i,n,s){let o=[],r=0;if(t.startLineNumber===t.endLineNumber){let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let a=t.startLineNumber+1;a<t.endLineNumber&&r<s;a++)r=this._findMatchesInLine(i,e.getLineContent(a),a,0,r,o,n,s);if(r<s){let a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,o,n,s)}return o}static _findMatchesInLine(e,t,i,n,s,o,l,h){let c,u=e.wordSeparators;if(!l&&e.simpleSearch){let l=e.simpleSearch,d=l.length,c=t.length,p=-d;for(;-1!==(p=t.indexOf(l,p+d))&&(!(!u||g(u,t,c,p,d))||(o[s++]=new a.Dg(new r.Q(i,p+1+n,i,p+1+d+n),null),!(s>=h))););return s}let m=new p(e.wordSeparators,e.regex);m.reset(0);do if((c=m.next(t))&&(o[s++]=d(new r.Q(i,c.index+1+n,i,c.index+1+c[0].length+n),c,l),s>=h))break;while(c);return s}static findNextMatch(e,t,i,n){let s=t.parseSearchRequest();if(!s)return null;let o=new p(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){let s=new o.y(t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),h=e.getValueInRange(new r.Q(s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new c(h):null;i.reset(t.column-1);let g=i.next(h);return g?d(this._getMultilineMatchRange(e,a,h,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){let s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let t=1;t<=s;t++){let r=(o+t-1)%s,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);let o=e.next(t);return o?d(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){let s=t.parseSearchRequest();if(!s)return null;let o=new p(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){let s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];let a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){let s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let t=1;t<=s;t++){let r=(s+o-t-1)%s,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=d(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function g(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;let o=t.charCodeAt(n-1);if(0!==e.get(o)||13===o||10===o)return!0;if(s>0){let i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;let o=t.charCodeAt(n+s);if(0!==e.get(o)||13===o||10===o)return!0;if(s>0){let i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t,i=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||!(t=this._searchRegex.exec(e)))break;let s=t.index,o=t[0].length;if(s===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n.Z5(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}break}if(this._prevMatchStartIndex=s,this._prevMatchLength=o,!this._wordSeparators||g(this._wordSeparators,e,i,s,o))return t}while(t);return null}}},35896:()=>{},35972:(e,t,i)=>{"use strict";i.d(t,{CG:()=>s,gO:()=>r});var n=i(18780);function s(e,t){var i,s;if(n.HZ)return!1;let r=(i=e,(s=t)||(s=o(i)),"native"===s),a=e.getValue("window");return a?.menuStyle==="native"?!!n.zx||!!r:a?.menuStyle!=="custom"&&r}function o(e){if(n.HZ)return"custom";let t=e.getValue("window");if(t){if(n.zx&&!0===t.nativeTabs||n.zx&&!1===t.nativeFullScreen)return"native";let e=t.titleBarStyle;if("native"===e||"custom"===e)return e}return"custom"}function r(e){if(n.HZ||n.zx||"native"===o(e))return"native";let t=e.getValue("window"),i=t?.controlsStyle;return"custom"===i||"hidden"===i?i:"native"}},36046:()=>{},36527:()=>{},36578:(e,t,i)=>{"use strict";i.d(t,{r4:()=>E,Yl:()=>T});var n,s=i(50197),o=i(75200),r=i(17397),a=i(41748),l=i(44597),h=i(51328),d=i(18805),c=i(4222),u=i(29119),g=i(87028),p=i(92927),m=i(53308),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=(0,h.u1)("diffProviderFactoryService"),b=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(C,e)}};b=f([_(0,h._Y)],b),(0,l.v)(v,b,1);let C=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new d.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,s){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,s);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new g.wm(new u.M(1,2),new u.M(1,t.getLineCount()+1),[new g.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let o=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),a=n.diffCache.get(o);if(a&&a.context===r)return a.result;let l=c.W.create(),h=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),d=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:d,timedOut:h?.quitEarly??!0,detectedMoves:i.computeMoves?h?.moves.length??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(o,{result:h,context:r}),h}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};C=n=f([_(1,p.w),_(2,m.k)],C);var w=i(16427),y=i(39216),S=i(28574),k=i(97957),x=i(25875),L=i(36137),D=i(24244),I=i(51765),N=i(29001);let E=class extends r.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,a.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,a.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,a.FY)(this,void 0),this.unchangedRegions=(0,a.un)(this,e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,a.Rn)(e=>{for(let t of this._unchangedRegions.read(void 0)?.regions||[])t.collapseAll(e)}),[])),this.movedTextToCompare=(0,a.FY)(this,void 0),this._activeMovedText=(0,a.FY)(this,void 0),this._hoveredMovedText=(0,a.FY)(this,void 0),this.activeMovedText=(0,a.un)(this,e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e)),this._cancellationTokenSource=new o.Qi,this._diffProvider=(0,a.un)(this,e=>{let t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)}),i=(0,a.yQ)("onDidChange",t.onDidChange);return{diffProvider:t,onChangeSignal:i}}),this._register((0,r.s)(()=>this._cancellationTokenSource.cancel()));const n=(0,a.Yd)("contentChangedSignal"),l=this._register(new s.uC(()=>n.trigger(void 0),200));this._register((0,a.fm)(t=>{let i=this._unchangedRegions.read(t);if(!i||i.regions.some(e=>e.isDragged.read(t)))return;let n=i.originalDecorationIds.map(t=>e.original.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),s=i.modifiedDecorationIds.map(t=>e.modified.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),o=i.regions.map((e,i)=>n[i]&&s[i]?new R(n[i].startLineNumber,s[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0).filter(D.O9),r=[],l=!1;for(let e of(0,I.n)(o,(e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber))if(e.length>1){l=!0;let t=e.reduce((e,t)=>e+t.lineCount,0),i=new R(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.read(void 0),e[e.length-1].visibleLineCountBottom.read(void 0));r.push(i)}else r.push(e[0]);if(l){let t=e.original.deltaDecorations(i.originalDecorationIds,r.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));(0,a.Rn)(e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)})}}));const h=(t,i,n)=>{let s,o=R.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n)),r=this._unchangedRegions.get();if(r){let t=r.originalDecorationIds.map(t=>e.original.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),i=r.modifiedDecorationIds.map(t=>e.modified.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),o=(0,w.EK)(r.regions.map((e,n)=>{if(!t[n]||!i[n])return;let s=t[n].length;return new R(t[n].startLineNumber,i[n].startLineNumber,s,Math.min(e.visibleLineCountTop.get(),s),Math.min(e.visibleLineCountBottom.get(),s-e.visibleLineCountTop.get()))}).filter(D.O9),(e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount).map(e=>new g.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n)));o=g.WL.clip(o,u.M.ofLength(1,e.original.getLineCount()),u.M.ofLength(1,e.modified.getLineCount())),s=g.WL.inverse(o,e.original.getLineCount(),e.modified.getLineCount())}let a=[];if(s)for(let e of o){let t=s.filter(t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);let l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),h=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:h},i)};this._register(e.modified.onDidChangeContent(t=>{if(this._diff.get()){let i=k.c.fromModelContentChanges(t.changes),n=P(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,a.Rn)(e=>{this._diff.set(M.fromDiffResult(this._lastDiff),e),h(n,e);let t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified)):void 0,e)}))}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register(e.original.onDidChangeContent(t=>{if(this._diff.get()){let i=k.c.fromModelContentChanges(t.changes),n=O(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,a.Rn)(e=>{this._diff.set(M.fromDiffResult(this._lastDiff),e),h(n,e);let t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified)):void 0,e)}))}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register((0,a.yC)(async(t,i)=>{var s,o,r;this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),l.cancel(),n.read(t);let d=this._diffProvider.read(t);d.onChangeSignal.read(t),(0,y.b6)(S.D,t),(0,y.b6)(L.NC,t),this._isDiffUpToDate.set(!1,void 0);let c=[];i.add(e.original.onDidChangeContent(e=>{let t=k.c.fromModelContentChanges(e.changes);c=(0,x.M)(c,t)}));let u=[];i.add(e.modified.onDidChangeContent(e=>{let t=k.c.fromModelContentChanges(e.changes);u=(0,x.M)(u,t)}));let p=await d.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(p=P(p=O((s=p,o=e.original,r=e.modified,p={changes:s.changes.map(e=>new g.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map(e=>{var t,i,n;let s,a;return t=e,i=o,n=r,s=t.originalRange,a=t.modifiedRange,1===s.startColumn&&1===a.startColumn&&(1!==s.endColumn||1!==a.endColumn)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&a.endColumn===n.getLineMaxColumn(a.endLineNumber)&&s.endLineNumber<i.getLineCount()&&a.endLineNumber<n.getLineCount()&&(s=s.setEndPosition(s.endLineNumber+1,1),a=a.setEndPosition(a.endLineNumber+1,1)),new g.q6(s,a)}):void 0)),moves:s.moves,identical:s.identical,quitEarly:s.quitEarly}),c,e.original,e.modified)??p,u,e.original,e.modified)??p,(0,a.Rn)(e=>{h(p,e),this._lastDiff=p;let t=M.fromDiffResult(p);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);let i=this.movedTextToCompare.read(void 0);this.movedTextToCompare.set(i?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified)):void 0,e)}))}))}ensureModifiedLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length!==0){for(let n of this._unchangedRegions.get()?.regions||[])if(n.getHiddenModifiedRange(void 0).contains(e))return void n.showModifiedLine(e,t,i)}}ensureOriginalLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length!==0){for(let n of this._unchangedRegions.get()?.regions||[])if(n.getHiddenOriginalRange(void 0).contains(e))return void n.showOriginalLine(e,t,i)}}async waitForDiff(){await (0,a.oJ)(this.isDiffUpToDate,e=>e)}serializeState(){let e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map(e=>({range:e.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){let t=e.collapsedRegions?.map(e=>u.M.deserialize(e.range)),i=this._unchangedRegions.get();i&&t&&(0,a.Rn)(e=>{for(let n of i.regions)for(let i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}})}};E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){v(e,t,2)}],E);class M{static fromDiffResult(e){return new M(e.changes.map(e=>new T(e)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class T{constructor(e){this.lineRangeMapping=e}}class R{static fromDiffs(e,t,i,n,s){let o=g.wm.inverse(e,t,i),r=[];for(let e of o){let o=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length,h=1===o&&1===a,d=o+l===t+1&&a+l===i+1;(h||d)&&l>=s+n?(h&&!d&&(l-=s),d&&!h&&(o+=s,a+=s,l-=s),r.push(new R(o,a,l,0,0))):l>=2*s+n&&(o+=s,a+=s,l-=2*s,r.push(new R(o,a,l,0,0)))}return r}get originalUnchangedRange(){return u.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return u.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,a.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,a.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,a.un)(this,e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e)),this.isDragged=(0,a.FY)(this,void 0);const o=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(s,this.lineCount-n),0);(0,N.V7)(n===o),(0,N.V7)(s===r),this._visibleLineCountTop.set(o,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){let i=[],n=new u.S(e.map(e=>e.modified)).subtractFrom(this.modifiedUnchangedRange),s=this.originalLineNumber,o=this.modifiedLineNumber,r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(let a of n.ranges){let l=e===n.ranges.length-1;e++;let h=(l?r:a.endLineNumberExclusive)-o,d=new R(s,o,h,0,0);d.setHiddenModifiedRange(a,t),i.push(d),s=d.originalUnchangedRange.endLineNumberExclusive,o=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return u.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return u.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){let i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){let n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n<s||1===t?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+n,i):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+s,i)}showOriginalLine(e,t,i){let n=e-this.originalLineNumber,s=this.originalLineNumber+this.lineCount-e;0===t&&n<s||1===t?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+s-n,this.getMaxVisibleLineCountTop()),i):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+n-s,this.getMaxVisibleLineCountBottom()),i)}collapseAll(e){this._visibleLineCountTop.set(0,e),this._visibleLineCountBottom.set(0,e)}setState(e,t,i){e=Math.max(Math.min(e,this.lineCount),0),t=Math.max(Math.min(t,this.lineCount-e),0),this._visibleLineCountTop.set(e,i),this._visibleLineCountBottom.set(t,i)}}function O(e,t,i,n){}function P(e,t,i,n){}},36603:()=>{},36676:()=>{},36693:()=>{},37047:(e,t,i)=>{"use strict";i.d(t,{AS:()=>a,gr:()=>c,iP:()=>d,iu:()=>r,q2:()=>h,tA:()=>l,ui:()=>u});var n=i(47982),s=i(10902),o=i(10965);class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class a{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){let i=this._range.getStartPosition(),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,this._text.length+(this._range.isEmpty()?0:-1));a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(i,a);t.addTrackedEditOperation(l,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class l{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromRange(i,0)}}class h{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getStartPosition())}}class d{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class c{constructor(e){this._range=e}getEditOperations(e,t){let i=e.getValueInRange(this._range),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,i.length);a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(o,a);t.addTrackedEditOperation(l,"")}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class u{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function g(e,t,i){if(i<0)throw Error("Unexpected negative delta");let s=e.getLineCount(),o=new n.y(s,e.getLineMaxColumn(s));for(let r=t.lineNumber;r<=s;r++)if(r===t.lineNumber){let s=i-e.getLineMaxColumn(t.lineNumber)+t.column;if(s<=0){o=new n.y(t.lineNumber,t.column+i);break}i=s}else{let t=i-e.getLineMaxColumn(r);if(t<=0){o=new n.y(r,i);break}i=t}return o}},38004:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});let n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},38016:()=>{},38691:(e,t,i)=>{"use strict";i.d(t,{e2:()=>l,sN:()=>r,tW:()=>o,v7:()=>c});var n=i(2281),s=i(32563);function o(e){return r(e,0)}function r(e,t){switch(typeof e){case"object":var i,n,s,o;if(null===e)return a(349,t);if(Array.isArray(e)){return i=e,n=a(104579,n=t),i.reduce((e,t)=>r(t,e),n)}return s=e,o=a(181387,o=t),Object.keys(s).sort().reduce((e,t)=>(e=l(t,e),r(s[t],e)),o);case"string":return l(e,t);case"boolean":return a(e?433:863,t);case"number":return a(e,t);case"undefined":return a(937,t);default:return a(617,t)}}function a(e,t){return(t<<5)-t+e|0}function l(e,t){t=a(149417,t);for(let i=0,n=e.length;i<n;i++)t=a(e.charCodeAt(i),t);return t}function h(e,t,i=32){let n=i-t;return(e<<t|(~((1<<n)-1)&e)>>>n)>>>0}function d(e,t=32){return e instanceof ArrayBuffer?(0,n.mU)(n.MB.wrap(new Uint8Array(e))):(e>>>0).toString(16).padStart(t/4,"0")}class c{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=0x67452301,this._h1=0xefcdab89,this._h2=0x98badcfe,this._h3=0x10325476,this._h4=0xc3d2e1f0,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t,i,n=e.length;if(0===n)return;let o=this._buff,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(t=a,i=-1,a=0):(t=e.charCodeAt(0),i=0);;){let l=t;if(s.pc(t))if(i+1<n){let n=e.charCodeAt(i+1);s.LJ(n)?(i++,l=s.z_(t,n)):l=65533}else{a=t;break}else s.LJ(t)&&(l=65533);if(r=this._push(o,r,l),++i<n)t=e.charCodeAt(i);else break}this._buffLen=r,this._leftoverHighSurrogate=a}_push(e,t,i){return i<128?e[t++]=i:(i<2048?e[t++]=192|(1984&i)>>>6:(i<65536?e[t++]=224|(61440&i)>>>12:(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12),e[t++]=128|(4032&i)>>>6),e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),d(this._h0)+d(this._h1)+d(this._h2)+d(this._h3)+d(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/0x100000000),!1),this._buffDV.setUint32(60,e%0x100000000,!1),this._step()}_step(){let e,t,i,n=c._bigBlock32,s=this._buffDV;for(let e=0;e<64;e+=4)n.setUint32(e,s.getUint32(e,!1),!1);for(let e=64;e<320;e+=4)n.setUint32(e,h(n.getUint32(e-12,!1)^n.getUint32(e-32,!1)^n.getUint32(e-56,!1)^n.getUint32(e-64,!1),1),!1);let o=this._h0,r=this._h1,a=this._h2,l=this._h3,d=this._h4;for(let s=0;s<80;s++)s<20?(e=r&a|~r&l,t=0x5a827999):s<40?(e=r^a^l,t=0x6ed9eba1):s<60?(e=r&a|r&l|a&l,t=0x8f1bbcdc):(e=r^a^l,t=0xca62c1d6),i=h(o,5)+e+d+t+n.getUint32(4*s,!1)|0,d=l,l=a,a=h(r,30),r=o,o=i;this._h0=this._h0+o|0,this._h1=this._h1+r|0,this._h2=this._h2+a|0,this._h3=this._h3+l|0,this._h4=this._h4+d|0}}},38932:(e,t,i)=>{"use strict";i.d(t,{B:()=>s,m:()=>w});var n,s,o=i(52161),r=i(25083),a=i(9634),l=i(27393),h=i(50197),d=i(83725),c=i(18805),u=i(17397),g=i(18780);i(32648);var p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};(n=s||(s={})).North="north",n.South="south",n.East="east",n.West="west";let m=new c.vl,f=new c.vl;class _{constructor(e){this.el=e,this.disposables=new u.Cm}get onPointerMove(){return this.disposables.add(new a.f((0,o.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new a.f((0,o.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}p([d.B],_.prototype,"onPointerMove",null),p([d.B],_.prototype,"onPointerUp",null);class v{get onPointerMove(){return this.disposables.add(new a.f(this.el,l.B.Change)).event}get onPointerUp(){return this.disposables.add(new a.f(this.el,l.B.End)).event}constructor(e){this.el=e,this.disposables=new u.Cm}dispose(){this.disposables.dispose()}}p([d.B],v.prototype,"onPointerMove",null),p([d.B],v.prototype,"onPointerUp",null);class b{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}p([d.B],b.prototype,"onPointerMove",null),p([d.B],b.prototype,"onPointerUp",null);let C="pointer-events-disabled";class w extends u.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,o.BC)(this.el,(0,o.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,u.s)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add((0,o.ko)(this._orthogonalStartDragHandle,"mouseenter",()=>w.onMouseEnter(e))),this.orthogonalStartDragHandleDisposables.add((0,o.ko)(this._orthogonalStartDragHandle,"mouseleave",()=>w.onMouseLeave(e))))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,o.BC)(this.el,(0,o.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,u.s)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add((0,o.ko)(this._orthogonalEndDragHandle,"mouseenter",()=>w.onMouseEnter(e))),this.orthogonalEndDragHandleDisposables.add((0,o.ko)(this._orthogonalEndDragHandle,"mouseleave",()=>w.onMouseLeave(e))))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){let n;super(),this.hoverDelay=300,this.hoverDelayer=this._register(new h.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new c.vl),this._onDidStart=this._register(new c.vl),this._onDidChange=this._register(new c.vl),this._onDidReset=this._register(new c.vl),this._onDidEnd=this._register(new c.vl),this.orthogonalStartSashDisposables=this._register(new u.Cm),this.orthogonalStartDragHandleDisposables=this._register(new u.Cm),this.orthogonalEndSashDisposables=this._register(new u.Cm),this.orthogonalEndDragHandleDisposables=this._register(new u.Cm),this.linkedSash=void 0,this.el=(0,o.BC)(e,(0,o.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),g.zx&&this.el.classList.add("mac"),this._register((0,o.ko)(this.el,"mousedown",t=>this.onPointerStart(t,new _(e)))),this._register((0,o.ko)(this.el,"dblclick",e=>this.onPointerDoublePress(e))),this._register((0,o.ko)(this.el,"mouseenter",()=>w.onMouseEnter(this))),this._register((0,o.ko)(this.el,"mouseleave",()=>w.onMouseLeave(this))),this._register(l.q.addTarget(this.el)),this._register((0,o.ko)(this.el,l.B.Start,e=>this.onPointerStart(e,new v(this.el)))),this._register((0,o.ko)(this.el,l.B.Tap,e=>{if(n){clearTimeout(n),n=void 0,this.onPointerDoublePress(e);return}clearTimeout(n),n=setTimeout(()=>n=void 0,250)})),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(m.event(e=>{this.size=e,this.layout()}))),this._register(f.event(e=>this.hoverDelay=e)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){o.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){let n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new b(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new b(t))),!this.state)return;let n=this.el.ownerDocument.getElementsByTagName("iframe");for(let e of n)e.classList.add(C);let s=e.pageX,a=e.pageY,l=e.altKey;this.el.classList.add("active"),this._onDidStart.fire({startX:s,currentX:s,startY:a,currentY:a,altKey:l});let h=(0,r.li)(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":g.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":g.zx?"col-resize":"ew-resize",h.textContent=`* { cursor: ${e} !important; }`},c=new u.Cm;d(),i||this.onDidEnablementChange.event(d,null,c);let p=e=>{o.fs.stop(e,!1);let t={startX:s,currentX:e.pageX,startY:a,currentY:e.pageY,altKey:l};this._onDidChange.fire(t)},m=e=>{for(let t of(o.fs.stop(e,!1),h.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),c.dispose(),n))t.classList.remove(C)};t.onPointerMove(p,null,c),t.onPointerUp(m,null,c),c.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&w.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&w.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){w.onMouseLeave(this)}layout(){if(0===this.orientation){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){let t=e.initialTarget??e.target;if(t&&(0,o.sb)(t)&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}},39216:(e,t,i)=>{"use strict";i.d(t,{b6:()=>o,of:()=>a});var n=i(63003),s=i(41748);function o(e,t){var i,o;return i=[e],o=t,(0,n.e)()&&(0,s.yQ)("reload",e=>(0,n.O)(({oldExports:t})=>{if([...Object.values(t)].some(e=>i.includes(e)))return t=>(e(void 0),!0)})).read(o),e}let r=new Map;function a(e){if(!(0,n.e)())return(0,s.lk)(e);let t=e.name,i=r.get(t);return i?setTimeout(()=>{i.set(e,void 0)},0):(i=(0,s.FY)(t,e),r.set(t,i)),i}},39443:(e,t,i)=>{"use strict";i.d(t,{Y:()=>g});var n,s,o=i(32563),r=i(71974),a=i(10902),l=i(10965),h=i(62709),d=i(63325);let c=Object.create(null);function u(e,t){if(t<=0)return"";c[e]||(c[e]=["",e]);let i=c[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let g=s=class{static unshiftIndent(e,t,i,n,s){let o=r.A.visibleColumnFromColumn(e,t,i);if(s){let e=u(" ",n);return u(e,r.A.prevIndentTabStop(o,n)/n)}return u(" ",r.A.prevRenderTabStop(o,i)/i)}static shiftIndent(e,t,i,n,s){let o=r.A.visibleColumnFromColumn(e,t,i);if(s){let e=u(" ",n);return u(e,r.A.nextIndentTabStop(o,n)/n)}return u(" ",r.A.nextRenderTabStop(o,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){let i=this._selection.startLineNumber,n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);let{tabSize:l,indentSize:d,insertSpaces:c}=this._opts,g=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let u=0,p=0;for(let m=i;m<=n;m++,u=p){let n;p=0;let f=e.getLineContent(m),_=o.HG(f);if((!this._opts.isUnshift||0!==f.length&&0!==_)&&(g||this._opts.isUnshift||0!==f.length)){if(-1===_&&(_=f.length),m>1&&r.A.visibleColumnFromColumn(f,_+1,l)%d!=0&&e.tokenization.isCheapToTokenize(m-1)){let t=(0,h.h)(this._opts.autoIndent,e,new a.Q(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)),this._languageConfigurationService);if(t){if(p=u,t.appendText)for(let e=0,i=t.appendText.length;e<i&&p<d;e++)if(32===t.appendText.charCodeAt(e))p++;else break;t.removeText&&(p=Math.max(0,p-t.removeText));for(let e=0;e<p&&0!==_&&32===f.charCodeAt(_-1);e++)_--}}(!this._opts.isUnshift||0!==_)&&(n=this._opts.isUnshift?s.unshiftIndent(f,_+1,l,d,c):s.shiftIndent(f,_+1,l,d,c),this._addEditOperation(t,new a.Q(m,1,m,_+1),n),m!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=_+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);let s=c?u(" ",d):" ";for(let r=i;r<=n;r++){let n=e.getLineContent(r),l=o.HG(n);if((!this._opts.isUnshift||0!==n.length&&0!==l)&&(g||this._opts.isUnshift||0!==n.length)&&(-1===l&&(l=n.length),!this._opts.isUnshift||0!==l))if(this._opts.isUnshift){l=Math.min(l,d);for(let e=0;e<l;e++)if(9===n.charCodeAt(e)){l=e+1;break}this._addEditOperation(t,new a.Q(r,1,r,l+1),"")}else this._addEditOperation(t,new a.Q(r,1,r,1),s),r!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let e=t.getInverseEditOperations()[0];return new l.L(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}let i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let e=this._selection.startColumn;return i.startColumn<=e?i:0===i.getDirection()?new l.L(i.startLineNumber,e,i.endLineNumber,i.endColumn):new l.L(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}};g=s=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=d.JZ,function(e,t){n(e,t,2)})],g)},39454:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>l,aJ:()=>s});var n,s,o=i(51765),r=i(17397),a=i(98332);(n=s||(s={}))[n.PRESERVE=0]="PRESERVE",n[n.LAST=1]="LAST";let l={Quickaccess:"workbench.contributions.quickaccess"};class h{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),(0,r.s)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,o.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(t=>e.startsWith(t.prefix))||this.defaultProvider}}a.O.add(l.Quickaccess,new h)},39463:(e,t,i)=>{"use strict";i.d(t,{Th:()=>f,z8:()=>_});var n=i(60414),s=i(47576),o=i(10965),r=i(40375),a=i(8442),l=i(2281),h=i(13580),d=i(40724);function c(e){return e.toString()}class u{static create(e,t){let i=e.getAlternativeVersionId(),n=m(e);return new u(i,i,n,n,t,t,[])}constructor(e,t,i,n,s,o,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=o,this.changes=r}append(e,t,i,n,s){t.length>0&&(this.changes=(0,a.x)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.Sw(e,t?t.length:0,i),i+=4,t)for(let n of t)l.Sw(e,n.selectionStartLineNumber,i),i+=4,l.Sw(e,n.selectionStartColumn,i),i+=4,l.Sw(e,n.positionLineNumber,i),i+=4,l.Sw(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){let n=l.bb(e,t);t+=4;for(let s=0;s<n;s++){let n=l.bb(e,t);t+=4;let s=l.bb(e,t);t+=4;let r=l.bb(e,t);t+=4;let a=l.bb(e,t);t+=4,i.push(new o.L(n,s,r,a))}return t}serialize(){let e=10+u._writeSelectionsSize(this.beforeCursorState)+u._writeSelectionsSize(this.afterCursorState)+4;for(let t of this.changes)e+=t.writeSize();let t=new Uint8Array(e),i=0;for(let e of(l.Sw(t,this.beforeVersionId,i),i+=4,l.Sw(t,this.afterVersionId,i),i+=4,l.Gs(t,this.beforeEOL,i),i+=1,l.Gs(t,this.afterEOL,i),i+=1,i=u._writeSelections(t,this.beforeCursorState,i),i=u._writeSelections(t,this.afterCursorState,i),l.Sw(t,this.changes.length,i),i+=4,this.changes))i=e.write(t,i);return t.buffer}static deserialize(e){let t=new Uint8Array(e),i=0,n=l.bb(t,i);i+=4;let s=l.bb(t,i);i+=4;let o=l.pJ(t,i);i+=1;let r=l.pJ(t,i);i+=1;let h=[];i=u._readSelections(t,i,h);let d=[];i=u._readSelections(t,i,d);let c=l.bb(t,i);i+=4;let g=[];for(let e=0;e<c;e++)i=a.k.read(t,i,g);return new u(n,s,o,r,h,d,g)}}class g{get type(){return 0}get resource(){return r.r.isUri(this.model)?this.model:this.model.uri}constructor(e,t,i,n){this.label=e,this.code=t,this.model=i,this._data=u.create(i,n)}toString(){return(this._data instanceof u?this._data:u.deserialize(this._data)).changes.map(e=>e.toString()).join(", ")}matchesResource(e){return(r.r.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof u}append(e,t,i,n,s){this._data instanceof u&&this._data.append(e,t,i,n,s)}close(){this._data instanceof u&&(this._data=this._data.serialize())}open(){this._data instanceof u||(this._data=u.deserialize(this._data))}undo(){if(r.r.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.r.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof u&&(this._data=this._data.serialize()),this._data.byteLength+168}}class p{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,i){for(const n of(this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map,this._editStackElementsArr)){const e=c(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=c(e);return this._editStackElementsMap.has(t)}setModel(e){let t=c(r.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=c(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,s){let o=c(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){for(let e of(this._isOpen=!1,this._editStackElementsArr))e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=c(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${(0,h.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function m(e){return+("\n"!==e.getEOL())}function f(e){return!!e&&(e instanceof g||e instanceof p)}class _{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let i=this._undoRedoService.getLastElement(this._model.uri);if(f(i)&&i.canAppend(this._model))return i;let s=new g(n.kg(781,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,t),s}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],m(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n,s=d.dg.unknown({name:"pushEditOperation"})){let o=this._getOrCreateEditStackElement(e,n),r=this._model.applyEdits(t,!0,s),a=_._computeCursorState(i,r),l=r.map((e,t)=>({index:t,textChange:e.textChange}));return l.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),o.append(this._model,l.map(e=>e.textChange),m(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,s.dz)(e),null}}}},39520:(e,t,i)=>{"use strict";i.d(t,{D:()=>s});var n=i(18805);let s=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},39894:(e,t,i)=>{"use strict";let n,s,o,r;i.d(t,{$M:()=>B,EI:()=>S,FX:()=>k,GE:()=>H,HC:()=>C,Iu:()=>z,Kb:()=>L,M$:()=>b,NI:()=>V,Ni:()=>y,OV:()=>I,PK:()=>j,WA:()=>x,YT:()=>N,dG:()=>G,gP:()=>D,lO:()=>$,ou:()=>F,qw:()=>w,r4:()=>M,rY:()=>W,uB:()=>E,v_:()=>K});var a,l,h,d,c,u,g,p,m,f,_,v,b,C,w,y,S,k,x,L,D,I,N,E,M,T=i(10359),R=i(40375),O=i(10902),P=i(39947),A=i(60414);class F{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class B{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class W{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(a=b||(b={}))[a.Increase=0]="Increase",a[a.Decrease=1]="Decrease",l=C||(C={}),(n=new Map).set(0,T.W.symbolMethod),n.set(1,T.W.symbolFunction),n.set(2,T.W.symbolConstructor),n.set(3,T.W.symbolField),n.set(4,T.W.symbolVariable),n.set(5,T.W.symbolClass),n.set(6,T.W.symbolStruct),n.set(7,T.W.symbolInterface),n.set(8,T.W.symbolModule),n.set(9,T.W.symbolProperty),n.set(10,T.W.symbolEvent),n.set(11,T.W.symbolOperator),n.set(12,T.W.symbolUnit),n.set(13,T.W.symbolValue),n.set(15,T.W.symbolEnum),n.set(14,T.W.symbolConstant),n.set(15,T.W.symbolEnum),n.set(16,T.W.symbolEnumMember),n.set(17,T.W.symbolKeyword),n.set(28,T.W.symbolSnippet),n.set(18,T.W.symbolText),n.set(19,T.W.symbolColor),n.set(20,T.W.symbolFile),n.set(21,T.W.symbolReference),n.set(22,T.W.symbolCustomColor),n.set(23,T.W.symbolFolder),n.set(24,T.W.symbolTypeParameter),n.set(25,T.W.account),n.set(26,T.W.issues),n.set(27,T.W.tools),l.toIcon=function(e){let t=n.get(e);return t||(console.info("No codicon found for CompletionItemKind "+e),t=T.W.symbolProperty),t},l.toLabel=function(e){switch(e){case 0:return(0,A.kg)(724,"Method");case 1:return(0,A.kg)(725,"Function");case 2:return(0,A.kg)(726,"Constructor");case 3:return(0,A.kg)(727,"Field");case 4:return(0,A.kg)(728,"Variable");case 5:return(0,A.kg)(729,"Class");case 6:return(0,A.kg)(730,"Struct");case 7:return(0,A.kg)(731,"Interface");case 8:return(0,A.kg)(732,"Module");case 9:return(0,A.kg)(733,"Property");case 10:return(0,A.kg)(734,"Event");case 11:return(0,A.kg)(735,"Operator");case 12:return(0,A.kg)(736,"Unit");case 13:return(0,A.kg)(737,"Value");case 14:return(0,A.kg)(738,"Constant");case 15:return(0,A.kg)(739,"Enum");case 16:return(0,A.kg)(740,"Enum Member");case 17:return(0,A.kg)(741,"Keyword");case 18:return(0,A.kg)(742,"Text");case 19:return(0,A.kg)(743,"Color");case 20:return(0,A.kg)(744,"File");case 21:return(0,A.kg)(745,"Reference");case 22:return(0,A.kg)(746,"Custom Color");case 23:return(0,A.kg)(747,"Folder");case 24:return(0,A.kg)(748,"Type Parameter");case 25:return(0,A.kg)(749,"User");case 26:return(0,A.kg)(750,"Issue");case 27:return(0,A.kg)(751,"Tool");case 28:return(0,A.kg)(752,"Snippet");default:return""}},(s=new Map).set("method",0),s.set("function",1),s.set("constructor",2),s.set("field",3),s.set("variable",4),s.set("class",5),s.set("struct",6),s.set("interface",7),s.set("module",8),s.set("property",9),s.set("event",10),s.set("operator",11),s.set("unit",12),s.set("value",13),s.set("constant",14),s.set("enum",15),s.set("enum-member",16),s.set("enumMember",16),s.set("keyword",17),s.set("snippet",28),s.set("text",18),s.set("color",19),s.set("file",20),s.set("reference",21),s.set("customcolor",22),s.set("folder",23),s.set("type-parameter",24),s.set("typeParameter",24),s.set("account",25),s.set("issue",26),s.set("tool",27),l.fromString=function(e,t){let i=s.get(e);return void 0!==i||t||(i=9),i},(h=w||(w={}))[h.Automatic=0]="Automatic",h[h.Explicit=1]="Explicit";class H{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return O.Q.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}(d=y||(y={}))[d.Code=1]="Code",d[d.Label=2]="Label";class V{static fromExtensionId(e){return new V(e,void 0,void 0)}constructor(e,t,i){this.extensionId=e,this.extensionVersion=t,this.providerId=i}toString(){let e="";return this.extensionId&&(e+=this.extensionId),this.extensionVersion&&(e+=`@${this.extensionVersion}`),this.providerId&&(e+=`:${this.providerId}`),0===e.length&&(e="unknown"),e}}function z(e){return e&&R.r.isUri(e.uri)&&O.Q.isIRange(e.range)&&(O.Q.isIRange(e.originSelectionRange)||O.Q.isIRange(e.targetSelectionRange))}(c=S||(S={}))[c.Accepted=0]="Accepted",c[c.Rejected=1]="Rejected",c[c.Ignored=2]="Ignored",(u=k||(k={}))[u.Automatic=0]="Automatic",u[u.PasteAs=1]="PasteAs",(g=x||(x={}))[g.Invoke=1]="Invoke",g[g.TriggerCharacter=2]="TriggerCharacter",g[g.ContentChange=3]="ContentChange",(p=L||(L={}))[p.Text=0]="Text",p[p.Read=1]="Read",p[p.Write=2]="Write";let U={17:(0,A.kg)(753,"array"),16:(0,A.kg)(754,"boolean"),4:(0,A.kg)(755,"class"),13:(0,A.kg)(756,"constant"),8:(0,A.kg)(757,"constructor"),9:(0,A.kg)(758,"enumeration"),21:(0,A.kg)(759,"enumeration member"),23:(0,A.kg)(760,"event"),7:(0,A.kg)(761,"field"),0:(0,A.kg)(762,"file"),11:(0,A.kg)(763,"function"),10:(0,A.kg)(764,"interface"),19:(0,A.kg)(765,"key"),5:(0,A.kg)(766,"method"),1:(0,A.kg)(767,"module"),2:(0,A.kg)(768,"namespace"),20:(0,A.kg)(769,"null"),15:(0,A.kg)(770,"number"),18:(0,A.kg)(771,"object"),24:(0,A.kg)(772,"operator"),3:(0,A.kg)(773,"package"),6:(0,A.kg)(774,"property"),14:(0,A.kg)(775,"string"),22:(0,A.kg)(776,"struct"),25:(0,A.kg)(777,"type parameter"),12:(0,A.kg)(778,"variable")};function j(e,t){return(0,A.kg)(779,"{0} ({1})",e,U[t])}m=D||(D={}),(o=new Map).set(0,T.W.symbolFile),o.set(1,T.W.symbolModule),o.set(2,T.W.symbolNamespace),o.set(3,T.W.symbolPackage),o.set(4,T.W.symbolClass),o.set(5,T.W.symbolMethod),o.set(6,T.W.symbolProperty),o.set(7,T.W.symbolField),o.set(8,T.W.symbolConstructor),o.set(9,T.W.symbolEnum),o.set(10,T.W.symbolInterface),o.set(11,T.W.symbolFunction),o.set(12,T.W.symbolVariable),o.set(13,T.W.symbolConstant),o.set(14,T.W.symbolString),o.set(15,T.W.symbolNumber),o.set(16,T.W.symbolBoolean),o.set(17,T.W.symbolArray),o.set(18,T.W.symbolObject),o.set(19,T.W.symbolKey),o.set(20,T.W.symbolNull),o.set(21,T.W.symbolEnumMember),o.set(22,T.W.symbolStruct),o.set(23,T.W.symbolEvent),o.set(24,T.W.symbolOperator),o.set(25,T.W.symbolTypeParameter),m.toIcon=function(e){let t=o.get(e);return t||(console.info("No codicon found for SymbolKind "+e),t=T.W.symbolProperty),t},(r=new Map).set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24),m.toCompletionKind=function(e){let t=r.get(e);return void 0===t&&(console.info("No completion kind found for SymbolKind "+e),t=20),t};class ${static{this.Comment=new $("comment")}static{this.Imports=new $("imports")}static{this.Region=new $("region")}static fromValue(e){switch(e){case"comment":return $.Comment;case"imports":return $.Imports;case"region":return $.Region}return new $(e)}constructor(e){this.value=e}}(f=I||(I={}))[f.AIGenerated=1]="AIGenerated",(_=N||(N={}))[_.Invoke=0]="Invoke",_[_.Automatic=1]="Automatic",(E||(E={})).is=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.title},(v=M||(M={}))[v.Type=1]="Type",v[v.Parameter=2]="Parameter";class K{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}let G=new P.d},39898:(e,t,i)=>{"use strict";i.d(t,{s:()=>s});var n=i(71974);class s{static whitespaceVisibleColumn(e,t,i){let s=e.length,o=0,r=-1,a=-1;for(let l=0;l<s;l++){if(l===t)return[r,a,o];switch(o%i==0&&(r=l,a=o),e.charCodeAt(l)){case 32:o+=1;break;case 9:o=n.A.nextRenderTabStop(o,i);break;default:return[-1,-1,-1]}}return t===s?[r,a,o]:[-1,-1,-1]}static atomicPosition(e,t,i,o){let r,a=e.length,[l,h,d]=s.whitespaceVisibleColumn(e,t,i);if(-1===d)return -1;switch(o){case 0:r=!0;break;case 1:r=!1;break;case 2:if(d%i==0)return t;r=d%i<=i/2}if(r){if(-1===l)return -1;let t=h;for(let s=l;s<a;++s){if(t===h+i)return l;switch(e.charCodeAt(s)){case 32:t+=1;break;case 9:t=n.A.nextRenderTabStop(t,i);break;default:return -1}}return t===h+i?l:-1}let c=n.A.nextRenderTabStop(d,i),u=d;for(let s=t;s<a;s++){if(u===c)return s;switch(e.charCodeAt(s)){case 32:u+=1;break;case 9:u=n.A.nextRenderTabStop(u,i);break;default:return -1}}return u===c?a:-1}}},40217:()=>{},40364:(e,t,i)=>{"use strict";i.d(t,{D8:()=>f,L:()=>y,Xe:()=>w,ZG:()=>b,ez:()=>_,i1:()=>m,is:()=>p,nI:()=>C,ug:()=>S});var n,s=i(86578),o=i(18805),r=i(17397),a=i(56046),l=i(46546),h=i(71244),d=i(49044),c=i(51328),u=i(69662),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}function m(e){return void 0!==e.submenu}class f{static{this._instances=new Map}static{this.CommandPalette=new f("CommandPalette")}static{this.DebugBreakpointsContext=new f("DebugBreakpointsContext")}static{this.DebugCallStackContext=new f("DebugCallStackContext")}static{this.DebugConsoleContext=new f("DebugConsoleContext")}static{this.DebugVariablesContext=new f("DebugVariablesContext")}static{this.NotebookVariablesContext=new f("NotebookVariablesContext")}static{this.DebugHoverContext=new f("DebugHoverContext")}static{this.DebugWatchContext=new f("DebugWatchContext")}static{this.DebugToolBar=new f("DebugToolBar")}static{this.DebugToolBarStop=new f("DebugToolBarStop")}static{this.DebugDisassemblyContext=new f("DebugDisassemblyContext")}static{this.DebugCallStackToolbar=new f("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new f("DebugCreateConfiguration")}static{this.EditorContext=new f("EditorContext")}static{this.SimpleEditorContext=new f("SimpleEditorContext")}static{this.EditorContent=new f("EditorContent")}static{this.EditorLineNumberContext=new f("EditorLineNumberContext")}static{this.EditorContextCopy=new f("EditorContextCopy")}static{this.EditorContextPeek=new f("EditorContextPeek")}static{this.EditorContextShare=new f("EditorContextShare")}static{this.EditorTitle=new f("EditorTitle")}static{this.CompactWindowEditorTitle=new f("CompactWindowEditorTitle")}static{this.EditorTitleRun=new f("EditorTitleRun")}static{this.EditorTitleContext=new f("EditorTitleContext")}static{this.EditorTitleContextShare=new f("EditorTitleContextShare")}static{this.EmptyEditorGroup=new f("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new f("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new f("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new f("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new f("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new f("EditorActionsPositionSubmenu")}static{this.EditorSplitMoveSubmenu=new f("EditorSplitMoveSubmenu")}static{this.ExplorerContext=new f("ExplorerContext")}static{this.ExplorerContextShare=new f("ExplorerContextShare")}static{this.ExtensionContext=new f("ExtensionContext")}static{this.ExtensionEditorContextMenu=new f("ExtensionEditorContextMenu")}static{this.GlobalActivity=new f("GlobalActivity")}static{this.CommandCenter=new f("CommandCenter")}static{this.CommandCenterCenter=new f("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new f("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new f("LayoutControlMenu")}static{this.MenubarMainMenu=new f("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new f("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new f("MenubarDebugMenu")}static{this.MenubarEditMenu=new f("MenubarEditMenu")}static{this.MenubarCopy=new f("MenubarCopy")}static{this.MenubarFileMenu=new f("MenubarFileMenu")}static{this.MenubarGoMenu=new f("MenubarGoMenu")}static{this.MenubarHelpMenu=new f("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new f("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new f("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new f("PanelAlignmentMenu")}static{this.PanelPositionMenu=new f("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new f("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new f("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new f("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new f("MenubarSelectionMenu")}static{this.MenubarShare=new f("MenubarShare")}static{this.MenubarSwitchEditorMenu=new f("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new f("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new f("MenubarTerminalMenu")}static{this.MenubarTerminalSuggestStatusMenu=new f("MenubarTerminalSuggestStatusMenu")}static{this.MenubarViewMenu=new f("MenubarViewMenu")}static{this.MenubarHomeMenu=new f("MenubarHomeMenu")}static{this.OpenEditorsContext=new f("OpenEditorsContext")}static{this.OpenEditorsContextShare=new f("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new f("ProblemsPanelContext")}static{this.SCMInputBox=new f("SCMInputBox")}static{this.SCMChangeContext=new f("SCMChangeContext")}static{this.SCMResourceContext=new f("SCMResourceContext")}static{this.SCMResourceContextShare=new f("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new f("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new f("SCMResourceGroupContext")}static{this.SCMSourceControl=new f("SCMSourceControl")}static{this.SCMSourceControlInline=new f("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new f("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new f("SCMHistoryTitle")}static{this.SCMHistoryItemContext=new f("SCMHistoryItemContext")}static{this.SCMHistoryItemChangeContext=new f("SCMHistoryItemChangeContext")}static{this.SCMHistoryItemHover=new f("SCMHistoryItemHover")}static{this.SCMHistoryItemRefContext=new f("SCMHistoryItemRefContext")}static{this.SCMQuickDiffDecorations=new f("SCMQuickDiffDecorations")}static{this.SCMTitle=new f("SCMTitle")}static{this.SearchContext=new f("SearchContext")}static{this.SearchActionMenu=new f("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new f("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new f("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new f("StickyScrollContext")}static{this.TestItem=new f("TestItem")}static{this.TestItemGutter=new f("TestItemGutter")}static{this.TestProfilesContext=new f("TestProfilesContext")}static{this.TestMessageContext=new f("TestMessageContext")}static{this.TestMessageContent=new f("TestMessageContent")}static{this.TestPeekElement=new f("TestPeekElement")}static{this.TestPeekTitle=new f("TestPeekTitle")}static{this.TestCallStack=new f("TestCallStack")}static{this.TestCoverageFilterItem=new f("TestCoverageFilterItem")}static{this.TouchBarContext=new f("TouchBarContext")}static{this.TitleBar=new f("TitleBar")}static{this.TitleBarContext=new f("TitleBarContext")}static{this.TitleBarTitleContext=new f("TitleBarTitleContext")}static{this.TunnelContext=new f("TunnelContext")}static{this.TunnelPrivacy=new f("TunnelPrivacy")}static{this.TunnelProtocol=new f("TunnelProtocol")}static{this.TunnelPortInline=new f("TunnelInline")}static{this.TunnelTitle=new f("TunnelTitle")}static{this.TunnelLocalAddressInline=new f("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new f("TunnelOriginInline")}static{this.ViewItemContext=new f("ViewItemContext")}static{this.ViewContainerTitle=new f("ViewContainerTitle")}static{this.ViewContainerTitleContext=new f("ViewContainerTitleContext")}static{this.ViewTitle=new f("ViewTitle")}static{this.ViewTitleContext=new f("ViewTitleContext")}static{this.CommentEditorActions=new f("CommentEditorActions")}static{this.CommentThreadTitle=new f("CommentThreadTitle")}static{this.CommentThreadActions=new f("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new f("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new f("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new f("CommentThreadCommentContext")}static{this.CommentTitle=new f("CommentTitle")}static{this.CommentActions=new f("CommentActions")}static{this.CommentsViewThreadActions=new f("CommentsViewThreadActions")}static{this.InteractiveToolbar=new f("InteractiveToolbar")}static{this.InteractiveCellTitle=new f("InteractiveCellTitle")}static{this.InteractiveCellDelete=new f("InteractiveCellDelete")}static{this.InteractiveCellExecute=new f("InteractiveCellExecute")}static{this.InteractiveInputExecute=new f("InteractiveInputExecute")}static{this.InteractiveInputConfig=new f("InteractiveInputConfig")}static{this.ReplInputExecute=new f("ReplInputExecute")}static{this.IssueReporter=new f("IssueReporter")}static{this.NotebookToolbar=new f("NotebookToolbar")}static{this.NotebookToolbarContext=new f("NotebookToolbarContext")}static{this.NotebookStickyScrollContext=new f("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new f("NotebookCellTitle")}static{this.NotebookCellDelete=new f("NotebookCellDelete")}static{this.NotebookCellInsert=new f("NotebookCellInsert")}static{this.NotebookCellBetween=new f("NotebookCellBetween")}static{this.NotebookCellListTop=new f("NotebookCellTop")}static{this.NotebookCellExecute=new f("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new f("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new f("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new f("NotebookDiffCellInputTitle")}static{this.NotebookDiffDocumentMetadata=new f("NotebookDiffDocumentMetadata")}static{this.NotebookDiffCellMetadataTitle=new f("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new f("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new f("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new f("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new f("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new f("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new f("NotebookKernelSource")}static{this.BulkEditTitle=new f("BulkEditTitle")}static{this.BulkEditContext=new f("BulkEditContext")}static{this.TimelineItemContext=new f("TimelineItemContext")}static{this.TimelineTitle=new f("TimelineTitle")}static{this.TimelineTitleContext=new f("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new f("TimelineFilterSubMenu")}static{this.AccountsContext=new f("AccountsContext")}static{this.SidebarTitle=new f("SidebarTitle")}static{this.PanelTitle=new f("PanelTitle")}static{this.AuxiliaryBarTitle=new f("AuxiliaryBarTitle")}static{this.TerminalInstanceContext=new f("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new f("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new f("TerminalNewDropdownContext")}static{this.TerminalTabContext=new f("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new f("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new f("TerminalStickyScrollContext")}static{this.WebviewContext=new f("WebviewContext")}static{this.InlineCompletionsActions=new f("InlineCompletionsActions")}static{this.InlineEditsActions=new f("InlineEditsActions")}static{this.NewFile=new f("NewFile")}static{this.MergeInput1Toolbar=new f("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new f("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new f("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new f("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new f("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new f("InlineEditToolbar")}static{this.ChatContext=new f("ChatContext")}static{this.ChatCodeBlock=new f("ChatCodeblock")}static{this.ChatCompareBlock=new f("ChatCompareBlock")}static{this.ChatMessageTitle=new f("ChatMessageTitle")}static{this.ChatHistory=new f("ChatHistory")}static{this.ChatWelcomeHistoryContext=new f("ChatWelcomeHistoryContext")}static{this.ChatMessageFooter=new f("ChatMessageFooter")}static{this.ChatExecute=new f("ChatExecute")}static{this.ChatExecuteSecondary=new f("ChatExecuteSecondary")}static{this.ChatInput=new f("ChatInput")}static{this.ChatInputSide=new f("ChatInputSide")}static{this.ChatModePicker=new f("ChatModePicker")}static{this.ChatEditingWidgetToolbar=new f("ChatEditingWidgetToolbar")}static{this.ChatEditingEditorContent=new f("ChatEditingEditorContent")}static{this.ChatEditingEditorHunk=new f("ChatEditingEditorHunk")}static{this.ChatEditingDeletedNotebookCell=new f("ChatEditingDeletedNotebookCell")}static{this.ChatInputAttachmentToolbar=new f("ChatInputAttachmentToolbar")}static{this.ChatEditingWidgetModifiedFilesToolbar=new f("ChatEditingWidgetModifiedFilesToolbar")}static{this.ChatInputResourceAttachmentContext=new f("ChatInputResourceAttachmentContext")}static{this.ChatInputSymbolAttachmentContext=new f("ChatInputSymbolAttachmentContext")}static{this.ChatInlineResourceAnchorContext=new f("ChatInlineResourceAnchorContext")}static{this.ChatInlineSymbolAnchorContext=new f("ChatInlineSymbolAnchorContext")}static{this.ChatMessageCheckpoint=new f("ChatMessageCheckpoint")}static{this.ChatMessageRestoreCheckpoint=new f("ChatMessageRestoreCheckpoint")}static{this.ChatEditingCodeBlockContext=new f("ChatEditingCodeBlockContext")}static{this.ChatTitleBarMenu=new f("ChatTitleBarMenu")}static{this.ChatAttachmentsContext=new f("ChatAttachmentsContext")}static{this.ChatToolOutputResourceToolbar=new f("ChatToolOutputResourceToolbar")}static{this.ChatTextEditorMenu=new f("ChatTextEditorMenu")}static{this.ChatToolOutputResourceContext=new f("ChatToolOutputResourceContext")}static{this.ChatMultiDiffContext=new f("ChatMultiDiffContext")}static{this.ChatSessionsMenu=new f("ChatSessionsMenu")}static{this.ChatConfirmationMenu=new f("ChatConfirmationMenu")}static{this.AccessibleView=new f("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new f("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new f("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new f("DiffEditorSelectionToolbar")}constructor(e){if(f._instances.has(e))throw TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);f._instances.set(e,this),this.id=e}}let _=(0,c.u1)("menuService");class v{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new v(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let i of e)i instanceof v&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}let b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new o.QT({merge:v.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(v.for(f.CommandPalette)),(0,r.lC)((0,r.s)(()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(v.for(f.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new a.w,this._menuItems.set(e,i));let n=i.push(t);return this._onDidChangeMenu.fire(v.for(e)),(0,r.lC)((0,r.s)(()=>{n(),this._onDidChangeMenu.fire(v.for(e))}))}appendMenuItems(e){let t=new r.Cm;for(let{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===f.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){let t=new Set;for(let i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};class C extends s.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let w=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,s,o,r,a){let h;if(this.hideActions=s,this.menuKeybinding=o,this._commandService=a,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"==typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&l.L.isThemeIcon(t.icon)&&(h=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}h||(h=l.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,s,void 0,r,a):void 0,this._options=i,this.class=h&&l.L.asClassName(h)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};w=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(5,d.fN),g(6,h.d)],w);class y{constructor(e){this.desc=e}}function S(e){let t=[],i=new e,{f1:n,menu:s,keybinding:o,...a}=i.desc;if(h.w.getCommand(a.id))throw Error(`Cannot register two commands with the same id: ${a.id}`);if(t.push(h.w.registerCommand({id:a.id,handler:(e,...t)=>i.run(e,...t),metadata:a.metadata??{description:i.desc.title}})),Array.isArray(s))for(let e of s)t.push(b.appendMenuItem(e.id,{command:{...a,precondition:null===e.precondition?void 0:a.precondition},...e}));else s&&t.push(b.appendMenuItem(s.id,{command:{...a,precondition:null===s.precondition?void 0:a.precondition},...s}));if(n&&(t.push(b.appendMenuItem(f.CommandPalette,{command:a,when:a.precondition})),t.push(b.addCommand(a))),Array.isArray(o))for(let e of o)t.push(u.f.registerKeybindingRule({...e,id:a.id,when:a.precondition?d.M$.and(a.precondition,e.when):e.when}));else o&&t.push(u.f.registerKeybindingRule({...o,id:a.id,when:a.precondition?d.M$.and(a.precondition,o.when):o.when}));return{dispose(){(0,r.AS)(t)}}}},40365:(e,t,i)=>{"use strict";i.d(t,{P:()=>c,k:()=>u});var n=i(17970),s=i(32563),o=i(71974),r=i(10902),a=i(63130),l=i(8582),h=i(89984),d=i(47576);class c extends a._{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.G)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new d.D7("Illegal value for lineNumber");let s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(s&&s.offSide),r=-2,a=-1,l=-2,h=-1,c=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){l=t,h=e;break}}}},u=-2,g=-1,p=-2,m=-1,f=e=>{if(-2===u){u=-1,g=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){u=t,g=e;break}}}if(-1!==p&&(-2===p||p<e-1)){p=-1,m=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){p=t,m=e;break}}}},_=0,v=!0,b=0,C=!0,w=0,y=0;for(let s=0;v||C;s++){let r=e-s,d=e+s;s>1&&(r<1||r<t)&&(v=!1),s>1&&(d>n||d>i)&&(C=!1),s>5e4&&(v=!1,C=!1);let p=-1;if(v&&r>=1){let e=this._computeIndentLevel(r-1);e>=0?(l=r-1,h=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(c(r),p=this._getIndentLevelForWhitespaceLine(o,a,h))}let S=-1;if(C&&d<=n){let e=this._computeIndentLevel(d-1);e>=0?(u=d-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(f(d),S=this._getIndentLevelForWhitespaceLine(o,g,m))}if(0===s){y=p;continue}if(1===s){if(d<=n&&S>=0&&y+1===S){v=!1,_=d,b=d,w=S;continue}if(r>=1&&p>=0&&p-1===y){C=!1,_=r,b=r,w=p;continue}if(_=e,b=e,0===(w=y))break}v&&(p>=w?_=r:v=!1),C&&(S>=w?b=d:C=!1)}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,o){let a,l=[];for(let i=e;i<=t;i++)l.push([]);let d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();if(i&&d.length>0){let s=(e<=i.lineNumber&&i.lineNumber<=t?d:this.textModel.bracketPairs.getBracketPairsInRange(r.Q.fromPositions(i)).toArray()).filter(e=>r.Q.strictContainsPosition(e.range,i));a=(0,n.Uk)(s,e=>!0)?.range}let c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new u;for(let i of d){if(!i.closingBracketRange)continue;let n=a&&i.range.equalsRange(a);if(!n&&!o.includeInactive)continue;let r=g.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,c)+(o.highlightActive&&n?" "+g.activeClassName:""),d=i.openingBracketRange.getStartPosition(),u=i.closingBracketRange.getStartPosition(),p=o.horizontalGuides===h.N6.Enabled||o.horizontalGuides===h.N6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){p&&l[i.range.startLineNumber-e].push(new h.TH(-1,i.openingBracketRange.getEndPosition().column,r,new h.pv(!1,u.column),-1,-1));continue}let m=this.getVisibleColumnFromPosition(u),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(f,m,i.minVisibleColumnIndentation+1),v=!1;s.HG(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))<i.closingBracketRange.startColumn-1&&(v=!0);let b=Math.max(d.lineNumber,e),C=Math.min(u.lineNumber,t),w=+!!v;for(let t=b;t<C+w;t++)l[t-e].push(new h.TH(_,-1,r,null,t===d.lineNumber?d.column:-1,t===u.lineNumber?u.column:-1));p&&(d.lineNumber>=e&&f>_&&l[d.lineNumber-e].push(new h.TH(_,-1,r,new h.pv(!1,d.column),-1,-1)),u.lineNumber<=t&&m>_&&l[u.lineNumber-e].push(new h.TH(_,-1,r,new h.pv(!v,u.column),-1,-1)))}for(let e of l)e.sort((e,t)=>e.visibleColumn-t.visibleColumn);return l}getVisibleColumnFromPosition(e){return o.A.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let i=this.textModel.getLineCount();if(e<1||e>i)throw Error("Illegal value for startLineNumber");if(t<1||t>i)throw Error("Illegal value for endLineNumber");let n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(s&&s.offSide),r=Array(t-e+1),a=-2,l=-1,h=-2,d=-1;for(let s=e;s<=t;s++){let t=s-e,c=this._computeIndentLevel(s-1);if(c>=0){a=s-1,l=c,r[t]=Math.ceil(c/n.indentSize);continue}if(-2===a){a=-1,l=-1;for(let e=s-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h<s-1)){h=-1,d=-1;for(let e=s;e<i;e++){let t=this._computeIndentLevel(e);if(t>=0){h=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,l,d)}return r}_getIndentLevelForWhitespaceLine(e,t,i){let n=this.textModel.getOptions();return -1===t||-1===i?0:t<i?1+Math.floor(t/n.indentSize):t===i?Math.ceil(i/n.indentSize):e?Math.ceil(i/n.indentSize):1+Math.floor(i/n.indentSize)}}class u{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,t,i){return this.getInlineClassNameOfLevel(i?t:e)}getInlineClassNameOfLevel(e){return`bracket-indent-guide lvl-${e%30}`}}},40375:(e,t,i)=>{"use strict";i.d(t,{I:()=>m,r:()=>h});var n=i(33128),s=i(18780);let o=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"object"==typeof e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,s,l=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=function(e,t){return e||t?e:"file"}(e,l),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t}(this.scheme,i||""),this.query=n||"",this.fragment=s||"",function(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!r.test(e.path))throw Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,l))}get fsPath(){return m(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return(void 0===t?t=this.scheme:null===t&&(t=""),void 0===i?i=this.authority:null===i&&(i=""),void 0===n?n=this.path:null===n&&(n=""),void 0===s?s=this.query:null===s&&(s=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment)?this:new c(t,i,n,s,o)}static parse(e,t=!1){let i=l.exec(e);return i?new c(i[2]||"",v(i[4]||""),v(i[5]||""),v(i[7]||""),v(i[9]||""),t):new c("","","","","")}static file(e){let t="";if(s.uF&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1]){let i=e.indexOf("/",2);-1===i?(t=e.substring(2),e="/"):(t=e.substring(2,i),e=e.substring(i)||"/")}return new c("file",t,e,"","")}static from(e,t){return new c(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){let i;if(!e.path)throw Error("[UriError]: cannot call joinPath on URI without path");return i=s.uF&&"file"===e.scheme?h.file(n.IN.join(m(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return f(this,e)}toJSON(){return this}static revive(e){if(!e)return e;{if(e instanceof h)return e;let t=new c(e);return t._formatted=e.external??null,t._fsPath=e._sep===d?e.fsPath??null:null,t}}}let d=s.uF?1:void 0;class c extends h{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(e=!1){return e?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let u={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,i){let n,s=-1;for(let o=0;o<e.length;o++){let r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));let t=u[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return -1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function p(e){let t;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=u[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function m(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&90>=e.path.charCodeAt(1)||e.path.charCodeAt(1)>=97&&122>=e.path.charCodeAt(1))&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s.uF&&(i=i.replace(/\//g,"\\")),i}function f(e,t){let i=t?p:g,n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+="/",n+="/"),o){let e=o.indexOf("@");if(-1!==e){let t=o.substr(0,e);o=o.substr(e+1),-1===(e=t.lastIndexOf(":"))?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}-1===(e=(o=o.toLowerCase()).lastIndexOf(":"))?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){let e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){let e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:g(l,!1,!1)),n}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,e=>(function e(t){try{return decodeURIComponent(t)}catch{if(t.length>3)return t.substr(0,3)+e(t.substr(3));return t}})(e)):e}},40380:()=>{},40514:(e,t,i)=>{"use strict";i.d(t,{E6:()=>c,Hw:()=>r,YN:()=>o,gf:()=>l,n9:()=>h,oq:()=>a,tu:()=>u,vp:()=>d});var n,s,o,r,a,l,h,d,c,u,g=i(60414);(o||(o={})).inspectTokensAction=g.kg(782,"Developer: Inspect Tokens"),(r||(r={})).gotoLineActionLabel=g.kg(783,"Go to Line/Column..."),(a||(a={})).helpQuickAccessActionLabel=g.kg(784,"Show all Quick Access Providers"),(n=l||(l={})).quickCommandActionLabel=g.kg(785,"Command Palette"),n.quickCommandHelp=g.kg(786,"Show And Run Commands"),(s=h||(h={})).quickOutlineActionLabel=g.kg(787,"Go to Symbol..."),s.quickOutlineByCategoryActionLabel=g.kg(788,"Go to Symbol by Category..."),(d||(d={})).editorViewAccessibleLabel=g.kg(789,"Editor content"),(c||(c={})).toggleHighContrast=g.kg(790,"Toggle High Contrast Theme"),(u||(u={})).bulkEditServiceSummary=g.kg(791,"Made {0} edits in {1} files")},40524:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});let n=(0,i(51328).u1)("environmentService")},40724:(e,t,i)=>{"use strict";i.d(t,{OL:()=>a,dg:()=>h,lw:()=>u});var n,s=i(24924),o=i(21040);let r=Symbol("TextModelEditSource");class a{constructor(e,t){this.metadata=e}toString(){return`${this.metadata.source}`}getType(){let e=this.metadata;switch(e.source){case"cursor":return e.kind;case"inlineCompletionAccept":return e.source+(e.$nes?":nes":"");case"unknown":return e.name||"unknown";default:return e.source}}toKey(e,t={}){return Object.entries(this.metadata).filter(([i,n])=>{let s=t[i];return void 0!==s?s:(i.match(/\$/g)||[]).length<=e&&null!=n&&""!==n}).map(([e,t])=>`${e}:${t}`).join("-")}}function l(e){return new a(e,r)}let h={unknown:e=>l({source:"unknown",name:e.name}),rename:()=>l({source:"rename"}),chatApplyEdits:e=>l({source:"Chat.applyEdits",$modelId:c(e.modelId),$extensionId:e.extensionId?.extensionId,$extensionVersion:e.extensionId?.version,$$languageId:e.languageId,$$sessionId:e.sessionId,$$requestId:e.requestId,$$mode:e.mode,$$codeBlockSuggestionId:e.codeBlockSuggestionId}),chatUndoEdits:()=>l({source:"Chat.undoEdits"}),chatReset:()=>l({source:"Chat.reset"}),inlineCompletionAccept:e=>l({source:"inlineCompletionAccept",$nes:e.nes,...d(e.providerId),$$requestUuid:e.requestUuid,$$languageId:e.languageId}),inlineCompletionPartialAccept:e=>l({source:"inlineCompletionPartialAccept",type:e.type,$nes:e.nes,...d(e.providerId),$$requestUuid:e.requestUuid,$$languageId:e.languageId}),inlineChatApplyEdit:e=>l({source:"inlineChat.applyEdits",$modelId:c(e.modelId),$extensionId:e.extensionId?.extensionId,$extensionVersion:e.extensionId?.version,$$requestId:e.requestId,$$languageId:e.languageId}),reloadFromDisk:()=>l({source:"reloadFromDisk"}),cursor:e=>l({source:"cursor",kind:e.kind,detailedSource:e.detailedSource}),setValue:()=>l({source:"setValue"}),eolChange:()=>l({source:"eolChange"}),applyEdits:()=>l({source:"applyEdits"}),snippet:()=>l({source:"snippet"}),suggest:e=>l({source:"suggest",...d(e.providerId)}),codeAction:e=>l({source:"codeAction",$kind:e.kind,...d(e.providerId)})};function d(e){return e?{$extensionId:e.extensionId,$extensionVersion:e.extensionVersion,$providerId:e.providerId}:{}}function c(e){if(void 0!==e)return e.replaceAll("/","|")}class u{static fromText(e){return new u(o.W.ofText(e).lineCount,0,e.length,0)}static tryCreate(e,t,i,n){if(void 0!==e&&void 0!==t&&void 0!==i&&void 0!==n)return new u(e,t,i,n)}constructor(e,t,i,n){this.linesAdded=e,this.linesRemoved=t,this.charsAdded=i,this.charsRemoved=n}}(n||(n={})).newId=function(){return(0,s.t)("sgt")}},41132:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n,s,o,r=i(32563);(n=o||(o={}))[n.Ignore=0]="Ignore",n[n.Info=1]="Info",n[n.Warning=2]="Warning",n[n.Error=3]="Error",(s=o||(o={})).fromValue=function(e){return e?r.Q_("error",e)?s.Error:r.Q_("warning",e)||r.Q_("warn",e)?s.Warning:r.Q_("info",e)?s.Info:s.Ignore:s.Ignore},s.toString=function(e){switch(e){case s.Error:return"error";case s.Warning:return"warning";case s.Info:return"info";default:return"ignore"}};let a=o},41748:(e,t,i)=>{"use strict";let n;i.d(t,{jM:()=>d.j,BK:()=>N,XL:()=>a.XL,fL:()=>a.fL,fm:()=>v,Z7:()=>y,Y:()=>C,zL:()=>b,yC:()=>w,lk:()=>G,pl:()=>W,un:()=>k,t:()=>ee,a0:()=>I,nb:()=>D,ZX:()=>z,C:()=>L,dQ:()=>x,X2:()=>g,YY:()=>a.YY,Rl:()=>U,y0:()=>O,eP:()=>P,Yd:()=>F,yQ:()=>Q,FY:()=>c,Zh:()=>f,OI:()=>H,jv:()=>$,fW:()=>K,lp:()=>Z,fT:()=>J,yi:()=>X,PO:()=>a.PO,Rn:()=>a.Rn,oJ:()=>R});var s,o=i(4360),r=i(12338),a=i(20020),l=i(16891),h=i(97375),d=i(69048);function c(e,t,i=d.j.ofCaller()){return new u("string"==typeof e?new o.nA(void 0,e,void 0):new o.nA(e,void 0,void 0),t,r.nx,i)}class u extends l.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._value=t,(0,h.tZ)()?.handleObservableUpdated(this,{hadValue:!1,newValue:t,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new a.XL(()=>{},()=>`Setting ${this.debugName}`));try{let n=this._value;for(let s of(this._setValue(e),(0,h.tZ)()?.handleObservableUpdated(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0}),this._observers))t.updateObserver(s,this),s.handleChange(this,i)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}}function g(e,t,i=d.j.ofCaller()){return new p("string"==typeof e?new o.nA(void 0,e,void 0):new o.nA(e,void 0,void 0),t,r.nx,i)}class p extends u{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}class m extends l.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas)for(let t of((0,h.tZ)()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))t.handleChange(this,e);this._deltas.length=0}else for(let e of((0,h.tZ)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter)for(let e of(this._update(),[...this._observers]))e.endUpdate(this)}addObserver(e){let t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new a.XL(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(let e of this._observers)e.handlePossibleChange(this)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function f(e,t,i=d.j.ofCaller()){return e.lazy?new m(new o.nA(e.owner,e.debugName,void 0),t,e.equalsFn??r.nx,i):new u(new o.nA(e.owner,e.debugName,void 0),t,e.equalsFn??r.nx,i)}class _{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this._changeTracker=i,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,h.tZ)()?.handleAutorunCreated(this,n),this._run(),(0,r.Ay)(this)}dispose(){if(!this._disposed){for(let e of(this._disposed=!0,this._dependencies))e.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&this._store.dispose(),void 0!==this._delayedStore&&this._delayedStore.dispose(),(0,h.tZ)()?.handleAutorunDisposed(this),(0,r.VD)(this)}}_run(){let e=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=e,this._state=3;try{if(!this._disposed){(0,h.tZ)()?.handleAutorunStarted(this);let e=this._changeSummary,t=this._delayedStore;void 0!==t&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,e),this._changeSummary=this._changeTracker.createChangeSummary(e)),void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._runFn(this,e)}catch(e){(0,r.y4)(e)}finally{this._isRunning=!1,void 0!==t&&t.dispose()}}}finally{for(let e of(this._disposed||(0,h.tZ)()?.handleAutorunFinished(this),this._dependenciesToBeRemoved))e.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(e){3===this._state&&(this._state=1),this._updateCount++}endUpdate(e){try{if(1===this._updateCount)do{if(1===this._state){for(let e of(this._state=3,this._dependencies))if(e.reportChanges(),2===this._state)break}3!==this._state&&this._run()}while(3!==this._state)}finally{this._updateCount--}(0,r.Ft)(()=>this._updateCount>=0)}handlePossibleChange(e){3===this._state&&this._isDependency(e)&&(this._state=1)}handleChange(e,t){if(this._isDependency(e)){(0,h.tZ)()?.handleAutorunDependencyChanged(this,e,t);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:t,didChange:t=>t===e},this._changeSummary))&&(this._state=2)}catch(e){(0,r.y4)(e)}}}_isDependency(e){return this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)}_ensureNoRunning(){if(!this._isRunning)throw new r.D7("The reader object cannot be used outside its compute function!")}readObservable(e){if(this._ensureNoRunning(),this._disposed)return e.get();e.addObserver(this);let t=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),t}get store(){if(this._ensureNoRunning(),this._disposed)throw new r.D7("Cannot access store after dispose");return void 0===this._store&&(this._store=new r.Cm),this._store}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:function(e){switch(e){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}}function v(e,t=d.j.ofCaller()){return new _(new o.nA(void 0,void 0,e),e,void 0,t)}function b(e,t,i=d.j.ofCaller()){return new _(new o.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,i)}function C(e,t,i=d.j.ofCaller()){return new _(new o.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.changeTracker,i)}function w(e){let t=new r.Cm,i=b({owner:void 0,debugName:void 0,debugReferenceFn:e},i=>{t.clear(),e(i,t)});return(0,r.s)(()=>{i.dispose(),t.dispose()})}function y(e,t){let i;return b({debugReferenceFn:t},n=>{let s=e.read(n),o=i;i=s,t({lastValue:o,newValue:s})})}var S=i(46754);function k(e,t,i=d.j.ofCaller()){return void 0!==t?new S.w(new o.nA(e,void 0,t),t,void 0,void 0,r.nx,i):new S.w(new o.nA(void 0,void 0,e),e,void 0,void 0,r.nx,i)}function x(e,t,i,n=d.j.ofCaller()){return new S.P(new o.nA(e,void 0,t),t,void 0,void 0,r.nx,i,n)}function L(e,t,i=d.j.ofCaller()){return new S.w(new o.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,e.onLastObserverRemoved,e.equalsFn??r.nx,i)}function D(e,t,i=d.j.ofCaller()){return new S.w(new o.nA(e.owner,e.debugName,void 0),t,e.changeTracker,void 0,e.equalityComparer??r.nx,i)}function I(e,t,i=d.j.ofCaller()){let n,s,a;return void 0===t?(n=e,s=void 0):(s=e,n=t),new S.w(new o.nA(s,void 0,n),e=>{a?a.clear():a=new r.Cm;let t=n(e);return t&&a.add(t),t},void 0,()=>{a&&(a.dispose(),a=void 0)},r.nx,i)}(0,l.N2)(L);class N{constructor(e){this._value=c(this,void 0),this.promiseResult=this._value,this.promise=e.then(e=>((0,a.Rn)(t=>{this._value.set(new E(e,void 0),t)}),e),e=>{throw(0,a.Rn)(t=>{this._value.set(new E(void 0,e),t)}),e})}}class E{constructor(e,t){this.data=e,this.error=t}getDataOrThrow(){if(this.error)throw this.error;return this.data}}var M=i(47576),T=i(75200);function R(e,t,i,n){return t||(t=e=>null!=e),new Promise((s,o)=>{let r=!0,a=!1,l=e.map(e=>({isFinished:t(e),error:!!i&&i(e),state:e})),h=v(e=>{let{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:h.dispose(),i?o(!0===i?n:i):s(n))});if(n){let e=n.onCancellationRequested(()=>{h.dispose(),e.dispose(),o(new M.AL)});if(n.isCancellationRequested){h.dispose(),e.dispose(),o(new M.AL);return}}r=!1,a&&h.dispose()})}function O(...e){let t,i,n,s;return 2===e.length?[i,n]=e:[t,i,n,s]=e,new A(new o.nA(t,void 0,n),i,n,()=>A.globalTransaction,r.nx,s??d.j.ofCaller())}function P(e,t,i,n=d.j.ofCaller()){return new A(new o.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,()=>A.globalTransaction,e.equalsFn??r.nx,n)}class A extends l.ZK{constructor(e,t,i,n,s,o){super(o),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=s,this._hasValue=!1,this.handleEvent=e=>{let t=this._getValue(e),i=this._value,n=!this._hasValue||!this._equalityComparator(i,t),s=!1;n&&(this._value=t,this._hasValue&&(s=!0,(0,a.PO)(this._getTransaction(),e=>{for(let s of((0,h.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue}),this._observers))e.updateObserver(s,this),s.handleChange(this,void 0)},()=>{let e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this._hasValue=!0),s||(0,h.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}}function F(e,t=d.j.ofCaller()){return"string"==typeof e?new B(e,void 0,t):new B(void 0,e,t)}(s=O||(O={})).Observer=A,s.batchEventsGlobally=function(e,t){let i=!1;void 0===A.globalTransaction&&(A.globalTransaction=e,i=!0);try{t()}finally{i&&(A.globalTransaction=void 0)}};class B extends l.ZK{get debugName(){return new o.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t,i){super(i),this._debugName=e,this._owner=t}trigger(e,t){if(!e)return void(0,a.Rn)(e=>{this.trigger(e,t)},()=>`Trigger signal ${this.debugName}`);for(let i of this._observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function W(e,t){let i,n,s=!1;return O(o=>{let r=v(r=>{let a=e.read(r);s?(i&&clearTimeout(i),i=setTimeout(()=>{n=a,o()},t)):(s=!0,n=a)});return{dispose(){r.dispose(),s=!1,n=void 0}}},()=>s?n:e.get())}function H(e,t){let i=new V(!0,t);e.addObserver(i);try{i.beginUpdate(e)}finally{i.endUpdate(e)}return(0,r.s)(()=>{e.removeObserver(i)})}(0,l.FB)(function(e){let t=new V(!1,void 0);return e.addObserver(t),(0,r.s)(()=>{e.removeObserver(t)})}),(0,l.Bm)(H);class V{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){1===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges()),this._counter--}handlePossibleChange(e){}handleChange(e,t){}}function z(e,t){let i;return L({owner:e,debugReferenceFn:t},e=>i=t(e,i))}function U(e,t,i,n){let s=new j(i,n);return L({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{s.dispose(),s=new j(i)}},e=>(s.setItems(t.read(e)),s.getItems()))}class j{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let t=[],i=new Set(this._cache.keys());for(let n of e){let e=this._keySelector?this._keySelector(n):n,s=this._cache.get(e);if(s)i.delete(e);else{let t=new r.Cm;s={out:this._map(n,t),store:t},this._cache.set(e,s)}t.push(s.out)}for(let e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function $(e){return{createChangeSummary:e=>({changes:[]}),handleChange(t,i){for(let n in e)t.didChange(e[n])&&i.changes.push({key:n,change:t.change});return!0},beforeUpdate(t,i){for(let n in e){if("changes"===n)throw new r.D7('property name "changes" is reserved for change tracking');i[n]=e[n].read(t)}}}}function K(e){let t;return{createChangeSummary:e=>({changes:[]}),handleChange(i,n){for(let s in t||(t=e()),t)i.didChange(t[s])&&n.changes.push({key:s,change:i.change});return!0},beforeUpdate(i,n){for(let s in t||(t=e()),t){if("changes"===s)throw new r.D7('property name "changes" is reserved for change tracking');n[s]=t[s].read(i)}}}}function G(e){return new q(e)}class q extends l.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Q(e,t,i=d.j.ofCaller()){return new Y("string"==typeof e?e:new o.nA(e,void 0,void 0),t,i)}class Y extends l.ZK{constructor(e,t,i){super(i),this.event=t,this.handleEvent=()=>{(0,a.Rn)(e=>{for(let t of this._observers)e.updateObserver(t,this),t.handleChange(this,void 0)},()=>this.debugName)},this.debugName="string"==typeof e?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Z(e,t){var i,n;let s,o,a,l=!0;return i={changeTracker:{createChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){let e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}}},n=(i,n)=>{let s=e.read(i),o=a;n.didChange&&(a=s,t(s,o,n.deltas)),l&&(l=!1,a=s)},s=new r.Cm,o=C({owner:i.owner,debugName:i.debugName,debugReferenceFn:i.debugReferenceFn??n,changeTracker:i.changeTracker},(e,t)=>{s.clear(),n(e,t,s)}),(0,r.s)(()=>{o.dispose(),s.dispose()})}function X(e,t){let i=new r.Cm,n=Z(e,(e,n,s)=>{i.clear(),t(e,n,s,i)});return{dispose(){n.dispose(),i.dispose()}}}function J(e,t){return X(e,(e,i,n,s)=>{t(e,i,n,(0,T.bs)(s))})}function ee(e,t){return z(e,(e,i)=>i??t(e))}class et{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}addFilteredObj(e){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(e)}_isIncluded(e){return this._filteredObjects?.has(e)??!0}textToConsoleArgs(e){var t;let i,n,s,o;return t=[ei(function(e,t){let i="";for(let e=1;e<=t;e++)i+="| ";return i}("| ",this.indentation)),e],i=[],n=[],s="",!function e(t){if("length"in t)for(let i of t)i&&e(i);else"text"in t?(s+=`%c${t.text}`,i.push(t.style),t.data&&n.push(...t.data)):"data"in t&&n.push(...t.data)}(t),(o=[s,...i]).push(...n),o}formatInfo(e){return e.hadValue?e.didChange?[ei(" "),es(eo(e.oldValue,70),{color:"red",strikeThrough:!0}),ei(" "),es(eo(e.newValue,60),{color:"green"})]:[ei(" (unchanged)")]:[ei(" "),es(eo(e.newValue,60),{color:"green"}),ei(" (initial)")]}handleObservableCreated(e){e instanceof S.w&&this.changedObservablesSets.set(e,new Set)}handleOnListenerCountChanged(e,t){}handleObservableUpdated(e,t){if(this._isIncluded(e)){if(e instanceof S.w)return void this._handleDerivedRecomputed(e,t);console.log(...this.textToConsoleArgs([en("observable value changed"),es(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}}formatChanges(e){if(0!==e.size)return es(" (changed deps: "+[...e].map(e=>e.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e)?.add(t)}_handleDerivedRecomputed(e,t){if(!this._isIncluded(e))return;let i=this.changedObservablesSets.get(e);i&&(console.log(...this.textToConsoleArgs([en("derived recomputed"),es(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear())}handleDerivedCleared(e){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([en("derived cleared"),es(e.debugName,{color:"BlueViolet"})]))}handleAutorunCreated(e){this._isIncluded(e)&&this.changedObservablesSets.set(e,new Set)}handleAutorunDisposed(e){}handleAutorunDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e).add(t)}handleAutorunStarted(e){let t=this.changedObservablesSets.get(e);t&&(this._isIncluded(e)&&console.log(...this.textToConsoleArgs([en("autorun"),es(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++)}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),this._isIncluded(e)&&console.log(...this.textToConsoleArgs([en("transaction"),es(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function ei(e){return es(e,{color:"black"})}function en(e){return es(function(e,t){for(;e.length<10;)e+=" ";return e}(`${e}: `,10),{color:"black",bold:!0})}function es(e,t={color:"black"}){let i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:Object.entries(i).reduce((e,[t,i])=>`${e}${t}:${i};`,"")}}function eo(e,t){switch(typeof e){case"number":default:return""+e;case"string":if(e.length+2<=t)return`"${e}"`;return`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":if(null===e)return"null";if(Array.isArray(e)){var i=e,n=t;let s="[ ",o=!0;for(let e of i){if(o||(s+=", "),s.length-5>n){s+="...";break}o=!1,s+=`${eo(e,n-s.length)}`}return s+" ]"}var s=e,r=t;if("function"==typeof s.toString&&s.toString!==Object.prototype.toString){let e=s.toString();return e.length<=r?e:e.substring(0,r-3)+"..."}let a=(0,o.uB)(s),l=a?a+"(":"{ ",h=!0;for(let[e,t]of Object.entries(s)){if(h||(l+=", "),l.length-5>r){l+="...";break}h=!1,l+=`${e}: ${eo(t,r-l.length)}`}return l+(a?")":" }");case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}class er{static createClient(e,t){return new er(e,t)}constructor(e,t){this._channelFactory=e,this._getHandler=t,this._channel=this._channelFactory({handleNotification:e=>{let t=this._getHandler().notifications[e[0]];if(!t)throw Error(`Unknown notification "${e[0]}"!`);t(...e[1])},handleRequest:e=>{try{let t=this._getHandler().requests[e[0]](...e[1]);return{type:"result",value:t}}catch(e){return{type:"error",value:e}}}});const i=new Proxy({},{get:(e,t)=>async(...e)=>{let i=await this._channel.sendRequest([t,e]);if("error"!==i.type)return i.value;throw i.value}}),n=new Proxy({},{get:(e,t)=>(...e)=>{this._channel.sendNotification([t,e])}});this.api={notifications:n,requests:i}}}class ea{constructor(){this._timeout=void 0}throttle(e,t){void 0===this._timeout&&(this._timeout=setTimeout(()=>{this._timeout=void 0,e()},t))}dispose(){void 0!==this._timeout&&clearTimeout(this._timeout)}}var el=i(24244);class eh{static{this._instance=void 0}static getInstance(){return void 0===eh._instance&&(eh._instance=new eh),eh._instance}getTransactionState(){let e=[],t=[...this._activeTransactions];if(0===t.length)return;let i=t.flatMap(e=>e.debugGetUpdatingObservers()??[]).map(e=>e.observer),n=new Set;for(;i.length>0;){let t=i.shift();if(n.has(t))continue;n.add(t);let s=this._getInfo(t,e=>{n.has(e)||i.push(e)});s&&e.push(s)}return{names:t.map(e=>e.getDebugName()??"tx"),affected:e}}_getObservableInfo(e){let t=this._instanceInfos.get(e);return t||void(0,M.dz)(new M.D7("No info found"))}_getAutorunInfo(e){let t=this._instanceInfos.get(e);return t||void(0,M.dz)(new M.D7("No info found"))}_getInfo(e,t){if(e instanceof S.w){for(let i of[...e.debugGetObservers()])t(i);let i=this._getObservableInfo(e);if(!i)return;let n=e.debugGetState(),s={name:e.debugName,instanceId:i.instanceId,updateCount:n.updateCount},o=[...i.changedObservables].map(e=>this._instanceInfos.get(e)?.instanceId).filter(el.O9);if(n.isComputing)return{...s,type:"observable/derived",state:"updating",changedDependencies:o,initialComputation:!1};switch(n.state){case 0:return{...s,type:"observable/derived",state:"noValue"};case 3:return{...s,type:"observable/derived",state:"upToDate"};case 2:return{...s,type:"observable/derived",state:"stale",changedDependencies:o};case 1:return{...s,type:"observable/derived",state:"possiblyStale"}}}else if(e instanceof _){let t=this._getAutorunInfo(e);if(!t)return;let i={name:e.debugName,instanceId:t.instanceId,updateCount:t.updateCount},n=[...t.changedObservables].map(e=>this._instanceInfos.get(e).instanceId);if(e.debugGetState().isRunning)return{...i,type:"autorun",state:"updating",changedDependencies:n};switch(e.debugGetState().state){case 3:return{...i,type:"autorun",state:"upToDate"};case 2:return{...i,type:"autorun",state:"stale",changedDependencies:n};case 1:return{...i,type:"autorun",state:"possiblyStale"}}}}_formatObservable(e){let t=this._getObservableInfo(e);if(t)return{name:e.debugName,instanceId:t.instanceId}}_formatObserver(e){if(e instanceof S.w)return{name:e.toString(),instanceId:this._getObservableInfo(e)?.instanceId};let t=this._getAutorunInfo(e);if(t)return{name:e.toString(),instanceId:t.instanceId}}constructor(){this._declarationId=0,this._instanceId=0,this._declarations=new Map,this._instanceInfos=new WeakMap,this._aliveInstances=new Map,this._activeTransactions=new Set,this._channel=function(e,t){var i;let n,s,o,r=globalThis,a=[],{channel:l,handler:h}=(i={sendNotification:e=>{s?s.sendNotification(e):a.push(e)}},{channel:e=>(n=e,{sendNotification:e=>{i.sendNotification(e)},sendRequest:e=>{throw Error("not supported")}}),handler:{handleRequest:e=>"notification"===e.type?n?.handleNotification(e.data):n?.handleRequest(e.data)}});return(r.$$debugValueEditor_debugChannels??(r.$$debugValueEditor_debugChannels={}))[e]=e=>{for(let i of(o=t(),s=e,a))e.sendNotification(i);return a=[],h},er.createClient(l,()=>{if(!o)throw Error("Not supported");return o})}("observableDevTools",()=>({notifications:{setDeclarationIdFilter:e=>{},logObservableValue:e=>{console.log("logObservableValue",e)},flushUpdates:()=>{this._flushUpdates()},resetUpdates:()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)}},requests:{getDeclarations:()=>{let e={};for(let t of this._declarations.values())e[t.id]=t;return{decls:e}},getSummarizedInstances:()=>null,getObservableValueInfo:e=>({observers:[...this._aliveInstances.get(e).debugGetObservers()].map(e=>this._formatObserver(e)).filter(el.O9)}),getDerivedInfo:e=>{let t=this._aliveInstances.get(e);return{dependencies:[...t.debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(el.O9),observers:[...t.debugGetObservers()].map(e=>this._formatObserver(e)).filter(el.O9)}},getAutorunInfo:e=>({dependencies:[...this._aliveInstances.get(e).debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(el.O9)}),getTransactionState:()=>this.getTransactionState(),setValue:(e,t)=>{let i=this._aliveInstances.get(e);if(i instanceof S.w)i.debugSetValue(t);else if(i instanceof u)i.debugSetValue(t);else if(i instanceof A)i.debugSetValue(t);else throw new M.D7("Observable is not supported");let n=[...i.debugGetObservers()];for(let e of n)e.beginUpdate(i);for(let e of n)e.handleChange(i,void 0);for(let e of n)e.endUpdate(i)},getValue:e=>{let t=this._aliveInstances.get(e);return t instanceof S.w||t instanceof u?eo(t.debugGetState().value,200):void 0},logValue:e=>{let t=this._aliveInstances.get(e);if(t&&"get"in t)console.log("Logged Value:",t.get());else throw new M.D7("Observable is not supported")},rerun:e=>{let t=this._aliveInstances.get(e);if(t instanceof S.w)t.debugRecompute();else if(t instanceof _)t.debugRerun();else throw new M.D7("Observable is not supported")}}})),this._pendingChanges=null,this._changeThrottler=new ea,this._fullState={},this._flushUpdates=()=>{null!==this._pendingChanges&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)},d.j.enable()}_handleChange(e){!function e(t,i){for(let n in i)null===i[n]?delete t[n]:t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._fullState,e),null===this._pendingChanges?this._pendingChanges=e:function e(t,i){for(let n in i)t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._pendingChanges,e),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(e,t){if(!t)return -1;let i=this._declarations.get(t.id);return void 0===i&&(i={id:this._declarationId++,type:e,url:t.fileName,line:t.line,column:t.column},this._declarations.set(t.id,i),this._handleChange({decls:{[i.id]:i}})),i.id}handleObservableCreated(e,t){let i={declarationId:this._getDeclarationId("observable/value",t),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i)}handleOnListenerCountChanged(e,t){let i=this._getObservableInfo(e);if(i){if(0===i.listenerCount&&t>0){let t=e instanceof S.w?"observable/derived":"observable/value";this._aliveInstances.set(i.instanceId,e),this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,formattedValue:i.lastValue,type:t,name:e.debugName}}})}else i.listenerCount>0&&0===t&&(this._handleChange({instances:{[i.instanceId]:null}}),this._aliveInstances.delete(i.instanceId));i.listenerCount=t}}handleObservableUpdated(e,t){if(e instanceof S.w)return void this._handleDerivedRecomputed(e,t);let i=this._getObservableInfo(e);i&&t.didChange&&(i.lastValue=eo(t.newValue,30),i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:i.lastValue}}}))}handleAutorunCreated(e,t){let i={declarationId:this._getDeclarationId("autorun",t),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i),this._aliveInstances.set(i.instanceId,e),i&&this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,runCount:0,type:"autorun",name:e.debugName}}})}handleAutorunDisposed(e){let t=this._getAutorunInfo(e);t&&(this._handleChange({instances:{[t.instanceId]:null}}),this._instanceInfos.delete(e),this._aliveInstances.delete(t.instanceId))}handleAutorunDependencyChanged(e,t,i){let n=this._getAutorunInfo(e);n&&n.changedObservables.add(t)}handleAutorunStarted(e){}handleAutorunFinished(e){let t=this._getAutorunInfo(e);t&&(t.changedObservables.clear(),t.updateCount++,this._handleChange({instances:{[t.instanceId]:{runCount:t.updateCount}}}))}handleDerivedDependencyChanged(e,t,i){let n=this._getObservableInfo(e);n&&n.changedObservables.add(t)}_handleDerivedRecomputed(e,t){let i=this._getObservableInfo(e);if(!i)return;let n=eo(t.newValue,30);i.updateCount++,i.changedObservables.clear(),i.lastValue=n,i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:n,recomputationCount:i.updateCount}}})}handleDerivedCleared(e){let t=this._getObservableInfo(e);t&&(t.lastValue=void 0,t.changedObservables.clear(),t.listenerCount>0&&this._handleChange({instances:{[t.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(e){this._activeTransactions.add(e)}handleEndTransaction(e){this._activeTransactions.delete(e)}}var ed=i(89428);class ec{static from(e,t){if(e instanceof _){let i=e.debugGetState();return new ec(e,t(e.debugName),"autorun",void 0,i.stateStr,Array.from(i.dependencies).map(e=>ec.from(e,t)||ec.unknown(e)))}if(e instanceof S.w){let i=e.debugGetState();return new ec(e,t(e.debugName),"derived",i.value,i.stateStr,Array.from(i.dependencies).map(e=>ec.from(e,t)||ec.unknown(e)))}if(e instanceof u){let i=e.debugGetState();return new ec(e,t(e.debugName),"observableValue",i.value,"upToDate",[])}if(e instanceof A){let i=e.debugGetState();return new ec(e,t(e.debugName),"fromEvent",i.value,i.hasValue?"upToDate":"initial",[])}}static unknown(e){return new ec(e,"(unknown)","unknown",void 0,"unknown",[])}constructor(e,t,i,n,s,o){this.sourceObj=e,this.name=t,this.type=i,this.value=n,this.state=s,this.dependencies=o}}(0,l.u5)(function(e,t){let i=t?.debugNamePostProcessor??(e=>e),n=ec.from(e,i);return n?(function e(t,i,n){let s=" ".repeat(i),o=[];if(n.has(t.sourceObj))return o.push(`${s}* ${t.type} ${t.name} (already listed)`),o.join("\n");if(n.add(t.sourceObj),o.push(`${s}* ${t.type} ${t.name}:`),o.push(`${s} value: ${eo(t.value,50)}`),o.push(`${s} state: ${t.state}`),t.dependencies.length>0)for(let r of(o.push(`${s} dependencies:`),t.dependencies))o.push(e(r,i+1,n));return o.join("\n")})(n,0,new Set).trim():""}),(0,h.YQ)(function(e){n||(n=new et,(0,h.EJ)(n)),n.addFilteredObj(e)}),ed._K&&ed._K.VSCODE_DEV_DEBUG_OBSERVABLES&&(0,h.EJ)(eh.getInstance())},41949:()=>{},42452:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});class n{constructor(e,t,i,n,s,o,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},42748:(e,t,i)=>{"use strict";i.d(t,{FW:()=>l,Zv:()=>s,dG:()=>r,z5:()=>h});var n=i(47576);function s(e,t){if("number"==typeof e){if(0===e)return null;let i=(65535&e)>>>0,n=(0xffff0000&e)>>>16;return new a(0!==n?[o(i,t),o(n,t)]:[o(i,t)])}{let i=[];for(let n=0;n<e.length;n++)i.push(o(e[n],t));return new a(i)}}function o(e,t){let i=!!(2048&e),n=!!(256&e);return new r(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class r{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof r&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.Qg)("chords");this.chords=e}}class l{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class h{}},43524:(e,t,i)=>{"use strict";let n,s;i.d(t,{DR:()=>p,cj:()=>a,oc:()=>l});var o,r,a,l,h=i(41132),d=i(60414),c=i(51328);(o=a||(a={}))[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error",(r=a||(a={})).compare=function(e,t){return t-e},(n=Object.create(null))[r.Error]=(0,d.kg)(1715,"Error"),n[r.Warning]=(0,d.kg)(1716,"Warning"),n[r.Info]=(0,d.kg)(1717,"Info"),r.toString=function(e){return n[e]||""},(s=Object.create(null))[r.Error]=(0,d.kg)(1718,"Errors"),s[r.Warning]=(0,d.kg)(1719,"Warnings"),s[r.Info]=(0,d.kg)(1720,"Infos"),r.toStringPlural=function(e){return s[e]||""},r.fromSeverity=function(e){switch(e){case h.A.Error:return r.Error;case h.A.Warning:return r.Warning;case h.A.Info:return r.Info;case h.A.Ignore:return r.Hint}},r.toSeverity=function(e){switch(e){case r.Error:return h.A.Error;case r.Warning:return h.A.Warning;case r.Info:return h.A.Info;case r.Hint:return h.A.Ignore}};var u=l||(l={});function g(e,t){let i=[""];return e.source?i.push(e.source.replace("\xa6","\\\xa6")):i.push(""),e.code?"string"==typeof e.code?i.push(e.code.replace("\xa6","\\\xa6")):i.push(e.code.value.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.severity&&null!==e.severity?i.push(a.toString(e.severity)):i.push(""),e.message&&t?i.push(e.message.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(""),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(""),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(""),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(""),i.push(""),i.join("\xa6")}u.makeKey=function(e){return g(e,!0)},u.makeKeyOptionalMessage=g;let p=(0,c.u1)("markerService")},44221:(e,t,i)=>{"use strict";i.d(t,{T:()=>g,i:()=>p});var n,s=i(60749),o=i(98194),r=i(47576),a=i(49468),l=i(12401),h=i(84906),d=i(22281),c=i(89314);i(62401);var u=function(e,t){return function(i,n){t(i,n,e)}};let g=class{static{n=this}static{this._ttpTokenizer=(0,o.H)("tokenizeToString",{createHTML:e=>e})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i}render(e,t,i){let n=(0,s.Gc)(e,{codeBlockRenderer:(e,t)=>this.renderCodeBlock(e,t),actionHandler:(e,t)=>this.openMarkdownLink(e,t),...t},i);return n.element.classList.add("rendered-markdown"),n}async renderCodeBlock(e,t){let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=h.vH);let s=await (0,d.Yj)(this._languageService,t,i),o=document.createElement("span");if(o.innerHTML=n._ttpTokenizer?.createHTML(s)??s,this._options.editor){let e=this._options.editor.getOption(59);(0,c.M)(o,e)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(o.style.fontSize=this._options.codeBlockFontSize),o}async openMarkdownLink(e,t){await p(this._openerService,e,t.isTrusted)}};async function p(e,t,i,n){try{var s;return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:(s=i,!0===s||!!(s&&Array.isArray(s.enabledCommands))&&s.enabledCommands),skipValidation:n})}catch(e){return(0,r.dz)(e),!1}}g=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(1,l.L),u(2,a.Cr)],g)},44269:()=>{},44545:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,D:()=>S});var n,s,o=i(50197),r=i(18805),a=i(17397),l=i(40364),h=i(71244),d=i(49044),c=i(86578),u=i(74218),g=i(51765),p=i(60414),m=i(71816),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){let n=new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=f([_(0,h.d),_(1,m.b),_(2,u.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){let i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);let n=this._data[e.id];if(i)n?0>n.indexOf(t)&&n.push(t):this._data[e.id]=[t];else if(n){let i=n.indexOf(t);i>=0&&(0,g.UH)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=f([_(0,u.CS)],b);class C{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){let e;for(let t of(this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear(),this._sort(l.ZG.getMenuItems(this._id)))){let i=t.group||"";e&&e[0]===i||(e=[i,[]],this._menuGroups.push(e)),e[1].push(t),this._collectContextKeysAndSubmenuIds(t)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(C._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&C._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;C._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}}let w=s=class extends C{constructor(e,t,i,n,s,o){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=o,this.refresh()}createActionGroups(e){let t=[];for(let i of this._menuGroups){let n,[o,r]=i;for(let t of r)if(this._contextKeyService.contextMatchesRules(t.when)){let i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);let o=function(e,t,i){let n=(0,l.i1)(t)?t.submenu.id:t.id,s="string"==typeof t.title?t.title:t.title.value,o=(0,c.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)(1636,"Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=(0,c.ih)({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}(this._id,i?t.command:t,this._hiddenStates);if(i){let i=S(this._commandService,this._keybindingService,t.command.id,t.when);(n??=[]).push(new l.Xe(t.command,t.alt,e,o,i,this._contextKeyService,this._commandService))}else{let i=new s(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),r=c.wv.join(...i.map(e=>e[1]));r.length>0&&(n??=[]).push(new l.nI(t,o,r))}}n&&n.length>0&&t.push([o,n])}return t}_sort(e){return e.sort(s._compareMenuItems)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n||"navigation"===i)return -1;if("navigation"===n)return 1;let e=i.localeCompare(n);if(0!==e)return e}let o=e.order||0,r=t.order||0;return o<r?-1:o>r?1:s._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){let i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};w=s=f([_(3,h.d),_(4,m.b),_(5,d.fN)],w);let y=class{constructor(e,t,i,n,s,h){this._disposables=new a.Cm,this._menuInfo=new w(e,t,i.emitEventsForSubmenuChanges,n,s,h);const d=new o.uC(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu(e=>{for(let t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}}));const c=this._disposables.add(new a.Cm),u=e=>{let t=!1,i=!1,n=!1;for(let s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}},g=()=>{c.add(h.onDidChangeContext(e=>{let t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})})),c.add(t.onDidChange(e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new r.uI({onWillAddFirstListener:g,onDidRemoveLastListener:c.clear.bind(c),delay:i.eventDebounceDelay,merge:u}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i,n,s=!0){return(0,c.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)(1637,"Configure Keybinding"),enabled:s,run(){let s=!t.lookupKeybinding(i)&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}y=f([_(3,h.d),_(4,m.b),_(5,d.fN)],y)},44597:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,v:()=>o});var n=i(71647);let s=[];function o(e,t,i){t instanceof n.d||(t=new n.d(t,[],!!i)),s.push([e,t])}function r(){return s}},44862:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,s=0;for(let o=0,r=e.length;o<r;o++){let a=e.charCodeAt(o);13===a?(0===t&&(i=o),t++,o+1<r&&10===e.charCodeAt(o+1)?(s|=2,o++):s|=3,n=o+1):10===a&&(s|=1,0===t&&(i=o),t++,n=o+1)}return 0===t&&(i=e.length),[t,i,e.length-n,s]}i.d(t,{W:()=>n})},44913:()=>{},44951:()=>{},45201:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});let n=(0,i(51328).u1)("ILanguageFeaturesService")},45606:(e,t,i)=>{"use strict";i.d(t,{$:()=>_});var n=i(52161),s=i(23001),o=i(60749),r=i(27393),a=i(10675),l=i(3013),h=i(30430),d=i(18805),c=i(76863),u=i(17397),g=i(46546);i(71914);var p=i(1315),m=i(46654);h.Q1.white.toString(),h.Q1.white.toString();let f=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}});class _ extends u.jG{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new d.vl),this._onDidEscape=this._register(new d.vl),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof t.title&&this.setTitle(t.title),"string"==typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this.enabled=!t.disabled,this._register(r.q.addTarget(this._element)),[n.Bx.CLICK,r.B.Tap].forEach(e=>{this._register((0,n.ko)(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):n.fs.stop(e)}))}),this._register((0,n.ko)(this._element,n.Bx.KEY_DOWN,e=>{let t=new s.Z(e),i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.fs.stop(t,!0)})),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OVER,e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OUT,e=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,n.w5)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let i of(0,l.n)(e))if("string"==typeof i){if(""===(i=i.trim()))continue;let e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;(t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground)&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e||(0,c.VS)(this._label)&&(0,c.VS)(e)&&(0,c.nK)(this._label,e))return;this._element.classList.add("monaco-text-button");let t=this.options.supportShortLabel?this._labelElement:this._element;if((0,c.VS)(e)){let i=(0,o.Gc)(e,void 0,document.createElement("span"));i.dispose();let s=i.element.querySelector("p")?.innerHTML;s?(0,m.D$)(t,s,f):(0,n.Ln)(t)}else this.options.supportIcons?(0,n.Ln)(t,...this.getContentElements(e)):t.textContent=e;let i="";"string"==typeof this.options.title?i=this.options.title:this.options.title&&(i=(0,o.Mh)(e)),this.setTitle(i),this._setAriaLabel(),this._label=e}get label(){return this._label}_setAriaLabel(){"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):"string"==typeof this.options.title&&this._element.setAttribute("aria-label",this.options.title)}set icon(e){this._setAriaLabel();let t=Array.from(this._element.classList).filter(e=>e.startsWith("codicon-"));this._element.classList.remove(...t),this._element.classList.add(...g.L.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register((0,p.i)().setupManagedHover(this.options.hoverDelegate??(0,a.nZ)("element"),this._element,e))}}},45786:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});let n=(0,i(51328).u1)("labelService")},46130:(e,t,i)=>{"use strict";i.d(t,{Bs:()=>a,d:()=>s});var n=i(32563);class s{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!s._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;let n=t+1,o=i+1,r=i-t,a=[],l=0;for(let t of e)t.endColumn<=n||t.startColumn>=o||(a[l++]=new s(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let o=[],r=0;for(let a=0,l=e.length;a<l;a++){let l=e[a],h=l.range;if(h.endLineNumber<t||h.startLineNumber>t||h.isEmpty()&&(0===l.type||3===l.type))continue;let d=h.startLineNumber===t?h.startColumn:i,c=h.endLineNumber===t?h.endColumn:n;o[r++]=new s(d,c,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){let i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let i=s._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class o{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new o(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new o(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[],s=new r,o=0;for(let r=0,a=t.length;r<a;r++){let a=t[r],l=a.startColumn,h=a.endColumn,d=a.className,c=1===a.type?2:4*(2===a.type);if(l>1){let t=e.charCodeAt(l-2);n.pc(t)&&l--}if(h>1){let t=e.charCodeAt(h-2);n.pc(t)&&h--}let u=l-1,g=h-2;o=s.consumeLowerThan(u,o,i),0===s.count&&(o=u),s.insert(g,d,c)}return s.consumeLowerThan(0x40000000,o,i),i}}},46296:()=>{},46340:()=>{},46546:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n,s,o=i(10359);(n||(n={})).isThemeColor=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id},function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";let t=RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){let n=t.exec(e.id);if(!n)return i(o.W.error);let[,s,r]=n,a=["codicon","codicon-"+s];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};let s=RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){let t=s.exec(e);if(!t)return;let[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id,n=i.lastIndexOf("~");return -1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){let t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(s||(s={}))},46654:(e,t,i)=>{"use strict";i.d(t,{TT:()=>et,cZ:()=>ed,D$:()=>ec,pn:()=>er});var n,s=i(86431),o=i(52161);let{entries:r,setPrototypeOf:a,isFrozen:l,getPrototypeOf:h,getOwnPropertyDescriptor:d}=Object,{freeze:c,seal:u,create:g}=Object,{apply:p,construct:m}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e){return e}),u||(u=function(e){return e}),p||(p=function(e,t,i){return e.apply(t,i)}),m||(m=function(e,t){return new e(...t)});let f=I(Array.prototype.forEach),_=I(Array.prototype.pop),v=I(Array.prototype.push),b=I(String.prototype.toLowerCase),C=I(String.prototype.toString),w=I(String.prototype.match),y=I(String.prototype.replace),S=I(String.prototype.indexOf),k=I(String.prototype.trim),x=I(Object.prototype.hasOwnProperty),L=I(RegExp.prototype.test),D=(n=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return m(n,t)});function I(e){return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return p(e,t,n)}}function N(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;a&&a(e,null);let n=t.length;for(;n--;){let s=t[n];if("string"==typeof s){let e=i(s);e!==s&&(l(t)||(t[n]=e),s=e)}e[s]=!0}return e}function E(e){let t=g(null);for(let[i,n]of r(e))x(e,i)&&(Array.isArray(n)?t[i]=function(e){for(let t=0;t<e.length;t++)x(e,t)||(e[t]=null);return e}(n):n&&"object"==typeof n&&n.constructor===Object?t[i]=E(n):t[i]=n);return t}function M(e,t){for(;null!==e;){let i=d(e,t);if(i){if(i.get)return I(i.get);if("function"==typeof i.value)return I(i.value)}e=h(e)}return function(){return null}}let T=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=c(["#text"]),W=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),H=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),j=u(/<%[\w\W]*|[\w\W]*%>/gm),$=u(/\${[\w\W]*}/gm),K=u(/^data-[\-\w.\u00B7-\uFFFF]/),G=u(/^aria-[\-\w]+$/),q=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=u(/^(?:\w+script|data):/i),Y=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=u(/^html$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:j,TMPLIT_EXPR:$,DATA_ATTR:K,ARIA_ATTR:G,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:Y,DOCTYPE_NAME:Z,CUSTOM_ELEMENT:u(/^[a-z][.\w]*(-[.\w]+)+$/i)});let J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));let s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}};var ee=function e(){let t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,n=t=>e(t);if(n.version="3.1.7",n.removed=[],!i||!i.document||9!==i.document.nodeType)return n.isSupported=!1,n;let{document:s}=i,o=s,a=o.currentScript,{DocumentFragment:l,HTMLTemplateElement:h,Node:d,Element:u,NodeFilter:p,NamedNodeMap:m=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:I,DOMParser:U,trustedTypes:j}=i,$=u.prototype,K=M($,"cloneNode"),G=M($,"remove"),Q=M($,"nextSibling"),Y=M($,"childNodes"),ee=M($,"parentNode");if("function"==typeof h){let e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let et="",{implementation:ei,createNodeIterator:en,createDocumentFragment:es,getElementsByTagName:eo}=s,{importNode:er}=o,ea={};n.isSupported="function"==typeof r&&"function"==typeof ee&&ei&&void 0!==ei.createHTMLDocument;let{MUSTACHE_EXPR:el,ERB_EXPR:eh,TMPLIT_EXPR:ed,DATA_ATTR:ec,ARIA_ATTR:eu,IS_SCRIPT_OR_DATA:eg,ATTR_WHITESPACE:ep,CUSTOM_ELEMENT:em}=X,{IS_ALLOWED_URI:ef}=X,e_=null,ev=N({},[...T,...R,...O,...A,...B]),eb=null,eC=N({},[...W,...H,...V,...z]),ew=Object.seal(g(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ey=null,eS=null,ek=!0,ex=!0,eL=!1,eD=!0,eI=!1,eN=!0,eE=!1,eM=!1,eT=!1,eR=!1,eO=!1,eP=!1,eA=!0,eF=!1,eB=!0,eW=!1,eH={},eV=null,ez=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eU=null,ej=N({},["audio","video","img","source","image","track"]),e$=null,eK=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eG="http://www.w3.org/1998/Math/MathML",eq="http://www.w3.org/2000/svg",eQ="http://www.w3.org/1999/xhtml",eY=eQ,eZ=!1,eX=null,eJ=N({},[eG,eq,eQ],C),e0=null,e1=["application/xhtml+xml","text/html"],e2=null,e5=null,e4=s.createElement("form"),e3=function(e){return e instanceof RegExp||e instanceof Function},e7=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e5||e5!==e){if(e&&"object"==typeof e||(e={}),e=E(e),e2="application/xhtml+xml"===(e0=-1===e1.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?C:b,e_=x(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,e2):ev,eb=x(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,e2):eC,eX=x(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,C):eJ,e$=x(e,"ADD_URI_SAFE_ATTR")?N(E(eK),e.ADD_URI_SAFE_ATTR,e2):eK,eU=x(e,"ADD_DATA_URI_TAGS")?N(E(ej),e.ADD_DATA_URI_TAGS,e2):ej,eV=x(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,e2):ez,ey=x(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,e2):{},eS=x(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,e2):{},eH=!!x(e,"USE_PROFILES")&&e.USE_PROFILES,ek=!1!==e.ALLOW_ARIA_ATTR,ex=!1!==e.ALLOW_DATA_ATTR,eL=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eD=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eI=e.SAFE_FOR_TEMPLATES||!1,eN=!1!==e.SAFE_FOR_XML,eE=e.WHOLE_DOCUMENT||!1,eR=e.RETURN_DOM||!1,eO=e.RETURN_DOM_FRAGMENT||!1,eP=e.RETURN_TRUSTED_TYPE||!1,eT=e.FORCE_BODY||!1,eA=!1!==e.SANITIZE_DOM,eF=e.SANITIZE_NAMED_PROPS||!1,eB=!1!==e.KEEP_CONTENT,eW=e.IN_PLACE||!1,ef=e.ALLOWED_URI_REGEXP||q,eY=e.NAMESPACE||eQ,ew=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&e3(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ew.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&e3(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ew.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ew.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eI&&(ex=!1),eO&&(eR=!0),eH&&(e_=N({},B),eb=[],!0===eH.html&&(N(e_,T),N(eb,W)),!0===eH.svg&&(N(e_,R),N(eb,H),N(eb,z)),!0===eH.svgFilters&&(N(e_,O),N(eb,H),N(eb,z)),!0===eH.mathMl&&(N(e_,A),N(eb,V),N(eb,z))),e.ADD_TAGS&&(e_===ev&&(e_=E(e_)),N(e_,e.ADD_TAGS,e2)),e.ADD_ATTR&&(eb===eC&&(eb=E(eb)),N(eb,e.ADD_ATTR,e2)),e.ADD_URI_SAFE_ATTR&&N(e$,e.ADD_URI_SAFE_ATTR,e2),e.FORBID_CONTENTS&&(eV===ez&&(eV=E(eV)),N(eV,e.FORBID_CONTENTS,e2)),eB&&(e_["#text"]=!0),eE&&N(e_,["html","head","body"]),e_.table&&(N(e_,["tbody"]),delete ey.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=J(j,a)),null!==t&&"string"==typeof et&&(et=t.createHTML(""));c&&c(e),e5=e}},e9=N({},["mi","mo","mn","ms","mtext"]),e8=N({},["annotation-xml"]),e6=N({},["title","style","font","a","script"]),te=N({},[...R,...O,...P]),tt=N({},[...A,...F]),ti=function(e){let t=ee(e);t&&t.tagName||(t={namespaceURI:eY,tagName:"template"});let i=b(e.tagName),n=b(t.tagName);return!!eX[e.namespaceURI]&&(e.namespaceURI===eq?t.namespaceURI===eQ?"svg"===i:t.namespaceURI===eG?"svg"===i&&("annotation-xml"===n||e9[n]):!!te[i]:e.namespaceURI===eG?t.namespaceURI===eQ?"math"===i:t.namespaceURI===eq?"math"===i&&e8[n]:!!tt[i]:e.namespaceURI===eQ?(t.namespaceURI!==eq||!!e8[n])&&(t.namespaceURI!==eG||!!e9[n])&&!tt[i]&&(e6[i]||!te[i]):"application/xhtml+xml"===e0&&!!eX[e.namespaceURI])},tn=function(e){v(n.removed,{element:e});try{ee(e).removeChild(e)}catch(t){G(e)}},ts=function(e,t){try{v(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){v(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!eb[e])if(eR||eO)try{tn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},to=function(e){let i=null,n=null;if(eT)e="<remove></remove>"+e;else{let t=w(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===e0&&eY===eQ&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let o=t?t.createHTML(e):e;if(eY===eQ)try{i=new U().parseFromString(o,e0)}catch(e){}if(!i||!i.documentElement){i=ei.createDocument(eY,"template",null);try{i.documentElement.innerHTML=eZ?et:o}catch(e){}}let r=i.body||i.documentElement;return(e&&n&&r.insertBefore(s.createTextNode(n),r.childNodes[0]||null),eY===eQ)?eo.call(i,eE?"html":"body")[0]:eE?i.documentElement:r},tr=function(e){return en.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},ta=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tl=function(e){return"function"==typeof d&&e instanceof d},th=function(e,t,i){ea[e]&&f(ea[e],e=>{e.call(n,t,i,e5)})},td=function(e){let t=null;if(th("beforeSanitizeElements",e,null),ta(e))return tn(e),!0;let i=e2(e.nodeName);if(th("uponSanitizeElement",e,{tagName:i,allowedTags:e_}),e.hasChildNodes()&&!tl(e.firstElementChild)&&L(/<[/\w]/g,e.innerHTML)&&L(/<[/\w]/g,e.textContent)||7===e.nodeType||eN&&8===e.nodeType&&L(/<[/\w]/g,e.data))return tn(e),!0;if(!e_[i]||ey[i]){if(!ey[i]&&tu(i)&&(ew.tagNameCheck instanceof RegExp&&L(ew.tagNameCheck,i)||ew.tagNameCheck instanceof Function&&ew.tagNameCheck(i)))return!1;if(eB&&!eV[i]){let t=ee(e)||e.parentNode,i=Y(e)||e.childNodes;if(i&&t){let n=i.length;for(let s=n-1;s>=0;--s){let n=K(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,Q(e))}}}return tn(e),!0}return e instanceof u&&!ti(e)||("noscript"===i||"noembed"===i||"noframes"===i)&&L(/<\/no(script|embed|frames)/i,e.innerHTML)?(tn(e),!0):(eI&&3===e.nodeType&&(t=e.textContent,f([el,eh,ed],e=>{t=y(t,e," ")}),e.textContent!==t&&(v(n.removed,{element:e.cloneNode()}),e.textContent=t)),th("afterSanitizeElements",e,null),!1)},tc=function(e,t,i){if(eA&&("id"===t||"name"===t)&&(i in s||i in e4))return!1;if(ex&&!eS[t]&&L(ec,t));else if(ek&&L(eu,t));else if(!eb[t]||eS[t]){if(!(tu(e)&&(ew.tagNameCheck instanceof RegExp&&L(ew.tagNameCheck,e)||ew.tagNameCheck instanceof Function&&ew.tagNameCheck(e))&&(ew.attributeNameCheck instanceof RegExp&&L(ew.attributeNameCheck,t)||ew.attributeNameCheck instanceof Function&&ew.attributeNameCheck(t))||"is"===t&&ew.allowCustomizedBuiltInElements&&(ew.tagNameCheck instanceof RegExp&&L(ew.tagNameCheck,i)||ew.tagNameCheck instanceof Function&&ew.tagNameCheck(i))))return!1}else if(e$[t]);else if(L(ef,y(i,ep,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===S(i,"data:")&&eU[e]);else if(eL&&!L(eg,y(i,ep,"")));else if(i)return!1;return!0},tu=function(e){return"annotation-xml"!==e&&w(e,em)},tg=function(e){th("beforeSanitizeAttributes",e,null);let{attributes:i}=e;if(!i)return;let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eb},o=i.length;for(;o--;){let{name:r,namespaceURI:a,value:l}=i[o],h=e2(r),d="value"===r?l:k(l);if(s.attrName=h,s.attrValue=d,s.keepAttr=!0,s.forceKeepAttr=void 0,th("uponSanitizeAttribute",e,s),d=s.attrValue,s.forceKeepAttr||(ts(r,e),!s.keepAttr))continue;if(!eD&&L(/\/>/i,d)){ts(r,e);continue}eI&&f([el,eh,ed],e=>{d=y(d,e," ")});let c=e2(e.nodeName);if(tc(c,h,d)){if(eF&&("id"===h||"name"===h)&&(ts(r,e),d="user-content-"+d),eN&&L(/((--!?|])>)|<\/(style|title)/i,d)){ts(r,e);continue}if(t&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(a);else switch(j.getAttributeType(c,h)){case"TrustedHTML":d=t.createHTML(d);break;case"TrustedScriptURL":d=t.createScriptURL(d)}try{a?e.setAttributeNS(a,r,d):e.setAttribute(r,d),ta(e)?tn(e):_(n.removed)}catch(e){}}}th("afterSanitizeAttributes",e,null)},tp=function e(t){let i=null,n=tr(t);for(th("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)th("uponSanitizeShadowNode",i,null),td(i)||(i.content instanceof l&&e(i.content),tg(i));th("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,a=null,h=null;if((eZ=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tl(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw D("dirty is not a string, aborting")}else throw D("toString is not a function");if(!n.isSupported)return e;if(eM||e7(i),n.removed=[],"string"==typeof e&&(eW=!1),eW){if(e.nodeName){let t=e2(e.nodeName);if(!e_[t]||ey[t])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)1===(r=(s=to("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?s=r:s.appendChild(r);else{if(!eR&&!eI&&!eE&&-1===e.indexOf("<"))return t&&eP?t.createHTML(e):e;if(!(s=to(e)))return eR?null:eP?et:""}s&&eT&&tn(s.firstChild);let c=tr(eW?e:s);for(;a=c.nextNode();)td(a)||(a.content instanceof l&&tp(a.content),tg(a));if(eW)return e;if(eR){if(eO)for(h=es.call(s.ownerDocument);s.firstChild;)h.appendChild(s.firstChild);else h=s;return(eb.shadowroot||eb.shadowrootmode)&&(h=er.call(o,h,!0)),h}let u=eE?s.outerHTML:s.innerHTML;return eE&&e_["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&L(Z,s.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+s.ownerDocument.doctype.name+">\n"+u),eI&&f([el,eh,ed],e=>{u=y(u,e," ")}),t&&eP?t.createHTML(u):u},n.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e7(e),eM=!0},n.clearConfig=function(){e5=null,eM=!1},n.isValidAttribute=function(e,t,i){return e5||e7({}),tc(e2(e),e2(t),i)},n.addHook=function(e,t){"function"==typeof t&&(ea[e]=ea[e]||[],v(ea[e],t))},n.removeHook=function(e){if(ea[e])return _(ea[e])},n.removeHooks=function(e){ea[e]&&(ea[e]=[])},n.removeAllHooks=function(){ea={}},n}();let et=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),ei=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),en="vscode-relative-path";function es(e,t){if("*"===t.override)return!0;try{let i=new URL(e,en+"://");if(t.override.includes(i.protocol.replace(/:$/,""))||t.allowRelativePaths&&i.protocol===en+":"&&!e.trim().toLowerCase().startsWith(en))return!0;return!1}catch(e){return!1}}let eo=Object.freeze({ALLOWED_TAGS:[...et],ALLOWED_ATTR:[...ei],ALLOW_UNKNOWN_PROTOCOLS:!0});function er(e,t){return ea(e,t,"trusted")}function ea(e,t,i){try{var n,o;let r={...eo};t?.allowedTags&&(t.allowedTags.override&&(r.ALLOWED_TAGS=[...t.allowedTags.override]),t.allowedTags.augment&&(r.ALLOWED_TAGS=[...r.ALLOWED_TAGS??[],...t.allowedTags.augment]));let a=[...ei];t?.allowedAttributes&&(t.allowedAttributes.override&&(a=[...t.allowedAttributes.override]),t.allowedAttributes.augment&&(a=[...a,...t.allowedAttributes.augment])),a=a.map(e=>"string"==typeof e?e.toLowerCase():{attributeName:e.attributeName.toLowerCase(),shouldKeep:e.shouldKeep});let l=new Set(a.map(e=>"string"==typeof e?e:e.attributeName)),h=new Map;for(let e of a)"string"==typeof e?h.delete(e):h.set(e.attributeName,e);if(r.ALLOWED_ATTR=Array.from(l),n={override:t?.allowedLinkProtocols?.override??[s.ny.http,s.ny.https],allowRelativePaths:t?.allowRelativeLinkPaths??!1},o={override:t?.allowedMediaProtocols?.override??[s.ny.http,s.ny.https],allowRelativePaths:t?.allowRelativeMediaPaths??!1},ee.addHook("afterSanitizeAttributes",e=>{for(let t of["href","src"])if(e.hasAttribute(t)){let i=e.getAttribute(t);"href"===t?i.startsWith("#")||es(i,n)||e.removeAttribute(t):es(i,o)||e.removeAttribute(t)}}),t?.replaceWithPlaintext&&ee.addHook("uponSanitizeElement",eh),h.size&&ee.addHook("uponSanitizeAttribute",(e,t)=>{let i=h.get(t.attrName);if(i){let n=i.shouldKeep(e,t);"string"==typeof n?(t.keepAttr=!0,t.attrValue=n):t.keepAttr=n}else t.keepAttr=l.has(t.attrName)}),"dom"===i)return ee.sanitize(e,{...r,RETURN_DOM_FRAGMENT:!0});return ee.sanitize(e,{...r,RETURN_TRUSTED_TYPE:!0})}finally{ee.removeAllHooks()}}let el=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function eh(e,t,i){if(!t.allowedTags[t.tagName]&&"body"!==t.tagName){let t=ed(e);e.nodeType===Node.COMMENT_NODE?e.parentElement?.insertBefore(t,e):e.parentElement?.replaceChild(t,e)}}function ed(e){let t,i;if(e.nodeType===Node.COMMENT_NODE)t=`<!--${e.textContent}-->`;else{let n=e.tagName.toLowerCase(),s=el.includes(n),o=e.attributes.length?" "+Array.from(e.attributes).map(e=>`${e.name}="${e.value}"`).join(" "):"";t=`<${n}${o}>`,s||(i=`</${n}>`)}let n=document.createDocumentFragment(),s=e.ownerDocument.createTextNode(t);for(n.appendChild(s);e.firstChild;)n.appendChild(e.firstChild);let o=i?e.ownerDocument.createTextNode(i):void 0;return o&&n.appendChild(o),n}function ec(e,t,i){let n=ea(t,i,"dom");(0,o.Ln)(e,n)}},46712:(e,t,i)=>{"use strict";i.d(t,{E:()=>c});var n=i(52161),s=i(23001),o=i(75364),r=i(10675),a=i(86578),l=i(18805),h=i(17397),d=i(24244);i(55780);class c extends h.jG{get onDidBlur(){return this._onDidBlur.event}get onDidCancel(){return this._onDidCancel.event}get onDidRun(){return this._onDidRun.event}get onWillRun(){return this._onWillRun.event}constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new h.Cm),this.viewItemDisposables=this._register(new h.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this._onWillRun=this._register(new l.vl),this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(e=>this._onWillRun.fire(e))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical"}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,e=>{let t=new s.Z(e),n=!0,r="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof o.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())})),this._register(n.ko(this.domNode,n.Bx.KEY_UP,e=>{let t=new s.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let e=this.viewItems.find(e=>e instanceof o.EH&&e.isEnabled());e instanceof o.EH&&e.setFocusable(!0)}else this.viewItems.forEach(e=>{e instanceof o.EH&&e.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){let t=this.actionsList.children[e];if(n.QX(n.bq(),t)){this.focusedItem=e,this.viewItems[this.focusedItem]?.showHover?.();break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(e=>this._onWillRun.fire(e))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){if("number"==typeof e)return this.viewItems[e]?.action;if(n.sb(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t<this.actionsList.childNodes.length;t++)if(this.actionsList.childNodes[t]===e)return this.viewItems[t].action}}push(e,t={}){let i=Array.isArray(e)?e:[e],s=d.Et(t.index)?t.index:null;if(i.forEach(e=>{let i,r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(i=this.options.actionViewItemProvider(e,a)),i||(i=new o.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(i,n.ko(r,n.Bx.CONTEXT_MENU,e=>{n.fs.stop(e,!0)})),i.actionRunner=this._actionRunner,i.setActionContext(this.context),i.render(r),null===s||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(i)):(this.actionsList.insertBefore(r,this.actionsList.children[s]),this.viewItems.splice(s,0,i),s++)}),this.focusable){let e=!1;for(let t of this.viewItems)t instanceof o.EH&&(!e&&t.action.id!==a.wv.ID&&(t.isEnabled()||!this.options.focusOnlyEnabledItems)?(t.setFocusable(!0),e=!0):t.setFocusable(!1))}"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,h.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){let e=this.viewItems.findIndex(e=>e.isEnabled());this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){let i;if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let n=this.focusedItem;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){let t;if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let i=this.focusedItem;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!t.isEnabled()||t.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();let n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;d.Tn(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===a.wv.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(void 0===this.focusedItem)return;let t=this.viewItems[this.focusedItem];if(t instanceof o.EH){let i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,h.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},46754:(e,t,i)=>{"use strict";i.d(t,{P:()=>a,w:()=>r});var n=i(16891),s=i(12338),o=i(97375);class r extends n.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n,s,o){super(o),this._debugNameData=e,this._computeFn=t,this._changeTracker=i,this._handleLastObserverRemoved=n,this._equalityComparator=s,this._state=0,this._value=void 0,this._updateCount=0,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._changeSummary=void 0,this._isUpdating=!1,this._isComputing=!1,this._didReportChange=!1,this._isInBeforeUpdate=!1,this._isReaderValid=!1,this._store=void 0,this._delayedStore=void 0,this._removedObserverToCallEndUpdateOn=null,this._changeSummary=this._changeTracker?.createChangeSummary(void 0)}onLastObserverRemoved(){for(let e of(this._state=0,this._value=void 0,(0,o.tZ)()?.handleDerivedCleared(this),this._dependencies))e.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&(this._store.dispose(),this._store=void 0),void 0!==this._delayedStore&&(this._delayedStore.dispose(),this._delayedStore=void 0),this._handleLastObserverRemoved?.()}get(){if(this._isComputing,0===this._observers.size){let e;try{let t;this._isReaderValid=!0,this._changeTracker&&(t=this._changeTracker.createChangeSummary(void 0),this._changeTracker.beforeUpdate?.(this,t)),e=this._computeFn(this,t)}finally{this._isReaderValid=!1}return this.onLastObserverRemoved(),e}do{if(1===this._state){for(let e of this._dependencies)if(e.reportChanges(),2===this._state)break}1===this._state&&(this._state=3),3!==this._state&&this._recompute()}while(3!==this._state);return this._value}_recompute(){let e=!1;this._isComputing=!0,this._didReportChange=!1;let t=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=t;try{let t=this._changeSummary;this._isReaderValid=!0,this._changeTracker&&(this._isInBeforeUpdate=!0,this._changeTracker.beforeUpdate?.(this,t),this._isInBeforeUpdate=!1,this._changeSummary=this._changeTracker?.createChangeSummary(t));let i=0!==this._state,n=this._value;this._state=3;let s=this._delayedStore;void 0!==s&&(this._delayedStore=void 0);try{void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._value=this._computeFn(this,t)}finally{for(let e of(this._isReaderValid=!1,this._dependenciesToBeRemoved))e.removeObserver(this);this._dependenciesToBeRemoved.clear(),void 0!==s&&s.dispose()}e=this._didReportChange||i&&!this._equalityComparator(n,this._value),(0,o.tZ)()?.handleObservableUpdated(this,{oldValue:n,newValue:this._value,change:void 0,didChange:e,hadValue:i})}catch(e){(0,s.y4)(e)}if(this._isComputing=!1,!this._didReportChange&&e)for(let e of this._observers)e.handleChange(this,void 0);else this._didReportChange=!1}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){if(this._isUpdating)throw new s.D7("Cyclic deriveds are not supported yet!");this._updateCount++,this._isUpdating=!0;try{let e=1===this._updateCount;if(3===this._state&&(this._state=1,!e))for(let e of this._observers)e.handlePossibleChange(this);if(e)for(let e of this._observers)e.beginUpdate(this)}finally{this._isUpdating=!1}}endUpdate(e){if(this._updateCount--,0===this._updateCount){for(let e of[...this._observers])e.endUpdate(this);if(this._removedObserverToCallEndUpdateOn){let e=[...this._removedObserverToCallEndUpdateOn];for(let t of(this._removedObserverToCallEndUpdateOn=null,e))t.endUpdate(this)}}(0,s.Ft)(()=>this._updateCount>=0)}handlePossibleChange(e){if(3===this._state&&this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e))for(let e of(this._state=1,this._observers))e.handlePossibleChange(this)}handleChange(e,t){if(this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)||this._isInBeforeUpdate){(0,o.tZ)()?.handleDerivedDependencyChanged(this,e,t);let i=!1;try{i=!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:t,didChange:t=>t===e},this._changeSummary)}catch(e){(0,s.y4)(e)}let n=3===this._state;if(i&&(1===this._state||n)&&(this._state=2,n))for(let e of this._observers)e.handlePossibleChange(this)}}_ensureReaderValid(){if(!this._isReaderValid)throw new s.D7("The reader object cannot be used outside its compute function!")}readObservable(e){this._ensureReaderValid(),e.addObserver(this);let t=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),t}get store(){return this._ensureReaderValid(),void 0===this._store&&(this._store=new s.Cm),this._store}addObserver(e){let t=!this._observers.has(e)&&this._updateCount>0;super.addObserver(e),t&&(this._removedObserverToCallEndUpdateOn&&this._removedObserverToCallEndUpdateOn.has(e)?this._removedObserverToCallEndUpdateOn.delete(e):e.beginUpdate(this))}removeObserver(e){this._observers.has(e)&&this._updateCount>0&&(this._removedObserverToCallEndUpdateOn||(this._removedObserverToCallEndUpdateOn=new Set),this._removedObserverToCallEndUpdateOn.add(e)),super.removeObserver(e)}debugGetState(){return{state:this._state,stateStr:function(e){switch(e){case 0:return"initial";case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state),updateCount:this._updateCount,isComputing:this._isComputing,dependencies:this._dependencies,value:this._value}}debugSetValue(e){this._value=e}debugRecompute(){this._isComputing?this._state=2:this._recompute()}setValue(e,t,i){this._value=e;let n=this._observers;for(let e of(t.updateObserver(this,this),n))e.handleChange(this,i)}}class a extends r{constructor(e,t,i,n,s,o,r){super(e,t,i,n,s,r),this.set=o}}},47576:(e,t,i)=>{"use strict";i.d(t,{AL:()=>d,D7:()=>f,EM:()=>p,MB:()=>h,M_:()=>a,Qg:()=>u,aD:()=>c,cU:()=>function e(t){if(t instanceof Error){let{name:i,message:n,cause:s}=t;return{$isError:!0,name:i,message:n,stack:t.stacktrace||t.stack,noTelemetry:m.isErrorNoTelemetry(t),cause:s?e(s):void 0,code:t.code}}return t},dz:()=>r,iH:()=>g,y4:()=>o});class n{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack){if(m.isErrorNoTelemetry(e))throw new m(e.message+"\n\n"+e.stack);throw Error(e.message+"\n\n"+e.stack)}throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}let s=new n;function o(e){s.onUnexpectedError(e)}function r(e){h(e)||s.onUnexpectedError(e)}function a(e){h(e)||s.onUnexpectedExternalError(e)}let l="Canceled";function h(e){return e instanceof d||e instanceof Error&&e.name===l&&e.message===l}class d extends Error{constructor(){super(l),this.name=this.message}}function c(){let e=Error(l);return e.name=e.message,e}function u(e){return e?Error(`Illegal argument: ${e}`):Error("Illegal argument")}function g(e){return e?Error(`Illegal state: ${e}`):Error("Illegal state")}class p extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class m extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof m)return e;let t=new m;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},47713:()=>{},47717:(e,t,i)=>{"use strict";i.d(t,{Yh:()=>l,QM:()=>a});var n,s,o,r,a,l,h=i(60414),d=i(79186),c=i(24244),u=i(12704),g=i(26065),p=i(92158),m=i(81552),f=i(47982),_=i(10902);class v{static columnSelect(e,t,i,n,s,o){let r=Math.abs(s-i)+1,a=i>s,l=n>o,h=n<o,d=[];for(let s=0;s<r;s++){let r=i+(a?-s:s),c=e.columnFromVisibleColumn(t,r,n),u=e.columnFromVisibleColumn(t,r,o),g=e.visibleColumnFromColumn(t,new f.y(r,c)),p=e.visibleColumnFromColumn(t,new f.y(r,u));if(!h||!(g>o)&&!(p<n))l&&(p>n||g<o)||d.push(new m.mG(new _.Q(r,c,r,c),0,0,new f.y(r,u),0))}if(0===d.length)for(let e=0;e<r;e++){let n=i+(a?-e:e),s=t.getLineMaxColumn(n);d.push(new m.mG(new _.Q(n,s,n,s),0,0,new f.y(n,s),0))}return{viewStates:d,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,v.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0,s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=s;i<=o;i++){let s=t.getLineMaxColumn(i);n=Math.max(n,e.visibleColumnFromColumn(t,new f.y(i,s)))}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){let s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){let s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}var b=i(92725),C=i(6351),w=i(56274),y=i(86425),S=i(49044),k=i(69662),x=i(52161),L=i(17182);class D extends g.DX{runEditorCommand(e,t,i){let n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}(n=o||(o={})).metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:`Property-value pairs that can be passed through this argument:
|
|
88
|
+
`;return n};return e(this._data,0)}}},35859:(e,t,i)=>{"use strict";i.d(t,{W5:()=>p,dr:()=>d,eV:()=>h,hB:()=>u,lt:()=>l,wC:()=>g});var n=i(32563),s=i(49117),o=i(47982),r=i(10902),a=i(96716);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){let e;if(""===this.searchString)return null;e=this.isRegex?h(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,s.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function h(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){let n=e.charCodeAt(t);if(10===n)return!0;if(92===n){if(++t>=i)break;let n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}function d(e,t,i){if(!i)return new a.Dg(e,null);let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new a.Dg(e,n)}class c{constructor(e){const t=[];let i=0;for(let n=0,s=e.length;n<s;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){let t=this._lineFeedsOffsets,i=0,n=t.length-1;if(-1===n||e<=t[0])return 0;for(;i<n;){let s=i+((n-i)/2|0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class u{static findMatches(e,t,i,n,s){let o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new p(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l,h=0;if(n?(h=n.findLineFeedCountBeforeOffset(s),a=t+s+h):a=t+s,n){let e=n.findLineFeedCountBeforeOffset(s+o.length)-h;l=a+o.length+e}else l=a+o.length;let d=e.getPositionAt(a),c=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,i,n,s){let o,r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new c(a):null,h=[],u=0;for(i.reset(0);(o=i.next(a))&&(h[u++]=d(this._getMultilineMatchRange(e,r,a,l,o.index,o[0]),o,n),!(u>=s)););return h}static _doFindMatchesLineByLine(e,t,i,n,s){let o=[],r=0;if(t.startLineNumber===t.endLineNumber){let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let a=t.startLineNumber+1;a<t.endLineNumber&&r<s;a++)r=this._findMatchesInLine(i,e.getLineContent(a),a,0,r,o,n,s);if(r<s){let a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,o,n,s)}return o}static _findMatchesInLine(e,t,i,n,s,o,l,h){let c,u=e.wordSeparators;if(!l&&e.simpleSearch){let l=e.simpleSearch,d=l.length,c=t.length,p=-d;for(;-1!==(p=t.indexOf(l,p+d))&&(!(!u||g(u,t,c,p,d))||(o[s++]=new a.Dg(new r.Q(i,p+1+n,i,p+1+d+n),null),!(s>=h))););return s}let m=new p(e.wordSeparators,e.regex);m.reset(0);do if((c=m.next(t))&&(o[s++]=d(new r.Q(i,c.index+1+n,i,c.index+1+c[0].length+n),c,l),s>=h))break;while(c);return s}static findNextMatch(e,t,i,n){let s=t.parseSearchRequest();if(!s)return null;let o=new p(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){let s=new o.y(t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),h=e.getValueInRange(new r.Q(s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new c(h):null;i.reset(t.column-1);let g=i.next(h);return g?d(this._getMultilineMatchRange(e,a,h,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){let s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let t=1;t<=s;t++){let r=(o+t-1)%s,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);let o=e.next(t);return o?d(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){let s=t.parseSearchRequest();if(!s)return null;let o=new p(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){let s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];let a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){let s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let t=1;t<=s;t++){let r=(s+o-t-1)%s,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=d(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function g(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;let o=t.charCodeAt(n-1);if(0!==e.get(o)||13===o||10===o)return!0;if(s>0){let i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;let o=t.charCodeAt(n+s);if(0!==e.get(o)||13===o||10===o)return!0;if(s>0){let i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t,i=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||!(t=this._searchRegex.exec(e)))break;let s=t.index,o=t[0].length;if(s===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n.Z5(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}break}if(this._prevMatchStartIndex=s,this._prevMatchLength=o,!this._wordSeparators||g(this._wordSeparators,e,i,s,o))return t}while(t);return null}}},35896:()=>{},35972:(e,t,i)=>{"use strict";i.d(t,{CG:()=>s,gO:()=>r});var n=i(18780);function s(e,t){var i,s;if(n.HZ)return!1;let r=(i=e,(s=t)||(s=o(i)),"native"===s),a=e.getValue("window");return a?.menuStyle==="native"?!!n.zx||!!r:a?.menuStyle!=="custom"&&r}function o(e){if(n.HZ)return"custom";let t=e.getValue("window");if(t){if(n.zx&&!0===t.nativeTabs||n.zx&&!1===t.nativeFullScreen)return"native";let e=t.titleBarStyle;if("native"===e||"custom"===e)return e}return"custom"}function r(e){if(n.HZ||n.zx||"native"===o(e))return"native";let t=e.getValue("window"),i=t?.controlsStyle;return"custom"===i||"hidden"===i?i:"native"}},36046:()=>{},36527:()=>{},36578:(e,t,i)=>{"use strict";i.d(t,{r4:()=>E,Yl:()=>T});var n,s=i(50197),o=i(75200),r=i(17397),a=i(41748),l=i(44597),h=i(51328),d=i(18805),c=i(4222),u=i(29119),g=i(87028),p=i(92927),m=i(53308),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=(0,h.u1)("diffProviderFactoryService"),b=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(C,e)}};b=f([_(0,h._Y)],b),(0,l.v)(v,b,1);let C=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new d.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,s){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,s);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new g.wm(new u.M(1,2),new u.M(1,t.getLineCount()+1),[new g.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let o=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),a=n.diffCache.get(o);if(a&&a.context===r)return a.result;let l=c.W.create(),h=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),d=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:d,timedOut:h?.quitEarly??!0,detectedMoves:i.computeMoves?h?.moves.length??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(o,{result:h,context:r}),h}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};C=n=f([_(1,p.w),_(2,m.k)],C);var w=i(16427),y=i(39216),S=i(28574),k=i(97957),x=i(25875),L=i(36137),D=i(24244),I=i(51765),N=i(29001);let E=class extends r.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,a.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,a.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,a.FY)(this,void 0),this.unchangedRegions=(0,a.un)(this,e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,a.Rn)(e=>{for(let t of this._unchangedRegions.read(void 0)?.regions||[])t.collapseAll(e)}),[])),this.movedTextToCompare=(0,a.FY)(this,void 0),this._activeMovedText=(0,a.FY)(this,void 0),this._hoveredMovedText=(0,a.FY)(this,void 0),this.activeMovedText=(0,a.un)(this,e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e)),this._cancellationTokenSource=new o.Qi,this._diffProvider=(0,a.un)(this,e=>{let t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)}),i=(0,a.yQ)("onDidChange",t.onDidChange);return{diffProvider:t,onChangeSignal:i}}),this._register((0,r.s)(()=>this._cancellationTokenSource.cancel()));const n=(0,a.Yd)("contentChangedSignal"),l=this._register(new s.uC(()=>n.trigger(void 0),200));this._register((0,a.fm)(t=>{let i=this._unchangedRegions.read(t);if(!i||i.regions.some(e=>e.isDragged.read(t)))return;let n=i.originalDecorationIds.map(t=>e.original.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),s=i.modifiedDecorationIds.map(t=>e.modified.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),o=i.regions.map((e,i)=>n[i]&&s[i]?new R(n[i].startLineNumber,s[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0).filter(D.O9),r=[],l=!1;for(let e of(0,I.n)(o,(e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber))if(e.length>1){l=!0;let t=e.reduce((e,t)=>e+t.lineCount,0),i=new R(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.read(void 0),e[e.length-1].visibleLineCountBottom.read(void 0));r.push(i)}else r.push(e[0]);if(l){let t=e.original.deltaDecorations(i.originalDecorationIds,r.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));(0,a.Rn)(e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)})}}));const h=(t,i,n)=>{let s,o=R.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n)),r=this._unchangedRegions.get();if(r){let t=r.originalDecorationIds.map(t=>e.original.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),i=r.modifiedDecorationIds.map(t=>e.modified.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),o=(0,w.EK)(r.regions.map((e,n)=>{if(!t[n]||!i[n])return;let s=t[n].length;return new R(t[n].startLineNumber,i[n].startLineNumber,s,Math.min(e.visibleLineCountTop.get(),s),Math.min(e.visibleLineCountBottom.get(),s-e.visibleLineCountTop.get()))}).filter(D.O9),(e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount).map(e=>new g.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n)));o=g.WL.clip(o,u.M.ofLength(1,e.original.getLineCount()),u.M.ofLength(1,e.modified.getLineCount())),s=g.WL.inverse(o,e.original.getLineCount(),e.modified.getLineCount())}let a=[];if(s)for(let e of o){let t=s.filter(t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);let l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),h=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:h},i)};this._register(e.modified.onDidChangeContent(t=>{if(this._diff.get()){let i=k.c.fromModelContentChanges(t.changes),n=P(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,a.Rn)(e=>{this._diff.set(M.fromDiffResult(this._lastDiff),e),h(n,e);let t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified)):void 0,e)}))}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register(e.original.onDidChangeContent(t=>{if(this._diff.get()){let i=k.c.fromModelContentChanges(t.changes),n=O(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,a.Rn)(e=>{this._diff.set(M.fromDiffResult(this._lastDiff),e),h(n,e);let t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified)):void 0,e)}))}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register((0,a.yC)(async(t,i)=>{var s,o,r;this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),l.cancel(),n.read(t);let d=this._diffProvider.read(t);d.onChangeSignal.read(t),(0,y.b6)(S.D,t),(0,y.b6)(L.NC,t),this._isDiffUpToDate.set(!1,void 0);let c=[];i.add(e.original.onDidChangeContent(e=>{let t=k.c.fromModelContentChanges(e.changes);c=(0,x.M)(c,t)}));let u=[];i.add(e.modified.onDidChangeContent(e=>{let t=k.c.fromModelContentChanges(e.changes);u=(0,x.M)(u,t)}));let p=await d.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(p=P(p=O((s=p,o=e.original,r=e.modified,p={changes:s.changes.map(e=>new g.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map(e=>{var t,i,n;let s,a;return t=e,i=o,n=r,s=t.originalRange,a=t.modifiedRange,1===s.startColumn&&1===a.startColumn&&(1!==s.endColumn||1!==a.endColumn)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&a.endColumn===n.getLineMaxColumn(a.endLineNumber)&&s.endLineNumber<i.getLineCount()&&a.endLineNumber<n.getLineCount()&&(s=s.setEndPosition(s.endLineNumber+1,1),a=a.setEndPosition(a.endLineNumber+1,1)),new g.q6(s,a)}):void 0)),moves:s.moves,identical:s.identical,quitEarly:s.quitEarly}),c,e.original,e.modified)??p,u,e.original,e.modified)??p,(0,a.Rn)(e=>{h(p,e),this._lastDiff=p;let t=M.fromDiffResult(p);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);let i=this.movedTextToCompare.read(void 0);this.movedTextToCompare.set(i?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified)):void 0,e)}))}))}ensureModifiedLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length!==0){for(let n of this._unchangedRegions.get()?.regions||[])if(n.getHiddenModifiedRange(void 0).contains(e))return void n.showModifiedLine(e,t,i)}}ensureOriginalLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length!==0){for(let n of this._unchangedRegions.get()?.regions||[])if(n.getHiddenOriginalRange(void 0).contains(e))return void n.showOriginalLine(e,t,i)}}async waitForDiff(){await (0,a.oJ)(this.isDiffUpToDate,e=>e)}serializeState(){let e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map(e=>({range:e.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){let t=e.collapsedRegions?.map(e=>u.M.deserialize(e.range)),i=this._unchangedRegions.get();i&&t&&(0,a.Rn)(e=>{for(let n of i.regions)for(let i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}})}};E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){v(e,t,2)}],E);class M{static fromDiffResult(e){return new M(e.changes.map(e=>new T(e)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class T{constructor(e){this.lineRangeMapping=e}}class R{static fromDiffs(e,t,i,n,s){let o=g.wm.inverse(e,t,i),r=[];for(let e of o){let o=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length,h=1===o&&1===a,d=o+l===t+1&&a+l===i+1;(h||d)&&l>=s+n?(h&&!d&&(l-=s),d&&!h&&(o+=s,a+=s,l-=s),r.push(new R(o,a,l,0,0))):l>=2*s+n&&(o+=s,a+=s,l-=2*s,r.push(new R(o,a,l,0,0)))}return r}get originalUnchangedRange(){return u.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return u.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,a.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,a.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,a.un)(this,e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e)),this.isDragged=(0,a.FY)(this,void 0);const o=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(s,this.lineCount-n),0);(0,N.V7)(n===o),(0,N.V7)(s===r),this._visibleLineCountTop.set(o,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){let i=[],n=new u.S(e.map(e=>e.modified)).subtractFrom(this.modifiedUnchangedRange),s=this.originalLineNumber,o=this.modifiedLineNumber,r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(let a of n.ranges){let l=e===n.ranges.length-1;e++;let h=(l?r:a.endLineNumberExclusive)-o,d=new R(s,o,h,0,0);d.setHiddenModifiedRange(a,t),i.push(d),s=d.originalUnchangedRange.endLineNumberExclusive,o=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return u.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return u.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){let i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){let n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n<s||1===t?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+n,i):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+s,i)}showOriginalLine(e,t,i){let n=e-this.originalLineNumber,s=this.originalLineNumber+this.lineCount-e;0===t&&n<s||1===t?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+s-n,this.getMaxVisibleLineCountTop()),i):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+n-s,this.getMaxVisibleLineCountBottom()),i)}collapseAll(e){this._visibleLineCountTop.set(0,e),this._visibleLineCountBottom.set(0,e)}setState(e,t,i){e=Math.max(Math.min(e,this.lineCount),0),t=Math.max(Math.min(t,this.lineCount-e),0),this._visibleLineCountTop.set(e,i),this._visibleLineCountBottom.set(t,i)}}function O(e,t,i,n){}function P(e,t,i,n){}},36603:()=>{},36676:()=>{},36693:()=>{},37047:(e,t,i)=>{"use strict";i.d(t,{AS:()=>a,gr:()=>c,iP:()=>d,iu:()=>r,q2:()=>h,tA:()=>l,ui:()=>u});var n=i(47982),s=i(10902),o=i(10965);class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class a{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){let i=this._range.getStartPosition(),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,this._text.length+(this._range.isEmpty()?0:-1));a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(i,a);t.addTrackedEditOperation(l,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class l{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromRange(i,0)}}class h{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getStartPosition())}}class d{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class c{constructor(e){this._range=e}getEditOperations(e,t){let i=e.getValueInRange(this._range),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,i.length);a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(o,a);t.addTrackedEditOperation(l,"")}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class u{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function g(e,t,i){if(i<0)throw Error("Unexpected negative delta");let s=e.getLineCount(),o=new n.y(s,e.getLineMaxColumn(s));for(let r=t.lineNumber;r<=s;r++)if(r===t.lineNumber){let s=i-e.getLineMaxColumn(t.lineNumber)+t.column;if(s<=0){o=new n.y(t.lineNumber,t.column+i);break}i=s}else{let t=i-e.getLineMaxColumn(r);if(t<=0){o=new n.y(r,i);break}i=t}return o}},38004:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});let n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},38016:()=>{},38691:(e,t,i)=>{"use strict";i.d(t,{e2:()=>l,sN:()=>r,tW:()=>o,v7:()=>c});var n=i(2281),s=i(32563);function o(e){return r(e,0)}function r(e,t){switch(typeof e){case"object":var i,n,s,o;if(null===e)return a(349,t);if(Array.isArray(e)){return i=e,n=a(104579,n=t),i.reduce((e,t)=>r(t,e),n)}return s=e,o=a(181387,o=t),Object.keys(s).sort().reduce((e,t)=>(e=l(t,e),r(s[t],e)),o);case"string":return l(e,t);case"boolean":return a(e?433:863,t);case"number":return a(e,t);case"undefined":return a(937,t);default:return a(617,t)}}function a(e,t){return(t<<5)-t+e|0}function l(e,t){t=a(149417,t);for(let i=0,n=e.length;i<n;i++)t=a(e.charCodeAt(i),t);return t}function h(e,t,i=32){let n=i-t;return(e<<t|(~((1<<n)-1)&e)>>>n)>>>0}function d(e,t=32){return e instanceof ArrayBuffer?(0,n.mU)(n.MB.wrap(new Uint8Array(e))):(e>>>0).toString(16).padStart(t/4,"0")}class c{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=0x67452301,this._h1=0xefcdab89,this._h2=0x98badcfe,this._h3=0x10325476,this._h4=0xc3d2e1f0,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t,i,n=e.length;if(0===n)return;let o=this._buff,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(t=a,i=-1,a=0):(t=e.charCodeAt(0),i=0);;){let l=t;if(s.pc(t))if(i+1<n){let n=e.charCodeAt(i+1);s.LJ(n)?(i++,l=s.z_(t,n)):l=65533}else{a=t;break}else s.LJ(t)&&(l=65533);if(r=this._push(o,r,l),++i<n)t=e.charCodeAt(i);else break}this._buffLen=r,this._leftoverHighSurrogate=a}_push(e,t,i){return i<128?e[t++]=i:(i<2048?e[t++]=192|(1984&i)>>>6:(i<65536?e[t++]=224|(61440&i)>>>12:(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12),e[t++]=128|(4032&i)>>>6),e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),d(this._h0)+d(this._h1)+d(this._h2)+d(this._h3)+d(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/0x100000000),!1),this._buffDV.setUint32(60,e%0x100000000,!1),this._step()}_step(){let e,t,i,n=c._bigBlock32,s=this._buffDV;for(let e=0;e<64;e+=4)n.setUint32(e,s.getUint32(e,!1),!1);for(let e=64;e<320;e+=4)n.setUint32(e,h(n.getUint32(e-12,!1)^n.getUint32(e-32,!1)^n.getUint32(e-56,!1)^n.getUint32(e-64,!1),1),!1);let o=this._h0,r=this._h1,a=this._h2,l=this._h3,d=this._h4;for(let s=0;s<80;s++)s<20?(e=r&a|~r&l,t=0x5a827999):s<40?(e=r^a^l,t=0x6ed9eba1):s<60?(e=r&a|r&l|a&l,t=0x8f1bbcdc):(e=r^a^l,t=0xca62c1d6),i=h(o,5)+e+d+t+n.getUint32(4*s,!1)|0,d=l,l=a,a=h(r,30),r=o,o=i;this._h0=this._h0+o|0,this._h1=this._h1+r|0,this._h2=this._h2+a|0,this._h3=this._h3+l|0,this._h4=this._h4+d|0}}},38932:(e,t,i)=>{"use strict";i.d(t,{B:()=>s,m:()=>w});var n,s,o=i(52161),r=i(25083),a=i(9634),l=i(27393),h=i(50197),d=i(83725),c=i(18805),u=i(17397),g=i(18780);i(32648);var p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};(n=s||(s={})).North="north",n.South="south",n.East="east",n.West="west";let m=new c.vl,f=new c.vl;class _{constructor(e){this.el=e,this.disposables=new u.Cm}get onPointerMove(){return this.disposables.add(new a.f((0,o.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new a.f((0,o.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}p([d.B],_.prototype,"onPointerMove",null),p([d.B],_.prototype,"onPointerUp",null);class v{get onPointerMove(){return this.disposables.add(new a.f(this.el,l.B.Change)).event}get onPointerUp(){return this.disposables.add(new a.f(this.el,l.B.End)).event}constructor(e){this.el=e,this.disposables=new u.Cm}dispose(){this.disposables.dispose()}}p([d.B],v.prototype,"onPointerMove",null),p([d.B],v.prototype,"onPointerUp",null);class b{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}p([d.B],b.prototype,"onPointerMove",null),p([d.B],b.prototype,"onPointerUp",null);let C="pointer-events-disabled";class w extends u.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,o.BC)(this.el,(0,o.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,u.s)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add((0,o.ko)(this._orthogonalStartDragHandle,"mouseenter",()=>w.onMouseEnter(e))),this.orthogonalStartDragHandleDisposables.add((0,o.ko)(this._orthogonalStartDragHandle,"mouseleave",()=>w.onMouseLeave(e))))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,o.BC)(this.el,(0,o.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,u.s)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add((0,o.ko)(this._orthogonalEndDragHandle,"mouseenter",()=>w.onMouseEnter(e))),this.orthogonalEndDragHandleDisposables.add((0,o.ko)(this._orthogonalEndDragHandle,"mouseleave",()=>w.onMouseLeave(e))))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){let n;super(),this.hoverDelay=300,this.hoverDelayer=this._register(new h.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new c.vl),this._onDidStart=this._register(new c.vl),this._onDidChange=this._register(new c.vl),this._onDidReset=this._register(new c.vl),this._onDidEnd=this._register(new c.vl),this.orthogonalStartSashDisposables=this._register(new u.Cm),this.orthogonalStartDragHandleDisposables=this._register(new u.Cm),this.orthogonalEndSashDisposables=this._register(new u.Cm),this.orthogonalEndDragHandleDisposables=this._register(new u.Cm),this.linkedSash=void 0,this.el=(0,o.BC)(e,(0,o.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),g.zx&&this.el.classList.add("mac"),this._register((0,o.ko)(this.el,"mousedown",t=>this.onPointerStart(t,new _(e)))),this._register((0,o.ko)(this.el,"dblclick",e=>this.onPointerDoublePress(e))),this._register((0,o.ko)(this.el,"mouseenter",()=>w.onMouseEnter(this))),this._register((0,o.ko)(this.el,"mouseleave",()=>w.onMouseLeave(this))),this._register(l.q.addTarget(this.el)),this._register((0,o.ko)(this.el,l.B.Start,e=>this.onPointerStart(e,new v(this.el)))),this._register((0,o.ko)(this.el,l.B.Tap,e=>{if(n){clearTimeout(n),n=void 0,this.onPointerDoublePress(e);return}clearTimeout(n),n=setTimeout(()=>n=void 0,250)})),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(m.event(e=>{this.size=e,this.layout()}))),this._register(f.event(e=>this.hoverDelay=e)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){o.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){let n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new b(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new b(t))),!this.state)return;let n=this.el.ownerDocument.getElementsByTagName("iframe");for(let e of n)e.classList.add(C);let s=e.pageX,a=e.pageY,l=e.altKey;this.el.classList.add("active"),this._onDidStart.fire({startX:s,currentX:s,startY:a,currentY:a,altKey:l});let h=(0,r.li)(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":g.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":g.zx?"col-resize":"ew-resize",h.textContent=`* { cursor: ${e} !important; }`},c=new u.Cm;d(),i||this.onDidEnablementChange.event(d,null,c);let p=e=>{o.fs.stop(e,!1);let t={startX:s,currentX:e.pageX,startY:a,currentY:e.pageY,altKey:l};this._onDidChange.fire(t)},m=e=>{for(let t of(o.fs.stop(e,!1),h.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),c.dispose(),n))t.classList.remove(C)};t.onPointerMove(p,null,c),t.onPointerUp(m,null,c),c.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&w.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&w.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){w.onMouseLeave(this)}layout(){if(0===this.orientation){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){let t=e.initialTarget??e.target;if(t&&(0,o.sb)(t)&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}},39216:(e,t,i)=>{"use strict";i.d(t,{b6:()=>o,of:()=>a});var n=i(63003),s=i(41748);function o(e,t){var i,o;return i=[e],o=t,(0,n.e)()&&(0,s.yQ)("reload",e=>(0,n.O)(({oldExports:t})=>{if([...Object.values(t)].some(e=>i.includes(e)))return t=>(e(void 0),!0)})).read(o),e}let r=new Map;function a(e){if(!(0,n.e)())return(0,s.lk)(e);let t=e.name,i=r.get(t);return i?setTimeout(()=>{i.set(e,void 0)},0):(i=(0,s.FY)(t,e),r.set(t,i)),i}},39443:(e,t,i)=>{"use strict";i.d(t,{Y:()=>g});var n,s,o=i(32563),r=i(71974),a=i(10902),l=i(10965),h=i(62709),d=i(63325);let c=Object.create(null);function u(e,t){if(t<=0)return"";c[e]||(c[e]=["",e]);let i=c[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let g=s=class{static unshiftIndent(e,t,i,n,s){let o=r.A.visibleColumnFromColumn(e,t,i);if(s){let e=u(" ",n);return u(e,r.A.prevIndentTabStop(o,n)/n)}return u(" ",r.A.prevRenderTabStop(o,i)/i)}static shiftIndent(e,t,i,n,s){let o=r.A.visibleColumnFromColumn(e,t,i);if(s){let e=u(" ",n);return u(e,r.A.nextIndentTabStop(o,n)/n)}return u(" ",r.A.nextRenderTabStop(o,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){let i=this._selection.startLineNumber,n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);let{tabSize:l,indentSize:d,insertSpaces:c}=this._opts,g=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let u=0,p=0;for(let m=i;m<=n;m++,u=p){let n;p=0;let f=e.getLineContent(m),_=o.HG(f);if((!this._opts.isUnshift||0!==f.length&&0!==_)&&(g||this._opts.isUnshift||0!==f.length)){if(-1===_&&(_=f.length),m>1&&r.A.visibleColumnFromColumn(f,_+1,l)%d!=0&&e.tokenization.isCheapToTokenize(m-1)){let t=(0,h.h)(this._opts.autoIndent,e,new a.Q(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)),this._languageConfigurationService);if(t){if(p=u,t.appendText)for(let e=0,i=t.appendText.length;e<i&&p<d;e++)if(32===t.appendText.charCodeAt(e))p++;else break;t.removeText&&(p=Math.max(0,p-t.removeText));for(let e=0;e<p&&0!==_&&32===f.charCodeAt(_-1);e++)_--}}(!this._opts.isUnshift||0!==_)&&(n=this._opts.isUnshift?s.unshiftIndent(f,_+1,l,d,c):s.shiftIndent(f,_+1,l,d,c),this._addEditOperation(t,new a.Q(m,1,m,_+1),n),m!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=_+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);let s=c?u(" ",d):" ";for(let r=i;r<=n;r++){let n=e.getLineContent(r),l=o.HG(n);if((!this._opts.isUnshift||0!==n.length&&0!==l)&&(g||this._opts.isUnshift||0!==n.length)&&(-1===l&&(l=n.length),!this._opts.isUnshift||0!==l))if(this._opts.isUnshift){l=Math.min(l,d);for(let e=0;e<l;e++)if(9===n.charCodeAt(e)){l=e+1;break}this._addEditOperation(t,new a.Q(r,1,r,l+1),"")}else this._addEditOperation(t,new a.Q(r,1,r,1),s),r!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let e=t.getInverseEditOperations()[0];return new l.L(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}let i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let e=this._selection.startColumn;return i.startColumn<=e?i:0===i.getDirection()?new l.L(i.startLineNumber,e,i.endLineNumber,i.endColumn):new l.L(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}};g=s=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=d.JZ,function(e,t){n(e,t,2)})],g)},39454:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>l,aJ:()=>s});var n,s,o=i(51765),r=i(17397),a=i(98332);(n=s||(s={}))[n.PRESERVE=0]="PRESERVE",n[n.LAST=1]="LAST";let l={Quickaccess:"workbench.contributions.quickaccess"};class h{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),(0,r.s)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,o.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(t=>e.startsWith(t.prefix))||this.defaultProvider}}a.O.add(l.Quickaccess,new h)},39463:(e,t,i)=>{"use strict";i.d(t,{Th:()=>f,z8:()=>_});var n=i(60414),s=i(47576),o=i(10965),r=i(40375),a=i(8442),l=i(2281),h=i(13580),d=i(40724);function c(e){return e.toString()}class u{static create(e,t){let i=e.getAlternativeVersionId(),n=m(e);return new u(i,i,n,n,t,t,[])}constructor(e,t,i,n,s,o,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=o,this.changes=r}append(e,t,i,n,s){t.length>0&&(this.changes=(0,a.x)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.Sw(e,t?t.length:0,i),i+=4,t)for(let n of t)l.Sw(e,n.selectionStartLineNumber,i),i+=4,l.Sw(e,n.selectionStartColumn,i),i+=4,l.Sw(e,n.positionLineNumber,i),i+=4,l.Sw(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){let n=l.bb(e,t);t+=4;for(let s=0;s<n;s++){let n=l.bb(e,t);t+=4;let s=l.bb(e,t);t+=4;let r=l.bb(e,t);t+=4;let a=l.bb(e,t);t+=4,i.push(new o.L(n,s,r,a))}return t}serialize(){let e=10+u._writeSelectionsSize(this.beforeCursorState)+u._writeSelectionsSize(this.afterCursorState)+4;for(let t of this.changes)e+=t.writeSize();let t=new Uint8Array(e),i=0;for(let e of(l.Sw(t,this.beforeVersionId,i),i+=4,l.Sw(t,this.afterVersionId,i),i+=4,l.Gs(t,this.beforeEOL,i),i+=1,l.Gs(t,this.afterEOL,i),i+=1,i=u._writeSelections(t,this.beforeCursorState,i),i=u._writeSelections(t,this.afterCursorState,i),l.Sw(t,this.changes.length,i),i+=4,this.changes))i=e.write(t,i);return t.buffer}static deserialize(e){let t=new Uint8Array(e),i=0,n=l.bb(t,i);i+=4;let s=l.bb(t,i);i+=4;let o=l.pJ(t,i);i+=1;let r=l.pJ(t,i);i+=1;let h=[];i=u._readSelections(t,i,h);let d=[];i=u._readSelections(t,i,d);let c=l.bb(t,i);i+=4;let g=[];for(let e=0;e<c;e++)i=a.k.read(t,i,g);return new u(n,s,o,r,h,d,g)}}class g{get type(){return 0}get resource(){return r.r.isUri(this.model)?this.model:this.model.uri}constructor(e,t,i,n){this.label=e,this.code=t,this.model=i,this._data=u.create(i,n)}toString(){return(this._data instanceof u?this._data:u.deserialize(this._data)).changes.map(e=>e.toString()).join(", ")}matchesResource(e){return(r.r.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof u}append(e,t,i,n,s){this._data instanceof u&&this._data.append(e,t,i,n,s)}close(){this._data instanceof u&&(this._data=this._data.serialize())}open(){this._data instanceof u||(this._data=u.deserialize(this._data))}undo(){if(r.r.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.r.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof u&&(this._data=this._data.serialize()),this._data.byteLength+168}}class p{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,i){for(const n of(this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map,this._editStackElementsArr)){const e=c(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=c(e);return this._editStackElementsMap.has(t)}setModel(e){let t=c(r.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=c(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,s){let o=c(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){for(let e of(this._isOpen=!1,this._editStackElementsArr))e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=c(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${(0,h.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function m(e){return+("\n"!==e.getEOL())}function f(e){return!!e&&(e instanceof g||e instanceof p)}class _{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let i=this._undoRedoService.getLastElement(this._model.uri);if(f(i)&&i.canAppend(this._model))return i;let s=new g(n.kg(781,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,t),s}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],m(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n,s=d.dg.unknown({name:"pushEditOperation"})){let o=this._getOrCreateEditStackElement(e,n),r=this._model.applyEdits(t,!0,s),a=_._computeCursorState(i,r),l=r.map((e,t)=>({index:t,textChange:e.textChange}));return l.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),o.append(this._model,l.map(e=>e.textChange),m(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,s.dz)(e),null}}}},39520:(e,t,i)=>{"use strict";i.d(t,{D:()=>s});var n=i(18805);let s=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},39894:(e,t,i)=>{"use strict";let n,s,o,r;i.d(t,{$M:()=>B,EI:()=>S,FX:()=>k,GE:()=>H,HC:()=>C,Iu:()=>z,Kb:()=>L,M$:()=>b,NI:()=>V,Ni:()=>y,OV:()=>I,PK:()=>j,WA:()=>x,YT:()=>N,dG:()=>G,gP:()=>D,lO:()=>$,ou:()=>F,qw:()=>w,r4:()=>M,rY:()=>W,uB:()=>E,v_:()=>K});var a,l,h,d,c,u,g,p,m,f,_,v,b,C,w,y,S,k,x,L,D,I,N,E,M,T=i(10359),R=i(40375),O=i(10902),P=i(39947),A=i(60414);class F{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class B{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class W{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(a=b||(b={}))[a.Increase=0]="Increase",a[a.Decrease=1]="Decrease",l=C||(C={}),(n=new Map).set(0,T.W.symbolMethod),n.set(1,T.W.symbolFunction),n.set(2,T.W.symbolConstructor),n.set(3,T.W.symbolField),n.set(4,T.W.symbolVariable),n.set(5,T.W.symbolClass),n.set(6,T.W.symbolStruct),n.set(7,T.W.symbolInterface),n.set(8,T.W.symbolModule),n.set(9,T.W.symbolProperty),n.set(10,T.W.symbolEvent),n.set(11,T.W.symbolOperator),n.set(12,T.W.symbolUnit),n.set(13,T.W.symbolValue),n.set(15,T.W.symbolEnum),n.set(14,T.W.symbolConstant),n.set(15,T.W.symbolEnum),n.set(16,T.W.symbolEnumMember),n.set(17,T.W.symbolKeyword),n.set(28,T.W.symbolSnippet),n.set(18,T.W.symbolText),n.set(19,T.W.symbolColor),n.set(20,T.W.symbolFile),n.set(21,T.W.symbolReference),n.set(22,T.W.symbolCustomColor),n.set(23,T.W.symbolFolder),n.set(24,T.W.symbolTypeParameter),n.set(25,T.W.account),n.set(26,T.W.issues),n.set(27,T.W.tools),l.toIcon=function(e){let t=n.get(e);return t||(console.info("No codicon found for CompletionItemKind "+e),t=T.W.symbolProperty),t},l.toLabel=function(e){switch(e){case 0:return(0,A.kg)(724,"Method");case 1:return(0,A.kg)(725,"Function");case 2:return(0,A.kg)(726,"Constructor");case 3:return(0,A.kg)(727,"Field");case 4:return(0,A.kg)(728,"Variable");case 5:return(0,A.kg)(729,"Class");case 6:return(0,A.kg)(730,"Struct");case 7:return(0,A.kg)(731,"Interface");case 8:return(0,A.kg)(732,"Module");case 9:return(0,A.kg)(733,"Property");case 10:return(0,A.kg)(734,"Event");case 11:return(0,A.kg)(735,"Operator");case 12:return(0,A.kg)(736,"Unit");case 13:return(0,A.kg)(737,"Value");case 14:return(0,A.kg)(738,"Constant");case 15:return(0,A.kg)(739,"Enum");case 16:return(0,A.kg)(740,"Enum Member");case 17:return(0,A.kg)(741,"Keyword");case 18:return(0,A.kg)(742,"Text");case 19:return(0,A.kg)(743,"Color");case 20:return(0,A.kg)(744,"File");case 21:return(0,A.kg)(745,"Reference");case 22:return(0,A.kg)(746,"Custom Color");case 23:return(0,A.kg)(747,"Folder");case 24:return(0,A.kg)(748,"Type Parameter");case 25:return(0,A.kg)(749,"User");case 26:return(0,A.kg)(750,"Issue");case 27:return(0,A.kg)(751,"Tool");case 28:return(0,A.kg)(752,"Snippet");default:return""}},(s=new Map).set("method",0),s.set("function",1),s.set("constructor",2),s.set("field",3),s.set("variable",4),s.set("class",5),s.set("struct",6),s.set("interface",7),s.set("module",8),s.set("property",9),s.set("event",10),s.set("operator",11),s.set("unit",12),s.set("value",13),s.set("constant",14),s.set("enum",15),s.set("enum-member",16),s.set("enumMember",16),s.set("keyword",17),s.set("snippet",28),s.set("text",18),s.set("color",19),s.set("file",20),s.set("reference",21),s.set("customcolor",22),s.set("folder",23),s.set("type-parameter",24),s.set("typeParameter",24),s.set("account",25),s.set("issue",26),s.set("tool",27),l.fromString=function(e,t){let i=s.get(e);return void 0!==i||t||(i=9),i},(h=w||(w={}))[h.Automatic=0]="Automatic",h[h.Explicit=1]="Explicit";class H{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return O.Q.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}(d=y||(y={}))[d.Code=1]="Code",d[d.Label=2]="Label";class V{static fromExtensionId(e){return new V(e,void 0,void 0)}constructor(e,t,i){this.extensionId=e,this.extensionVersion=t,this.providerId=i}toString(){let e="";return this.extensionId&&(e+=this.extensionId),this.extensionVersion&&(e+=`@${this.extensionVersion}`),this.providerId&&(e+=`:${this.providerId}`),0===e.length&&(e="unknown"),e}}function z(e){return e&&R.r.isUri(e.uri)&&O.Q.isIRange(e.range)&&(O.Q.isIRange(e.originSelectionRange)||O.Q.isIRange(e.targetSelectionRange))}(c=S||(S={}))[c.Accepted=0]="Accepted",c[c.Rejected=1]="Rejected",c[c.Ignored=2]="Ignored",(u=k||(k={}))[u.Automatic=0]="Automatic",u[u.PasteAs=1]="PasteAs",(g=x||(x={}))[g.Invoke=1]="Invoke",g[g.TriggerCharacter=2]="TriggerCharacter",g[g.ContentChange=3]="ContentChange",(p=L||(L={}))[p.Text=0]="Text",p[p.Read=1]="Read",p[p.Write=2]="Write";let U={17:(0,A.kg)(753,"array"),16:(0,A.kg)(754,"boolean"),4:(0,A.kg)(755,"class"),13:(0,A.kg)(756,"constant"),8:(0,A.kg)(757,"constructor"),9:(0,A.kg)(758,"enumeration"),21:(0,A.kg)(759,"enumeration member"),23:(0,A.kg)(760,"event"),7:(0,A.kg)(761,"field"),0:(0,A.kg)(762,"file"),11:(0,A.kg)(763,"function"),10:(0,A.kg)(764,"interface"),19:(0,A.kg)(765,"key"),5:(0,A.kg)(766,"method"),1:(0,A.kg)(767,"module"),2:(0,A.kg)(768,"namespace"),20:(0,A.kg)(769,"null"),15:(0,A.kg)(770,"number"),18:(0,A.kg)(771,"object"),24:(0,A.kg)(772,"operator"),3:(0,A.kg)(773,"package"),6:(0,A.kg)(774,"property"),14:(0,A.kg)(775,"string"),22:(0,A.kg)(776,"struct"),25:(0,A.kg)(777,"type parameter"),12:(0,A.kg)(778,"variable")};function j(e,t){return(0,A.kg)(779,"{0} ({1})",e,U[t])}m=D||(D={}),(o=new Map).set(0,T.W.symbolFile),o.set(1,T.W.symbolModule),o.set(2,T.W.symbolNamespace),o.set(3,T.W.symbolPackage),o.set(4,T.W.symbolClass),o.set(5,T.W.symbolMethod),o.set(6,T.W.symbolProperty),o.set(7,T.W.symbolField),o.set(8,T.W.symbolConstructor),o.set(9,T.W.symbolEnum),o.set(10,T.W.symbolInterface),o.set(11,T.W.symbolFunction),o.set(12,T.W.symbolVariable),o.set(13,T.W.symbolConstant),o.set(14,T.W.symbolString),o.set(15,T.W.symbolNumber),o.set(16,T.W.symbolBoolean),o.set(17,T.W.symbolArray),o.set(18,T.W.symbolObject),o.set(19,T.W.symbolKey),o.set(20,T.W.symbolNull),o.set(21,T.W.symbolEnumMember),o.set(22,T.W.symbolStruct),o.set(23,T.W.symbolEvent),o.set(24,T.W.symbolOperator),o.set(25,T.W.symbolTypeParameter),m.toIcon=function(e){let t=o.get(e);return t||(console.info("No codicon found for SymbolKind "+e),t=T.W.symbolProperty),t},(r=new Map).set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24),m.toCompletionKind=function(e){let t=r.get(e);return void 0===t&&(console.info("No completion kind found for SymbolKind "+e),t=20),t};class ${static{this.Comment=new $("comment")}static{this.Imports=new $("imports")}static{this.Region=new $("region")}static fromValue(e){switch(e){case"comment":return $.Comment;case"imports":return $.Imports;case"region":return $.Region}return new $(e)}constructor(e){this.value=e}}(f=I||(I={}))[f.AIGenerated=1]="AIGenerated",(_=N||(N={}))[_.Invoke=0]="Invoke",_[_.Automatic=1]="Automatic",(E||(E={})).is=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.title},(v=M||(M={}))[v.Type=1]="Type",v[v.Parameter=2]="Parameter";class K{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}let G=new P.d},39898:(e,t,i)=>{"use strict";i.d(t,{s:()=>s});var n=i(71974);class s{static whitespaceVisibleColumn(e,t,i){let s=e.length,o=0,r=-1,a=-1;for(let l=0;l<s;l++){if(l===t)return[r,a,o];switch(o%i==0&&(r=l,a=o),e.charCodeAt(l)){case 32:o+=1;break;case 9:o=n.A.nextRenderTabStop(o,i);break;default:return[-1,-1,-1]}}return t===s?[r,a,o]:[-1,-1,-1]}static atomicPosition(e,t,i,o){let r,a=e.length,[l,h,d]=s.whitespaceVisibleColumn(e,t,i);if(-1===d)return -1;switch(o){case 0:r=!0;break;case 1:r=!1;break;case 2:if(d%i==0)return t;r=d%i<=i/2}if(r){if(-1===l)return -1;let t=h;for(let s=l;s<a;++s){if(t===h+i)return l;switch(e.charCodeAt(s)){case 32:t+=1;break;case 9:t=n.A.nextRenderTabStop(t,i);break;default:return -1}}return t===h+i?l:-1}let c=n.A.nextRenderTabStop(d,i),u=d;for(let s=t;s<a;s++){if(u===c)return s;switch(e.charCodeAt(s)){case 32:u+=1;break;case 9:u=n.A.nextRenderTabStop(u,i);break;default:return -1}}return u===c?a:-1}}},40217:()=>{},40364:(e,t,i)=>{"use strict";i.d(t,{D8:()=>f,L:()=>y,Xe:()=>w,ZG:()=>b,ez:()=>_,i1:()=>m,is:()=>p,nI:()=>C,ug:()=>S});var n,s=i(86578),o=i(18805),r=i(17397),a=i(56046),l=i(46546),h=i(71244),d=i(49044),c=i(51328),u=i(69662),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}function m(e){return void 0!==e.submenu}class f{static{this._instances=new Map}static{this.CommandPalette=new f("CommandPalette")}static{this.DebugBreakpointsContext=new f("DebugBreakpointsContext")}static{this.DebugCallStackContext=new f("DebugCallStackContext")}static{this.DebugConsoleContext=new f("DebugConsoleContext")}static{this.DebugVariablesContext=new f("DebugVariablesContext")}static{this.NotebookVariablesContext=new f("NotebookVariablesContext")}static{this.DebugHoverContext=new f("DebugHoverContext")}static{this.DebugWatchContext=new f("DebugWatchContext")}static{this.DebugToolBar=new f("DebugToolBar")}static{this.DebugToolBarStop=new f("DebugToolBarStop")}static{this.DebugDisassemblyContext=new f("DebugDisassemblyContext")}static{this.DebugCallStackToolbar=new f("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new f("DebugCreateConfiguration")}static{this.EditorContext=new f("EditorContext")}static{this.SimpleEditorContext=new f("SimpleEditorContext")}static{this.EditorContent=new f("EditorContent")}static{this.EditorLineNumberContext=new f("EditorLineNumberContext")}static{this.EditorContextCopy=new f("EditorContextCopy")}static{this.EditorContextPeek=new f("EditorContextPeek")}static{this.EditorContextShare=new f("EditorContextShare")}static{this.EditorTitle=new f("EditorTitle")}static{this.CompactWindowEditorTitle=new f("CompactWindowEditorTitle")}static{this.EditorTitleRun=new f("EditorTitleRun")}static{this.EditorTitleContext=new f("EditorTitleContext")}static{this.EditorTitleContextShare=new f("EditorTitleContextShare")}static{this.EmptyEditorGroup=new f("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new f("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new f("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new f("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new f("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new f("EditorActionsPositionSubmenu")}static{this.EditorSplitMoveSubmenu=new f("EditorSplitMoveSubmenu")}static{this.ExplorerContext=new f("ExplorerContext")}static{this.ExplorerContextShare=new f("ExplorerContextShare")}static{this.ExtensionContext=new f("ExtensionContext")}static{this.ExtensionEditorContextMenu=new f("ExtensionEditorContextMenu")}static{this.GlobalActivity=new f("GlobalActivity")}static{this.CommandCenter=new f("CommandCenter")}static{this.CommandCenterCenter=new f("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new f("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new f("LayoutControlMenu")}static{this.MenubarMainMenu=new f("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new f("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new f("MenubarDebugMenu")}static{this.MenubarEditMenu=new f("MenubarEditMenu")}static{this.MenubarCopy=new f("MenubarCopy")}static{this.MenubarFileMenu=new f("MenubarFileMenu")}static{this.MenubarGoMenu=new f("MenubarGoMenu")}static{this.MenubarHelpMenu=new f("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new f("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new f("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new f("PanelAlignmentMenu")}static{this.PanelPositionMenu=new f("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new f("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new f("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new f("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new f("MenubarSelectionMenu")}static{this.MenubarShare=new f("MenubarShare")}static{this.MenubarSwitchEditorMenu=new f("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new f("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new f("MenubarTerminalMenu")}static{this.MenubarTerminalSuggestStatusMenu=new f("MenubarTerminalSuggestStatusMenu")}static{this.MenubarViewMenu=new f("MenubarViewMenu")}static{this.MenubarHomeMenu=new f("MenubarHomeMenu")}static{this.OpenEditorsContext=new f("OpenEditorsContext")}static{this.OpenEditorsContextShare=new f("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new f("ProblemsPanelContext")}static{this.SCMInputBox=new f("SCMInputBox")}static{this.SCMChangeContext=new f("SCMChangeContext")}static{this.SCMResourceContext=new f("SCMResourceContext")}static{this.SCMResourceContextShare=new f("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new f("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new f("SCMResourceGroupContext")}static{this.SCMSourceControl=new f("SCMSourceControl")}static{this.SCMSourceControlInline=new f("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new f("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new f("SCMHistoryTitle")}static{this.SCMHistoryItemContext=new f("SCMHistoryItemContext")}static{this.SCMHistoryItemChangeContext=new f("SCMHistoryItemChangeContext")}static{this.SCMHistoryItemHover=new f("SCMHistoryItemHover")}static{this.SCMHistoryItemRefContext=new f("SCMHistoryItemRefContext")}static{this.SCMQuickDiffDecorations=new f("SCMQuickDiffDecorations")}static{this.SCMTitle=new f("SCMTitle")}static{this.SearchContext=new f("SearchContext")}static{this.SearchActionMenu=new f("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new f("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new f("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new f("StickyScrollContext")}static{this.TestItem=new f("TestItem")}static{this.TestItemGutter=new f("TestItemGutter")}static{this.TestProfilesContext=new f("TestProfilesContext")}static{this.TestMessageContext=new f("TestMessageContext")}static{this.TestMessageContent=new f("TestMessageContent")}static{this.TestPeekElement=new f("TestPeekElement")}static{this.TestPeekTitle=new f("TestPeekTitle")}static{this.TestCallStack=new f("TestCallStack")}static{this.TestCoverageFilterItem=new f("TestCoverageFilterItem")}static{this.TouchBarContext=new f("TouchBarContext")}static{this.TitleBar=new f("TitleBar")}static{this.TitleBarContext=new f("TitleBarContext")}static{this.TitleBarTitleContext=new f("TitleBarTitleContext")}static{this.TunnelContext=new f("TunnelContext")}static{this.TunnelPrivacy=new f("TunnelPrivacy")}static{this.TunnelProtocol=new f("TunnelProtocol")}static{this.TunnelPortInline=new f("TunnelInline")}static{this.TunnelTitle=new f("TunnelTitle")}static{this.TunnelLocalAddressInline=new f("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new f("TunnelOriginInline")}static{this.ViewItemContext=new f("ViewItemContext")}static{this.ViewContainerTitle=new f("ViewContainerTitle")}static{this.ViewContainerTitleContext=new f("ViewContainerTitleContext")}static{this.ViewTitle=new f("ViewTitle")}static{this.ViewTitleContext=new f("ViewTitleContext")}static{this.CommentEditorActions=new f("CommentEditorActions")}static{this.CommentThreadTitle=new f("CommentThreadTitle")}static{this.CommentThreadActions=new f("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new f("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new f("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new f("CommentThreadCommentContext")}static{this.CommentTitle=new f("CommentTitle")}static{this.CommentActions=new f("CommentActions")}static{this.CommentsViewThreadActions=new f("CommentsViewThreadActions")}static{this.InteractiveToolbar=new f("InteractiveToolbar")}static{this.InteractiveCellTitle=new f("InteractiveCellTitle")}static{this.InteractiveCellDelete=new f("InteractiveCellDelete")}static{this.InteractiveCellExecute=new f("InteractiveCellExecute")}static{this.InteractiveInputExecute=new f("InteractiveInputExecute")}static{this.InteractiveInputConfig=new f("InteractiveInputConfig")}static{this.ReplInputExecute=new f("ReplInputExecute")}static{this.IssueReporter=new f("IssueReporter")}static{this.NotebookToolbar=new f("NotebookToolbar")}static{this.NotebookToolbarContext=new f("NotebookToolbarContext")}static{this.NotebookStickyScrollContext=new f("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new f("NotebookCellTitle")}static{this.NotebookCellDelete=new f("NotebookCellDelete")}static{this.NotebookCellInsert=new f("NotebookCellInsert")}static{this.NotebookCellBetween=new f("NotebookCellBetween")}static{this.NotebookCellListTop=new f("NotebookCellTop")}static{this.NotebookCellExecute=new f("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new f("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new f("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new f("NotebookDiffCellInputTitle")}static{this.NotebookDiffDocumentMetadata=new f("NotebookDiffDocumentMetadata")}static{this.NotebookDiffCellMetadataTitle=new f("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new f("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new f("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new f("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new f("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new f("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new f("NotebookKernelSource")}static{this.BulkEditTitle=new f("BulkEditTitle")}static{this.BulkEditContext=new f("BulkEditContext")}static{this.TimelineItemContext=new f("TimelineItemContext")}static{this.TimelineTitle=new f("TimelineTitle")}static{this.TimelineTitleContext=new f("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new f("TimelineFilterSubMenu")}static{this.AccountsContext=new f("AccountsContext")}static{this.SidebarTitle=new f("SidebarTitle")}static{this.PanelTitle=new f("PanelTitle")}static{this.AuxiliaryBarTitle=new f("AuxiliaryBarTitle")}static{this.TerminalInstanceContext=new f("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new f("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new f("TerminalNewDropdownContext")}static{this.TerminalTabContext=new f("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new f("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new f("TerminalStickyScrollContext")}static{this.WebviewContext=new f("WebviewContext")}static{this.InlineCompletionsActions=new f("InlineCompletionsActions")}static{this.InlineEditsActions=new f("InlineEditsActions")}static{this.NewFile=new f("NewFile")}static{this.MergeInput1Toolbar=new f("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new f("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new f("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new f("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new f("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new f("InlineEditToolbar")}static{this.ChatContext=new f("ChatContext")}static{this.ChatCodeBlock=new f("ChatCodeblock")}static{this.ChatCompareBlock=new f("ChatCompareBlock")}static{this.ChatMessageTitle=new f("ChatMessageTitle")}static{this.ChatHistory=new f("ChatHistory")}static{this.ChatWelcomeHistoryContext=new f("ChatWelcomeHistoryContext")}static{this.ChatMessageFooter=new f("ChatMessageFooter")}static{this.ChatExecute=new f("ChatExecute")}static{this.ChatExecuteSecondary=new f("ChatExecuteSecondary")}static{this.ChatInput=new f("ChatInput")}static{this.ChatInputSide=new f("ChatInputSide")}static{this.ChatModePicker=new f("ChatModePicker")}static{this.ChatEditingWidgetToolbar=new f("ChatEditingWidgetToolbar")}static{this.ChatEditingEditorContent=new f("ChatEditingEditorContent")}static{this.ChatEditingEditorHunk=new f("ChatEditingEditorHunk")}static{this.ChatEditingDeletedNotebookCell=new f("ChatEditingDeletedNotebookCell")}static{this.ChatInputAttachmentToolbar=new f("ChatInputAttachmentToolbar")}static{this.ChatEditingWidgetModifiedFilesToolbar=new f("ChatEditingWidgetModifiedFilesToolbar")}static{this.ChatInputResourceAttachmentContext=new f("ChatInputResourceAttachmentContext")}static{this.ChatInputSymbolAttachmentContext=new f("ChatInputSymbolAttachmentContext")}static{this.ChatInlineResourceAnchorContext=new f("ChatInlineResourceAnchorContext")}static{this.ChatInlineSymbolAnchorContext=new f("ChatInlineSymbolAnchorContext")}static{this.ChatMessageCheckpoint=new f("ChatMessageCheckpoint")}static{this.ChatMessageRestoreCheckpoint=new f("ChatMessageRestoreCheckpoint")}static{this.ChatEditingCodeBlockContext=new f("ChatEditingCodeBlockContext")}static{this.ChatTitleBarMenu=new f("ChatTitleBarMenu")}static{this.ChatAttachmentsContext=new f("ChatAttachmentsContext")}static{this.ChatToolOutputResourceToolbar=new f("ChatToolOutputResourceToolbar")}static{this.ChatTextEditorMenu=new f("ChatTextEditorMenu")}static{this.ChatToolOutputResourceContext=new f("ChatToolOutputResourceContext")}static{this.ChatMultiDiffContext=new f("ChatMultiDiffContext")}static{this.ChatSessionsMenu=new f("ChatSessionsMenu")}static{this.ChatConfirmationMenu=new f("ChatConfirmationMenu")}static{this.AccessibleView=new f("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new f("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new f("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new f("DiffEditorSelectionToolbar")}constructor(e){if(f._instances.has(e))throw TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);f._instances.set(e,this),this.id=e}}let _=(0,c.u1)("menuService");class v{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new v(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let i of e)i instanceof v&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}let b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new o.QT({merge:v.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(v.for(f.CommandPalette)),(0,r.lC)((0,r.s)(()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(v.for(f.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new a.w,this._menuItems.set(e,i));let n=i.push(t);return this._onDidChangeMenu.fire(v.for(e)),(0,r.lC)((0,r.s)(()=>{n(),this._onDidChangeMenu.fire(v.for(e))}))}appendMenuItems(e){let t=new r.Cm;for(let{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===f.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){let t=new Set;for(let i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};class C extends s.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let w=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,s,o,r,a){let h;if(this.hideActions=s,this.menuKeybinding=o,this._commandService=a,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"==typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&l.L.isThemeIcon(t.icon)&&(h=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}h||(h=l.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,s,void 0,r,a):void 0,this._options=i,this.class=h&&l.L.asClassName(h)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};w=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(5,d.fN),g(6,h.d)],w);class y{constructor(e){this.desc=e}}function S(e){let t=[],i=new e,{f1:n,menu:s,keybinding:o,...a}=i.desc;if(h.w.getCommand(a.id))throw Error(`Cannot register two commands with the same id: ${a.id}`);if(t.push(h.w.registerCommand({id:a.id,handler:(e,...t)=>i.run(e,...t),metadata:a.metadata??{description:i.desc.title}})),Array.isArray(s))for(let e of s)t.push(b.appendMenuItem(e.id,{command:{...a,precondition:null===e.precondition?void 0:a.precondition},...e}));else s&&t.push(b.appendMenuItem(s.id,{command:{...a,precondition:null===s.precondition?void 0:a.precondition},...s}));if(n&&(t.push(b.appendMenuItem(f.CommandPalette,{command:a,when:a.precondition})),t.push(b.addCommand(a))),Array.isArray(o))for(let e of o)t.push(u.f.registerKeybindingRule({...e,id:a.id,when:a.precondition?d.M$.and(a.precondition,e.when):e.when}));else o&&t.push(u.f.registerKeybindingRule({...o,id:a.id,when:a.precondition?d.M$.and(a.precondition,o.when):o.when}));return{dispose(){(0,r.AS)(t)}}}},40365:(e,t,i)=>{"use strict";i.d(t,{P:()=>c,k:()=>u});var n=i(17970),s=i(32563),o=i(71974),r=i(10902),a=i(63130),l=i(8582),h=i(89984),d=i(47576);class c extends a._{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.G)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new d.D7("Illegal value for lineNumber");let s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(s&&s.offSide),r=-2,a=-1,l=-2,h=-1,c=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){l=t,h=e;break}}}},u=-2,g=-1,p=-2,m=-1,f=e=>{if(-2===u){u=-1,g=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){u=t,g=e;break}}}if(-1!==p&&(-2===p||p<e-1)){p=-1,m=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){p=t,m=e;break}}}},_=0,v=!0,b=0,C=!0,w=0,y=0;for(let s=0;v||C;s++){let r=e-s,d=e+s;s>1&&(r<1||r<t)&&(v=!1),s>1&&(d>n||d>i)&&(C=!1),s>5e4&&(v=!1,C=!1);let p=-1;if(v&&r>=1){let e=this._computeIndentLevel(r-1);e>=0?(l=r-1,h=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(c(r),p=this._getIndentLevelForWhitespaceLine(o,a,h))}let S=-1;if(C&&d<=n){let e=this._computeIndentLevel(d-1);e>=0?(u=d-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(f(d),S=this._getIndentLevelForWhitespaceLine(o,g,m))}if(0===s){y=p;continue}if(1===s){if(d<=n&&S>=0&&y+1===S){v=!1,_=d,b=d,w=S;continue}if(r>=1&&p>=0&&p-1===y){C=!1,_=r,b=r,w=p;continue}if(_=e,b=e,0===(w=y))break}v&&(p>=w?_=r:v=!1),C&&(S>=w?b=d:C=!1)}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,o){let a,l=[];for(let i=e;i<=t;i++)l.push([]);let d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();if(i&&d.length>0){let s=(e<=i.lineNumber&&i.lineNumber<=t?d:this.textModel.bracketPairs.getBracketPairsInRange(r.Q.fromPositions(i)).toArray()).filter(e=>r.Q.strictContainsPosition(e.range,i));a=(0,n.Uk)(s,e=>!0)?.range}let c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new u;for(let i of d){if(!i.closingBracketRange)continue;let n=a&&i.range.equalsRange(a);if(!n&&!o.includeInactive)continue;let r=g.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,c)+(o.highlightActive&&n?" "+g.activeClassName:""),d=i.openingBracketRange.getStartPosition(),u=i.closingBracketRange.getStartPosition(),p=o.horizontalGuides===h.N6.Enabled||o.horizontalGuides===h.N6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){p&&l[i.range.startLineNumber-e].push(new h.TH(-1,i.openingBracketRange.getEndPosition().column,r,new h.pv(!1,u.column),-1,-1));continue}let m=this.getVisibleColumnFromPosition(u),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(f,m,i.minVisibleColumnIndentation+1),v=!1;s.HG(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))<i.closingBracketRange.startColumn-1&&(v=!0);let b=Math.max(d.lineNumber,e),C=Math.min(u.lineNumber,t),w=+!!v;for(let t=b;t<C+w;t++)l[t-e].push(new h.TH(_,-1,r,null,t===d.lineNumber?d.column:-1,t===u.lineNumber?u.column:-1));p&&(d.lineNumber>=e&&f>_&&l[d.lineNumber-e].push(new h.TH(_,-1,r,new h.pv(!1,d.column),-1,-1)),u.lineNumber<=t&&m>_&&l[u.lineNumber-e].push(new h.TH(_,-1,r,new h.pv(!v,u.column),-1,-1)))}for(let e of l)e.sort((e,t)=>e.visibleColumn-t.visibleColumn);return l}getVisibleColumnFromPosition(e){return o.A.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let i=this.textModel.getLineCount();if(e<1||e>i)throw Error("Illegal value for startLineNumber");if(t<1||t>i)throw Error("Illegal value for endLineNumber");let n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(s&&s.offSide),r=Array(t-e+1),a=-2,l=-1,h=-2,d=-1;for(let s=e;s<=t;s++){let t=s-e,c=this._computeIndentLevel(s-1);if(c>=0){a=s-1,l=c,r[t]=Math.ceil(c/n.indentSize);continue}if(-2===a){a=-1,l=-1;for(let e=s-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h<s-1)){h=-1,d=-1;for(let e=s;e<i;e++){let t=this._computeIndentLevel(e);if(t>=0){h=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,l,d)}return r}_getIndentLevelForWhitespaceLine(e,t,i){let n=this.textModel.getOptions();return -1===t||-1===i?0:t<i?1+Math.floor(t/n.indentSize):t===i?Math.ceil(i/n.indentSize):e?Math.ceil(i/n.indentSize):1+Math.floor(i/n.indentSize)}}class u{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,t,i){return this.getInlineClassNameOfLevel(i?t:e)}getInlineClassNameOfLevel(e){return`bracket-indent-guide lvl-${e%30}`}}},40375:(e,t,i)=>{"use strict";i.d(t,{I:()=>m,r:()=>h});var n=i(33128),s=i(18780);let o=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"object"==typeof e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,s,l=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=function(e,t){return e||t?e:"file"}(e,l),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t}(this.scheme,i||""),this.query=n||"",this.fragment=s||"",function(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!r.test(e.path))throw Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,l))}get fsPath(){return m(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return(void 0===t?t=this.scheme:null===t&&(t=""),void 0===i?i=this.authority:null===i&&(i=""),void 0===n?n=this.path:null===n&&(n=""),void 0===s?s=this.query:null===s&&(s=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment)?this:new c(t,i,n,s,o)}static parse(e,t=!1){let i=l.exec(e);return i?new c(i[2]||"",v(i[4]||""),v(i[5]||""),v(i[7]||""),v(i[9]||""),t):new c("","","","","")}static file(e){let t="";if(s.uF&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1]){let i=e.indexOf("/",2);-1===i?(t=e.substring(2),e="/"):(t=e.substring(2,i),e=e.substring(i)||"/")}return new c("file",t,e,"","")}static from(e,t){return new c(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){let i;if(!e.path)throw Error("[UriError]: cannot call joinPath on URI without path");return i=s.uF&&"file"===e.scheme?h.file(n.IN.join(m(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return f(this,e)}toJSON(){return this}static revive(e){if(!e)return e;{if(e instanceof h)return e;let t=new c(e);return t._formatted=e.external??null,t._fsPath=e._sep===d?e.fsPath??null:null,t}}}let d=s.uF?1:void 0;class c extends h{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(e=!1){return e?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let u={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,i){let n,s=-1;for(let o=0;o<e.length;o++){let r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));let t=u[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return -1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function p(e){let t;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=u[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function m(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&90>=e.path.charCodeAt(1)||e.path.charCodeAt(1)>=97&&122>=e.path.charCodeAt(1))&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s.uF&&(i=i.replace(/\//g,"\\")),i}function f(e,t){let i=t?p:g,n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+="/",n+="/"),o){let e=o.indexOf("@");if(-1!==e){let t=o.substr(0,e);o=o.substr(e+1),-1===(e=t.lastIndexOf(":"))?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}-1===(e=(o=o.toLowerCase()).lastIndexOf(":"))?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){let e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){let e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:g(l,!1,!1)),n}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,e=>(function e(t){try{return decodeURIComponent(t)}catch{if(t.length>3)return t.substr(0,3)+e(t.substr(3));return t}})(e)):e}},40380:()=>{},40514:(e,t,i)=>{"use strict";i.d(t,{E6:()=>c,Hw:()=>r,YN:()=>o,gf:()=>l,n9:()=>h,oq:()=>a,tu:()=>u,vp:()=>d});var n,s,o,r,a,l,h,d,c,u,g=i(60414);(o||(o={})).inspectTokensAction=g.kg(782,"Developer: Inspect Tokens"),(r||(r={})).gotoLineActionLabel=g.kg(783,"Go to Line/Column..."),(a||(a={})).helpQuickAccessActionLabel=g.kg(784,"Show all Quick Access Providers"),(n=l||(l={})).quickCommandActionLabel=g.kg(785,"Command Palette"),n.quickCommandHelp=g.kg(786,"Show And Run Commands"),(s=h||(h={})).quickOutlineActionLabel=g.kg(787,"Go to Symbol..."),s.quickOutlineByCategoryActionLabel=g.kg(788,"Go to Symbol by Category..."),(d||(d={})).editorViewAccessibleLabel=g.kg(789,"Editor content"),(c||(c={})).toggleHighContrast=g.kg(790,"Toggle High Contrast Theme"),(u||(u={})).bulkEditServiceSummary=g.kg(791,"Made {0} edits in {1} files")},40524:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});let n=(0,i(51328).u1)("environmentService")},40724:(e,t,i)=>{"use strict";i.d(t,{OL:()=>a,dg:()=>h,lw:()=>u});var n,s=i(24924),o=i(21040);let r=Symbol("TextModelEditSource");class a{constructor(e,t){this.metadata=e}toString(){return`${this.metadata.source}`}getType(){let e=this.metadata;switch(e.source){case"cursor":return e.kind;case"inlineCompletionAccept":return e.source+(e.$nes?":nes":"");case"unknown":return e.name||"unknown";default:return e.source}}toKey(e,t={}){return Object.entries(this.metadata).filter(([i,n])=>{let s=t[i];return void 0!==s?s:(i.match(/\$/g)||[]).length<=e&&null!=n&&""!==n}).map(([e,t])=>`${e}:${t}`).join("-")}}function l(e){return new a(e,r)}let h={unknown:e=>l({source:"unknown",name:e.name}),rename:()=>l({source:"rename"}),chatApplyEdits:e=>l({source:"Chat.applyEdits",$modelId:c(e.modelId),$extensionId:e.extensionId?.extensionId,$extensionVersion:e.extensionId?.version,$$languageId:e.languageId,$$sessionId:e.sessionId,$$requestId:e.requestId,$$mode:e.mode,$$codeBlockSuggestionId:e.codeBlockSuggestionId}),chatUndoEdits:()=>l({source:"Chat.undoEdits"}),chatReset:()=>l({source:"Chat.reset"}),inlineCompletionAccept:e=>l({source:"inlineCompletionAccept",$nes:e.nes,...d(e.providerId),$$requestUuid:e.requestUuid,$$languageId:e.languageId}),inlineCompletionPartialAccept:e=>l({source:"inlineCompletionPartialAccept",type:e.type,$nes:e.nes,...d(e.providerId),$$requestUuid:e.requestUuid,$$languageId:e.languageId}),inlineChatApplyEdit:e=>l({source:"inlineChat.applyEdits",$modelId:c(e.modelId),$extensionId:e.extensionId?.extensionId,$extensionVersion:e.extensionId?.version,$$requestId:e.requestId,$$languageId:e.languageId}),reloadFromDisk:()=>l({source:"reloadFromDisk"}),cursor:e=>l({source:"cursor",kind:e.kind,detailedSource:e.detailedSource}),setValue:()=>l({source:"setValue"}),eolChange:()=>l({source:"eolChange"}),applyEdits:()=>l({source:"applyEdits"}),snippet:()=>l({source:"snippet"}),suggest:e=>l({source:"suggest",...d(e.providerId)}),codeAction:e=>l({source:"codeAction",$kind:e.kind,...d(e.providerId)})};function d(e){return e?{$extensionId:e.extensionId,$extensionVersion:e.extensionVersion,$providerId:e.providerId}:{}}function c(e){if(void 0!==e)return e.replaceAll("/","|")}class u{static fromText(e){return new u(o.W.ofText(e).lineCount,0,e.length,0)}static tryCreate(e,t,i,n){if(void 0!==e&&void 0!==t&&void 0!==i&&void 0!==n)return new u(e,t,i,n)}constructor(e,t,i,n){this.linesAdded=e,this.linesRemoved=t,this.charsAdded=i,this.charsRemoved=n}}(n||(n={})).newId=function(){return(0,s.t)("sgt")}},41132:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n,s,o,r=i(32563);(n=o||(o={}))[n.Ignore=0]="Ignore",n[n.Info=1]="Info",n[n.Warning=2]="Warning",n[n.Error=3]="Error",(s=o||(o={})).fromValue=function(e){return e?r.Q_("error",e)?s.Error:r.Q_("warning",e)||r.Q_("warn",e)?s.Warning:r.Q_("info",e)?s.Info:s.Ignore:s.Ignore},s.toString=function(e){switch(e){case s.Error:return"error";case s.Warning:return"warning";case s.Info:return"info";default:return"ignore"}};let a=o},41748:(e,t,i)=>{"use strict";let n;i.d(t,{jM:()=>d.j,BK:()=>N,XL:()=>a.XL,fL:()=>a.fL,fm:()=>v,Z7:()=>y,Y:()=>C,zL:()=>b,yC:()=>w,lk:()=>G,pl:()=>W,un:()=>k,t:()=>ee,a0:()=>I,nb:()=>D,ZX:()=>z,C:()=>L,dQ:()=>x,X2:()=>g,YY:()=>a.YY,Rl:()=>U,y0:()=>O,eP:()=>P,Yd:()=>F,yQ:()=>Q,FY:()=>c,Zh:()=>f,OI:()=>H,jv:()=>$,fW:()=>K,lp:()=>Z,fT:()=>J,yi:()=>X,PO:()=>a.PO,Rn:()=>a.Rn,oJ:()=>R});var s,o=i(4360),r=i(12338),a=i(20020),l=i(16891),h=i(97375),d=i(69048);function c(e,t,i=d.j.ofCaller()){return new u("string"==typeof e?new o.nA(void 0,e,void 0):new o.nA(e,void 0,void 0),t,r.nx,i)}class u extends l.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._value=t,(0,h.tZ)()?.handleObservableUpdated(this,{hadValue:!1,newValue:t,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new a.XL(()=>{},()=>`Setting ${this.debugName}`));try{let n=this._value;for(let s of(this._setValue(e),(0,h.tZ)()?.handleObservableUpdated(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0}),this._observers))t.updateObserver(s,this),s.handleChange(this,i)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}}function g(e,t,i=d.j.ofCaller()){return new p("string"==typeof e?new o.nA(void 0,e,void 0):new o.nA(e,void 0,void 0),t,r.nx,i)}class p extends u{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}class m extends l.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas)for(let t of((0,h.tZ)()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))t.handleChange(this,e);this._deltas.length=0}else for(let e of((0,h.tZ)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter)for(let e of(this._update(),[...this._observers]))e.endUpdate(this)}addObserver(e){let t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new a.XL(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(let e of this._observers)e.handlePossibleChange(this)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function f(e,t,i=d.j.ofCaller()){return e.lazy?new m(new o.nA(e.owner,e.debugName,void 0),t,e.equalsFn??r.nx,i):new u(new o.nA(e.owner,e.debugName,void 0),t,e.equalsFn??r.nx,i)}class _{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this._changeTracker=i,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,h.tZ)()?.handleAutorunCreated(this,n),this._run(),(0,r.Ay)(this)}dispose(){if(!this._disposed){for(let e of(this._disposed=!0,this._dependencies))e.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&this._store.dispose(),void 0!==this._delayedStore&&this._delayedStore.dispose(),(0,h.tZ)()?.handleAutorunDisposed(this),(0,r.VD)(this)}}_run(){let e=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=e,this._state=3;try{if(!this._disposed){(0,h.tZ)()?.handleAutorunStarted(this);let e=this._changeSummary,t=this._delayedStore;void 0!==t&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,e),this._changeSummary=this._changeTracker.createChangeSummary(e)),void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._runFn(this,e)}catch(e){(0,r.y4)(e)}finally{this._isRunning=!1,void 0!==t&&t.dispose()}}}finally{for(let e of(this._disposed||(0,h.tZ)()?.handleAutorunFinished(this),this._dependenciesToBeRemoved))e.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(e){3===this._state&&(this._state=1),this._updateCount++}endUpdate(e){try{if(1===this._updateCount)do{if(1===this._state){for(let e of(this._state=3,this._dependencies))if(e.reportChanges(),2===this._state)break}3!==this._state&&this._run()}while(3!==this._state)}finally{this._updateCount--}(0,r.Ft)(()=>this._updateCount>=0)}handlePossibleChange(e){3===this._state&&this._isDependency(e)&&(this._state=1)}handleChange(e,t){if(this._isDependency(e)){(0,h.tZ)()?.handleAutorunDependencyChanged(this,e,t);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:t,didChange:t=>t===e},this._changeSummary))&&(this._state=2)}catch(e){(0,r.y4)(e)}}}_isDependency(e){return this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)}_ensureNoRunning(){if(!this._isRunning)throw new r.D7("The reader object cannot be used outside its compute function!")}readObservable(e){if(this._ensureNoRunning(),this._disposed)return e.get();e.addObserver(this);let t=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),t}get store(){if(this._ensureNoRunning(),this._disposed)throw new r.D7("Cannot access store after dispose");return void 0===this._store&&(this._store=new r.Cm),this._store}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:function(e){switch(e){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}}function v(e,t=d.j.ofCaller()){return new _(new o.nA(void 0,void 0,e),e,void 0,t)}function b(e,t,i=d.j.ofCaller()){return new _(new o.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,i)}function C(e,t,i=d.j.ofCaller()){return new _(new o.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.changeTracker,i)}function w(e){let t=new r.Cm,i=b({owner:void 0,debugName:void 0,debugReferenceFn:e},i=>{t.clear(),e(i,t)});return(0,r.s)(()=>{i.dispose(),t.dispose()})}function y(e,t){let i;return b({debugReferenceFn:t},n=>{let s=e.read(n),o=i;i=s,t({lastValue:o,newValue:s})})}var S=i(46754);function k(e,t,i=d.j.ofCaller()){return void 0!==t?new S.w(new o.nA(e,void 0,t),t,void 0,void 0,r.nx,i):new S.w(new o.nA(void 0,void 0,e),e,void 0,void 0,r.nx,i)}function x(e,t,i,n=d.j.ofCaller()){return new S.P(new o.nA(e,void 0,t),t,void 0,void 0,r.nx,i,n)}function L(e,t,i=d.j.ofCaller()){return new S.w(new o.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,e.onLastObserverRemoved,e.equalsFn??r.nx,i)}function D(e,t,i=d.j.ofCaller()){return new S.w(new o.nA(e.owner,e.debugName,void 0),t,e.changeTracker,void 0,e.equalityComparer??r.nx,i)}function I(e,t,i=d.j.ofCaller()){let n,s,a;return void 0===t?(n=e,s=void 0):(s=e,n=t),new S.w(new o.nA(s,void 0,n),e=>{a?a.clear():a=new r.Cm;let t=n(e);return t&&a.add(t),t},void 0,()=>{a&&(a.dispose(),a=void 0)},r.nx,i)}(0,l.N2)(L);class N{constructor(e){this._value=c(this,void 0),this.promiseResult=this._value,this.promise=e.then(e=>((0,a.Rn)(t=>{this._value.set(new E(e,void 0),t)}),e),e=>{throw(0,a.Rn)(t=>{this._value.set(new E(void 0,e),t)}),e})}}class E{constructor(e,t){this.data=e,this.error=t}getDataOrThrow(){if(this.error)throw this.error;return this.data}}var M=i(47576),T=i(75200);function R(e,t,i,n){return t||(t=e=>null!=e),new Promise((s,o)=>{let r=!0,a=!1,l=e.map(e=>({isFinished:t(e),error:!!i&&i(e),state:e})),h=v(e=>{let{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:h.dispose(),i?o(!0===i?n:i):s(n))});if(n){let e=n.onCancellationRequested(()=>{h.dispose(),e.dispose(),o(new M.AL)});if(n.isCancellationRequested){h.dispose(),e.dispose(),o(new M.AL);return}}r=!1,a&&h.dispose()})}function O(...e){let t,i,n,s;return 2===e.length?[i,n]=e:[t,i,n,s]=e,new A(new o.nA(t,void 0,n),i,n,()=>A.globalTransaction,r.nx,s??d.j.ofCaller())}function P(e,t,i,n=d.j.ofCaller()){return new A(new o.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,()=>A.globalTransaction,e.equalsFn??r.nx,n)}class A extends l.ZK{constructor(e,t,i,n,s,o){super(o),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=s,this._hasValue=!1,this.handleEvent=e=>{let t=this._getValue(e),i=this._value,n=!this._hasValue||!this._equalityComparator(i,t),s=!1;n&&(this._value=t,this._hasValue&&(s=!0,(0,a.PO)(this._getTransaction(),e=>{for(let s of((0,h.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue}),this._observers))e.updateObserver(s,this),s.handleChange(this,void 0)},()=>{let e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this._hasValue=!0),s||(0,h.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}}function F(e,t=d.j.ofCaller()){return"string"==typeof e?new B(e,void 0,t):new B(void 0,e,t)}(s=O||(O={})).Observer=A,s.batchEventsGlobally=function(e,t){let i=!1;void 0===A.globalTransaction&&(A.globalTransaction=e,i=!0);try{t()}finally{i&&(A.globalTransaction=void 0)}};class B extends l.ZK{get debugName(){return new o.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t,i){super(i),this._debugName=e,this._owner=t}trigger(e,t){if(!e)return void(0,a.Rn)(e=>{this.trigger(e,t)},()=>`Trigger signal ${this.debugName}`);for(let i of this._observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function W(e,t){let i,n,s=!1;return O(o=>{let r=v(r=>{let a=e.read(r);s?(i&&clearTimeout(i),i=setTimeout(()=>{n=a,o()},t)):(s=!0,n=a)});return{dispose(){r.dispose(),s=!1,n=void 0}}},()=>s?n:e.get())}function H(e,t){let i=new V(!0,t);e.addObserver(i);try{i.beginUpdate(e)}finally{i.endUpdate(e)}return(0,r.s)(()=>{e.removeObserver(i)})}(0,l.FB)(function(e){let t=new V(!1,void 0);return e.addObserver(t),(0,r.s)(()=>{e.removeObserver(t)})}),(0,l.Bm)(H);class V{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){1===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges()),this._counter--}handlePossibleChange(e){}handleChange(e,t){}}function z(e,t){let i;return L({owner:e,debugReferenceFn:t},e=>i=t(e,i))}function U(e,t,i,n){let s=new j(i,n);return L({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{s.dispose(),s=new j(i)}},e=>(s.setItems(t.read(e)),s.getItems()))}class j{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let t=[],i=new Set(this._cache.keys());for(let n of e){let e=this._keySelector?this._keySelector(n):n,s=this._cache.get(e);if(s)i.delete(e);else{let t=new r.Cm;s={out:this._map(n,t),store:t},this._cache.set(e,s)}t.push(s.out)}for(let e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function $(e){return{createChangeSummary:e=>({changes:[]}),handleChange(t,i){for(let n in e)t.didChange(e[n])&&i.changes.push({key:n,change:t.change});return!0},beforeUpdate(t,i){for(let n in e){if("changes"===n)throw new r.D7('property name "changes" is reserved for change tracking');i[n]=e[n].read(t)}}}}function K(e){let t;return{createChangeSummary:e=>({changes:[]}),handleChange(i,n){for(let s in t||(t=e()),t)i.didChange(t[s])&&n.changes.push({key:s,change:i.change});return!0},beforeUpdate(i,n){for(let s in t||(t=e()),t){if("changes"===s)throw new r.D7('property name "changes" is reserved for change tracking');n[s]=t[s].read(i)}}}}function G(e){return new q(e)}class q extends l.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Q(e,t,i=d.j.ofCaller()){return new Y("string"==typeof e?e:new o.nA(e,void 0,void 0),t,i)}class Y extends l.ZK{constructor(e,t,i){super(i),this.event=t,this.handleEvent=()=>{(0,a.Rn)(e=>{for(let t of this._observers)e.updateObserver(t,this),t.handleChange(this,void 0)},()=>this.debugName)},this.debugName="string"==typeof e?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Z(e,t){var i,n;let s,o,a,l=!0;return i={changeTracker:{createChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){let e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}}},n=(i,n)=>{let s=e.read(i),o=a;n.didChange&&(a=s,t(s,o,n.deltas)),l&&(l=!1,a=s)},s=new r.Cm,o=C({owner:i.owner,debugName:i.debugName,debugReferenceFn:i.debugReferenceFn??n,changeTracker:i.changeTracker},(e,t)=>{s.clear(),n(e,t,s)}),(0,r.s)(()=>{o.dispose(),s.dispose()})}function X(e,t){let i=new r.Cm,n=Z(e,(e,n,s)=>{i.clear(),t(e,n,s,i)});return{dispose(){n.dispose(),i.dispose()}}}function J(e,t){return X(e,(e,i,n,s)=>{t(e,i,n,(0,T.bs)(s))})}function ee(e,t){return z(e,(e,i)=>i??t(e))}class et{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}addFilteredObj(e){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(e)}_isIncluded(e){return this._filteredObjects?.has(e)??!0}textToConsoleArgs(e){var t;let i,n,s,o;return t=[ei(function(e,t){let i="";for(let e=1;e<=t;e++)i+="| ";return i}("| ",this.indentation)),e],i=[],n=[],s="",!function e(t){if("length"in t)for(let i of t)i&&e(i);else"text"in t?(s+=`%c${t.text}`,i.push(t.style),t.data&&n.push(...t.data)):"data"in t&&n.push(...t.data)}(t),(o=[s,...i]).push(...n),o}formatInfo(e){return e.hadValue?e.didChange?[ei(" "),es(eo(e.oldValue,70),{color:"red",strikeThrough:!0}),ei(" "),es(eo(e.newValue,60),{color:"green"})]:[ei(" (unchanged)")]:[ei(" "),es(eo(e.newValue,60),{color:"green"}),ei(" (initial)")]}handleObservableCreated(e){e instanceof S.w&&this.changedObservablesSets.set(e,new Set)}handleOnListenerCountChanged(e,t){}handleObservableUpdated(e,t){if(this._isIncluded(e)){if(e instanceof S.w)return void this._handleDerivedRecomputed(e,t);console.log(...this.textToConsoleArgs([en("observable value changed"),es(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}}formatChanges(e){if(0!==e.size)return es(" (changed deps: "+[...e].map(e=>e.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e)?.add(t)}_handleDerivedRecomputed(e,t){if(!this._isIncluded(e))return;let i=this.changedObservablesSets.get(e);i&&(console.log(...this.textToConsoleArgs([en("derived recomputed"),es(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear())}handleDerivedCleared(e){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([en("derived cleared"),es(e.debugName,{color:"BlueViolet"})]))}handleAutorunCreated(e){this._isIncluded(e)&&this.changedObservablesSets.set(e,new Set)}handleAutorunDisposed(e){}handleAutorunDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e).add(t)}handleAutorunStarted(e){let t=this.changedObservablesSets.get(e);t&&(this._isIncluded(e)&&console.log(...this.textToConsoleArgs([en("autorun"),es(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++)}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),this._isIncluded(e)&&console.log(...this.textToConsoleArgs([en("transaction"),es(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function ei(e){return es(e,{color:"black"})}function en(e){return es(function(e,t){for(;e.length<10;)e+=" ";return e}(`${e}: `,10),{color:"black",bold:!0})}function es(e,t={color:"black"}){let i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:Object.entries(i).reduce((e,[t,i])=>`${e}${t}:${i};`,"")}}function eo(e,t){switch(typeof e){case"number":default:return""+e;case"string":if(e.length+2<=t)return`"${e}"`;return`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":if(null===e)return"null";if(Array.isArray(e)){var i=e,n=t;let s="[ ",o=!0;for(let e of i){if(o||(s+=", "),s.length-5>n){s+="...";break}o=!1,s+=`${eo(e,n-s.length)}`}return s+" ]"}var s=e,r=t;if("function"==typeof s.toString&&s.toString!==Object.prototype.toString){let e=s.toString();return e.length<=r?e:e.substring(0,r-3)+"..."}let a=(0,o.uB)(s),l=a?a+"(":"{ ",h=!0;for(let[e,t]of Object.entries(s)){if(h||(l+=", "),l.length-5>r){l+="...";break}h=!1,l+=`${e}: ${eo(t,r-l.length)}`}return l+(a?")":" }");case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}class er{static createClient(e,t){return new er(e,t)}constructor(e,t){this._channelFactory=e,this._getHandler=t,this._channel=this._channelFactory({handleNotification:e=>{let t=this._getHandler().notifications[e[0]];if(!t)throw Error(`Unknown notification "${e[0]}"!`);t(...e[1])},handleRequest:e=>{try{let t=this._getHandler().requests[e[0]](...e[1]);return{type:"result",value:t}}catch(e){return{type:"error",value:e}}}});const i=new Proxy({},{get:(e,t)=>async(...e)=>{let i=await this._channel.sendRequest([t,e]);if("error"!==i.type)return i.value;throw i.value}}),n=new Proxy({},{get:(e,t)=>(...e)=>{this._channel.sendNotification([t,e])}});this.api={notifications:n,requests:i}}}class ea{constructor(){this._timeout=void 0}throttle(e,t){void 0===this._timeout&&(this._timeout=setTimeout(()=>{this._timeout=void 0,e()},t))}dispose(){void 0!==this._timeout&&clearTimeout(this._timeout)}}var el=i(24244);class eh{static{this._instance=void 0}static getInstance(){return void 0===eh._instance&&(eh._instance=new eh),eh._instance}getTransactionState(){let e=[],t=[...this._activeTransactions];if(0===t.length)return;let i=t.flatMap(e=>e.debugGetUpdatingObservers()??[]).map(e=>e.observer),n=new Set;for(;i.length>0;){let t=i.shift();if(n.has(t))continue;n.add(t);let s=this._getInfo(t,e=>{n.has(e)||i.push(e)});s&&e.push(s)}return{names:t.map(e=>e.getDebugName()??"tx"),affected:e}}_getObservableInfo(e){let t=this._instanceInfos.get(e);return t||void(0,M.dz)(new M.D7("No info found"))}_getAutorunInfo(e){let t=this._instanceInfos.get(e);return t||void(0,M.dz)(new M.D7("No info found"))}_getInfo(e,t){if(e instanceof S.w){for(let i of[...e.debugGetObservers()])t(i);let i=this._getObservableInfo(e);if(!i)return;let n=e.debugGetState(),s={name:e.debugName,instanceId:i.instanceId,updateCount:n.updateCount},o=[...i.changedObservables].map(e=>this._instanceInfos.get(e)?.instanceId).filter(el.O9);if(n.isComputing)return{...s,type:"observable/derived",state:"updating",changedDependencies:o,initialComputation:!1};switch(n.state){case 0:return{...s,type:"observable/derived",state:"noValue"};case 3:return{...s,type:"observable/derived",state:"upToDate"};case 2:return{...s,type:"observable/derived",state:"stale",changedDependencies:o};case 1:return{...s,type:"observable/derived",state:"possiblyStale"}}}else if(e instanceof _){let t=this._getAutorunInfo(e);if(!t)return;let i={name:e.debugName,instanceId:t.instanceId,updateCount:t.updateCount},n=[...t.changedObservables].map(e=>this._instanceInfos.get(e).instanceId);if(e.debugGetState().isRunning)return{...i,type:"autorun",state:"updating",changedDependencies:n};switch(e.debugGetState().state){case 3:return{...i,type:"autorun",state:"upToDate"};case 2:return{...i,type:"autorun",state:"stale",changedDependencies:n};case 1:return{...i,type:"autorun",state:"possiblyStale"}}}}_formatObservable(e){let t=this._getObservableInfo(e);if(t)return{name:e.debugName,instanceId:t.instanceId}}_formatObserver(e){if(e instanceof S.w)return{name:e.toString(),instanceId:this._getObservableInfo(e)?.instanceId};let t=this._getAutorunInfo(e);if(t)return{name:e.toString(),instanceId:t.instanceId}}constructor(){this._declarationId=0,this._instanceId=0,this._declarations=new Map,this._instanceInfos=new WeakMap,this._aliveInstances=new Map,this._activeTransactions=new Set,this._channel=function(e,t){var i;let n,s,o,r=globalThis,a=[],{channel:l,handler:h}=(i={sendNotification:e=>{s?s.sendNotification(e):a.push(e)}},{channel:e=>(n=e,{sendNotification:e=>{i.sendNotification(e)},sendRequest:e=>{throw Error("not supported")}}),handler:{handleRequest:e=>"notification"===e.type?n?.handleNotification(e.data):n?.handleRequest(e.data)}});return(r.$$debugValueEditor_debugChannels??(r.$$debugValueEditor_debugChannels={}))[e]=e=>{for(let i of(o=t(),s=e,a))e.sendNotification(i);return a=[],h},er.createClient(l,()=>{if(!o)throw Error("Not supported");return o})}("observableDevTools",()=>({notifications:{setDeclarationIdFilter:e=>{},logObservableValue:e=>{console.log("logObservableValue",e)},flushUpdates:()=>{this._flushUpdates()},resetUpdates:()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)}},requests:{getDeclarations:()=>{let e={};for(let t of this._declarations.values())e[t.id]=t;return{decls:e}},getSummarizedInstances:()=>null,getObservableValueInfo:e=>({observers:[...this._aliveInstances.get(e).debugGetObservers()].map(e=>this._formatObserver(e)).filter(el.O9)}),getDerivedInfo:e=>{let t=this._aliveInstances.get(e);return{dependencies:[...t.debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(el.O9),observers:[...t.debugGetObservers()].map(e=>this._formatObserver(e)).filter(el.O9)}},getAutorunInfo:e=>({dependencies:[...this._aliveInstances.get(e).debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(el.O9)}),getTransactionState:()=>this.getTransactionState(),setValue:(e,t)=>{let i=this._aliveInstances.get(e);if(i instanceof S.w)i.debugSetValue(t);else if(i instanceof u)i.debugSetValue(t);else if(i instanceof A)i.debugSetValue(t);else throw new M.D7("Observable is not supported");let n=[...i.debugGetObservers()];for(let e of n)e.beginUpdate(i);for(let e of n)e.handleChange(i,void 0);for(let e of n)e.endUpdate(i)},getValue:e=>{let t=this._aliveInstances.get(e);return t instanceof S.w||t instanceof u?eo(t.debugGetState().value,200):void 0},logValue:e=>{let t=this._aliveInstances.get(e);if(t&&"get"in t)console.log("Logged Value:",t.get());else throw new M.D7("Observable is not supported")},rerun:e=>{let t=this._aliveInstances.get(e);if(t instanceof S.w)t.debugRecompute();else if(t instanceof _)t.debugRerun();else throw new M.D7("Observable is not supported")}}})),this._pendingChanges=null,this._changeThrottler=new ea,this._fullState={},this._flushUpdates=()=>{null!==this._pendingChanges&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)},d.j.enable()}_handleChange(e){!function e(t,i){for(let n in i)null===i[n]?delete t[n]:t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._fullState,e),null===this._pendingChanges?this._pendingChanges=e:function e(t,i){for(let n in i)t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._pendingChanges,e),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(e,t){if(!t)return -1;let i=this._declarations.get(t.id);return void 0===i&&(i={id:this._declarationId++,type:e,url:t.fileName,line:t.line,column:t.column},this._declarations.set(t.id,i),this._handleChange({decls:{[i.id]:i}})),i.id}handleObservableCreated(e,t){let i={declarationId:this._getDeclarationId("observable/value",t),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i)}handleOnListenerCountChanged(e,t){let i=this._getObservableInfo(e);if(i){if(0===i.listenerCount&&t>0){let t=e instanceof S.w?"observable/derived":"observable/value";this._aliveInstances.set(i.instanceId,e),this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,formattedValue:i.lastValue,type:t,name:e.debugName}}})}else i.listenerCount>0&&0===t&&(this._handleChange({instances:{[i.instanceId]:null}}),this._aliveInstances.delete(i.instanceId));i.listenerCount=t}}handleObservableUpdated(e,t){if(e instanceof S.w)return void this._handleDerivedRecomputed(e,t);let i=this._getObservableInfo(e);i&&t.didChange&&(i.lastValue=eo(t.newValue,30),i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:i.lastValue}}}))}handleAutorunCreated(e,t){let i={declarationId:this._getDeclarationId("autorun",t),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i),this._aliveInstances.set(i.instanceId,e),i&&this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,runCount:0,type:"autorun",name:e.debugName}}})}handleAutorunDisposed(e){let t=this._getAutorunInfo(e);t&&(this._handleChange({instances:{[t.instanceId]:null}}),this._instanceInfos.delete(e),this._aliveInstances.delete(t.instanceId))}handleAutorunDependencyChanged(e,t,i){let n=this._getAutorunInfo(e);n&&n.changedObservables.add(t)}handleAutorunStarted(e){}handleAutorunFinished(e){let t=this._getAutorunInfo(e);t&&(t.changedObservables.clear(),t.updateCount++,this._handleChange({instances:{[t.instanceId]:{runCount:t.updateCount}}}))}handleDerivedDependencyChanged(e,t,i){let n=this._getObservableInfo(e);n&&n.changedObservables.add(t)}_handleDerivedRecomputed(e,t){let i=this._getObservableInfo(e);if(!i)return;let n=eo(t.newValue,30);i.updateCount++,i.changedObservables.clear(),i.lastValue=n,i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:n,recomputationCount:i.updateCount}}})}handleDerivedCleared(e){let t=this._getObservableInfo(e);t&&(t.lastValue=void 0,t.changedObservables.clear(),t.listenerCount>0&&this._handleChange({instances:{[t.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(e){this._activeTransactions.add(e)}handleEndTransaction(e){this._activeTransactions.delete(e)}}var ed=i(89428);class ec{static from(e,t){if(e instanceof _){let i=e.debugGetState();return new ec(e,t(e.debugName),"autorun",void 0,i.stateStr,Array.from(i.dependencies).map(e=>ec.from(e,t)||ec.unknown(e)))}if(e instanceof S.w){let i=e.debugGetState();return new ec(e,t(e.debugName),"derived",i.value,i.stateStr,Array.from(i.dependencies).map(e=>ec.from(e,t)||ec.unknown(e)))}if(e instanceof u){let i=e.debugGetState();return new ec(e,t(e.debugName),"observableValue",i.value,"upToDate",[])}if(e instanceof A){let i=e.debugGetState();return new ec(e,t(e.debugName),"fromEvent",i.value,i.hasValue?"upToDate":"initial",[])}}static unknown(e){return new ec(e,"(unknown)","unknown",void 0,"unknown",[])}constructor(e,t,i,n,s,o){this.sourceObj=e,this.name=t,this.type=i,this.value=n,this.state=s,this.dependencies=o}}(0,l.u5)(function(e,t){let i=t?.debugNamePostProcessor??(e=>e),n=ec.from(e,i);return n?(function e(t,i,n){let s=" ".repeat(i),o=[];if(n.has(t.sourceObj))return o.push(`${s}* ${t.type} ${t.name} (already listed)`),o.join("\n");if(n.add(t.sourceObj),o.push(`${s}* ${t.type} ${t.name}:`),o.push(`${s} value: ${eo(t.value,50)}`),o.push(`${s} state: ${t.state}`),t.dependencies.length>0)for(let r of(o.push(`${s} dependencies:`),t.dependencies))o.push(e(r,i+1,n));return o.join("\n")})(n,0,new Set).trim():""}),(0,h.YQ)(function(e){n||(n=new et,(0,h.EJ)(n)),n.addFilteredObj(e)}),ed._K&&ed._K.VSCODE_DEV_DEBUG_OBSERVABLES&&(0,h.EJ)(eh.getInstance())},41949:()=>{},42452:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});class n{constructor(e,t,i,n,s,o,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},42748:(e,t,i)=>{"use strict";i.d(t,{FW:()=>l,Zv:()=>s,dG:()=>r,z5:()=>h});var n=i(47576);function s(e,t){if("number"==typeof e){if(0===e)return null;let i=(65535&e)>>>0,n=(0xffff0000&e)>>>16;return new a(0!==n?[o(i,t),o(n,t)]:[o(i,t)])}{let i=[];for(let n=0;n<e.length;n++)i.push(o(e[n],t));return new a(i)}}function o(e,t){let i=!!(2048&e),n=!!(256&e);return new r(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class r{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof r&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.Qg)("chords");this.chords=e}}class l{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class h{}},43524:(e,t,i)=>{"use strict";let n,s;i.d(t,{DR:()=>p,cj:()=>a,oc:()=>l});var o,r,a,l,h=i(41132),d=i(60414),c=i(51328);(o=a||(a={}))[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error",(r=a||(a={})).compare=function(e,t){return t-e},(n=Object.create(null))[r.Error]=(0,d.kg)(1715,"Error"),n[r.Warning]=(0,d.kg)(1716,"Warning"),n[r.Info]=(0,d.kg)(1717,"Info"),r.toString=function(e){return n[e]||""},(s=Object.create(null))[r.Error]=(0,d.kg)(1718,"Errors"),s[r.Warning]=(0,d.kg)(1719,"Warnings"),s[r.Info]=(0,d.kg)(1720,"Infos"),r.toStringPlural=function(e){return s[e]||""},r.fromSeverity=function(e){switch(e){case h.A.Error:return r.Error;case h.A.Warning:return r.Warning;case h.A.Info:return r.Info;case h.A.Ignore:return r.Hint}},r.toSeverity=function(e){switch(e){case r.Error:return h.A.Error;case r.Warning:return h.A.Warning;case r.Info:return h.A.Info;case r.Hint:return h.A.Ignore}};var u=l||(l={});function g(e,t){let i=[""];return e.source?i.push(e.source.replace("\xa6","\\\xa6")):i.push(""),e.code?"string"==typeof e.code?i.push(e.code.replace("\xa6","\\\xa6")):i.push(e.code.value.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.severity&&null!==e.severity?i.push(a.toString(e.severity)):i.push(""),e.message&&t?i.push(e.message.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(""),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(""),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(""),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(""),i.push(""),i.join("\xa6")}u.makeKey=function(e){return g(e,!0)},u.makeKeyOptionalMessage=g;let p=(0,c.u1)("markerService")},44221:(e,t,i)=>{"use strict";i.d(t,{T:()=>g,i:()=>p});var n,s=i(60749),o=i(98194),r=i(47576),a=i(49468),l=i(12401),h=i(84906),d=i(22281),c=i(89314);i(62401);var u=function(e,t){return function(i,n){t(i,n,e)}};let g=class{static{n=this}static{this._ttpTokenizer=(0,o.H)("tokenizeToString",{createHTML:e=>e})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i}render(e,t,i){let n=(0,s.Gc)(e,{codeBlockRenderer:(e,t)=>this.renderCodeBlock(e,t),actionHandler:(e,t)=>this.openMarkdownLink(e,t),...t},i);return n.element.classList.add("rendered-markdown"),n}async renderCodeBlock(e,t){let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=h.vH);let s=await (0,d.Yj)(this._languageService,t,i),o=document.createElement("span");if(o.innerHTML=n._ttpTokenizer?.createHTML(s)??s,this._options.editor){let e=this._options.editor.getOption(59);(0,c.M)(o,e)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(o.style.fontSize=this._options.codeBlockFontSize),o}async openMarkdownLink(e,t){await p(this._openerService,e,t.isTrusted)}};async function p(e,t,i,n){try{var s;return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:(s=i,!0===s||!!(s&&Array.isArray(s.enabledCommands))&&s.enabledCommands),skipValidation:n})}catch(e){return(0,r.dz)(e),!1}}g=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(1,l.L),u(2,a.Cr)],g)},44269:()=>{},44545:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,D:()=>S});var n,s,o=i(50197),r=i(18805),a=i(17397),l=i(40364),h=i(71244),d=i(49044),c=i(86578),u=i(74218),g=i(51765),p=i(60414),m=i(71816),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){let n=new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=f([_(0,h.d),_(1,m.b),_(2,u.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){let i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);let n=this._data[e.id];if(i)n?0>n.indexOf(t)&&n.push(t):this._data[e.id]=[t];else if(n){let i=n.indexOf(t);i>=0&&(0,g.UH)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=f([_(0,u.CS)],b);class C{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){let e;for(let t of(this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear(),this._sort(l.ZG.getMenuItems(this._id)))){let i=t.group||"";e&&e[0]===i||(e=[i,[]],this._menuGroups.push(e)),e[1].push(t),this._collectContextKeysAndSubmenuIds(t)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(C._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&C._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;C._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}}let w=s=class extends C{constructor(e,t,i,n,s,o){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=o,this.refresh()}createActionGroups(e){let t=[];for(let i of this._menuGroups){let n,[o,r]=i;for(let t of r)if(this._contextKeyService.contextMatchesRules(t.when)){let i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);let o=function(e,t,i){let n=(0,l.i1)(t)?t.submenu.id:t.id,s="string"==typeof t.title?t.title:t.title.value,o=(0,c.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)(1636,"Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=(0,c.ih)({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}(this._id,i?t.command:t,this._hiddenStates);if(i){let i=S(this._commandService,this._keybindingService,t.command.id,t.when);(n??=[]).push(new l.Xe(t.command,t.alt,e,o,i,this._contextKeyService,this._commandService))}else{let i=new s(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),r=c.wv.join(...i.map(e=>e[1]));r.length>0&&(n??=[]).push(new l.nI(t,o,r))}}n&&n.length>0&&t.push([o,n])}return t}_sort(e){return e.sort(s._compareMenuItems)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n||"navigation"===i)return -1;if("navigation"===n)return 1;let e=i.localeCompare(n);if(0!==e)return e}let o=e.order||0,r=t.order||0;return o<r?-1:o>r?1:s._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){let i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};w=s=f([_(3,h.d),_(4,m.b),_(5,d.fN)],w);let y=class{constructor(e,t,i,n,s,h){this._disposables=new a.Cm,this._menuInfo=new w(e,t,i.emitEventsForSubmenuChanges,n,s,h);const d=new o.uC(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu(e=>{for(let t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}}));const c=this._disposables.add(new a.Cm),u=e=>{let t=!1,i=!1,n=!1;for(let s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}},g=()=>{c.add(h.onDidChangeContext(e=>{let t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})})),c.add(t.onDidChange(e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new r.uI({onWillAddFirstListener:g,onDidRemoveLastListener:c.clear.bind(c),delay:i.eventDebounceDelay,merge:u}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i,n,s=!0){return(0,c.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)(1637,"Configure Keybinding"),enabled:s,run(){let s=!t.lookupKeybinding(i)&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}y=f([_(3,h.d),_(4,m.b),_(5,d.fN)],y)},44597:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,v:()=>o});var n=i(71647);let s=[];function o(e,t,i){t instanceof n.d||(t=new n.d(t,[],!!i)),s.push([e,t])}function r(){return s}},44862:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,s=0;for(let o=0,r=e.length;o<r;o++){let a=e.charCodeAt(o);13===a?(0===t&&(i=o),t++,o+1<r&&10===e.charCodeAt(o+1)?(s|=2,o++):s|=3,n=o+1):10===a&&(s|=1,0===t&&(i=o),t++,n=o+1)}return 0===t&&(i=e.length),[t,i,e.length-n,s]}i.d(t,{W:()=>n})},44913:()=>{},44951:()=>{},45201:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});let n=(0,i(51328).u1)("ILanguageFeaturesService")},45606:(e,t,i)=>{"use strict";i.d(t,{$:()=>_});var n=i(52161),s=i(23001),o=i(60749),r=i(27393),a=i(10675),l=i(3013),h=i(30430),d=i(18805),c=i(76863),u=i(17397),g=i(46546);i(71914);var p=i(1315),m=i(46654);h.Q1.white.toString(),h.Q1.white.toString();let f=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}});class _ extends u.jG{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new d.vl),this._onDidEscape=this._register(new d.vl),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof t.title&&this.setTitle(t.title),"string"==typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this.enabled=!t.disabled,this._register(r.q.addTarget(this._element)),[n.Bx.CLICK,r.B.Tap].forEach(e=>{this._register((0,n.ko)(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):n.fs.stop(e)}))}),this._register((0,n.ko)(this._element,n.Bx.KEY_DOWN,e=>{let t=new s.Z(e),i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.fs.stop(t,!0)})),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OVER,e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OUT,e=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,n.w5)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let i of(0,l.n)(e))if("string"==typeof i){if(""===(i=i.trim()))continue;let e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;(t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground)&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e||(0,c.VS)(this._label)&&(0,c.VS)(e)&&(0,c.nK)(this._label,e))return;this._element.classList.add("monaco-text-button");let t=this.options.supportShortLabel?this._labelElement:this._element;if((0,c.VS)(e)){let i=(0,o.Gc)(e,void 0,document.createElement("span"));i.dispose();let s=i.element.querySelector("p")?.innerHTML;s?(0,m.D$)(t,s,f):(0,n.Ln)(t)}else this.options.supportIcons?(0,n.Ln)(t,...this.getContentElements(e)):t.textContent=e;let i="";"string"==typeof this.options.title?i=this.options.title:this.options.title&&(i=(0,o.Mh)(e)),this.setTitle(i),this._setAriaLabel(),this._label=e}get label(){return this._label}_setAriaLabel(){"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):"string"==typeof this.options.title&&this._element.setAttribute("aria-label",this.options.title)}set icon(e){this._setAriaLabel();let t=Array.from(this._element.classList).filter(e=>e.startsWith("codicon-"));this._element.classList.remove(...t),this._element.classList.add(...g.L.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register((0,p.i)().setupManagedHover(this.options.hoverDelegate??(0,a.nZ)("element"),this._element,e))}}},45786:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});let n=(0,i(51328).u1)("labelService")},46130:(e,t,i)=>{"use strict";i.d(t,{Bs:()=>a,d:()=>s});var n=i(32563);class s{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!s._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;let n=t+1,o=i+1,r=i-t,a=[],l=0;for(let t of e)t.endColumn<=n||t.startColumn>=o||(a[l++]=new s(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let o=[],r=0;for(let a=0,l=e.length;a<l;a++){let l=e[a],h=l.range;if(h.endLineNumber<t||h.startLineNumber>t||h.isEmpty()&&(0===l.type||3===l.type))continue;let d=h.startLineNumber===t?h.startColumn:i,c=h.endLineNumber===t?h.endColumn:n;o[r++]=new s(d,c,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){let i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let i=s._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class o{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new o(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new o(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[],s=new r,o=0;for(let r=0,a=t.length;r<a;r++){let a=t[r],l=a.startColumn,h=a.endColumn,d=a.className,c=1===a.type?2:4*(2===a.type);if(l>1){let t=e.charCodeAt(l-2);n.pc(t)&&l--}if(h>1){let t=e.charCodeAt(h-2);n.pc(t)&&h--}let u=l-1,g=h-2;o=s.consumeLowerThan(u,o,i),0===s.count&&(o=u),s.insert(g,d,c)}return s.consumeLowerThan(0x40000000,o,i),i}}},46296:()=>{},46340:()=>{},46546:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n,s,o=i(10359);(n||(n={})).isThemeColor=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id},function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";let t=RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){let n=t.exec(e.id);if(!n)return i(o.W.error);let[,s,r]=n,a=["codicon","codicon-"+s];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};let s=RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){let t=s.exec(e);if(!t)return;let[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id,n=i.lastIndexOf("~");return -1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){let t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(s||(s={}))},46654:(e,t,i)=>{"use strict";i.d(t,{TT:()=>et,cZ:()=>ed,D$:()=>ec,pn:()=>er});var n,s=i(86431),o=i(52161);let{entries:r,setPrototypeOf:a,isFrozen:l,getPrototypeOf:h,getOwnPropertyDescriptor:d}=Object,{freeze:c,seal:u,create:g}=Object,{apply:p,construct:m}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e){return e}),u||(u=function(e){return e}),p||(p=function(e,t,i){return e.apply(t,i)}),m||(m=function(e,t){return new e(...t)});let f=I(Array.prototype.forEach),_=I(Array.prototype.pop),v=I(Array.prototype.push),b=I(String.prototype.toLowerCase),C=I(String.prototype.toString),w=I(String.prototype.match),y=I(String.prototype.replace),S=I(String.prototype.indexOf),k=I(String.prototype.trim),x=I(Object.prototype.hasOwnProperty),L=I(RegExp.prototype.test),D=(n=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return m(n,t)});function I(e){return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return p(e,t,n)}}function N(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;a&&a(e,null);let n=t.length;for(;n--;){let s=t[n];if("string"==typeof s){let e=i(s);e!==s&&(l(t)||(t[n]=e),s=e)}e[s]=!0}return e}function E(e){let t=g(null);for(let[i,n]of r(e))x(e,i)&&(Array.isArray(n)?t[i]=function(e){for(let t=0;t<e.length;t++)x(e,t)||(e[t]=null);return e}(n):n&&"object"==typeof n&&n.constructor===Object?t[i]=E(n):t[i]=n);return t}function M(e,t){for(;null!==e;){let i=d(e,t);if(i){if(i.get)return I(i.get);if("function"==typeof i.value)return I(i.value)}e=h(e)}return function(){return null}}let T=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=c(["#text"]),W=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),H=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),j=u(/<%[\w\W]*|[\w\W]*%>/gm),$=u(/\${[\w\W]*}/gm),K=u(/^data-[\-\w.\u00B7-\uFFFF]/),G=u(/^aria-[\-\w]+$/),q=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=u(/^(?:\w+script|data):/i),Y=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=u(/^html$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:j,TMPLIT_EXPR:$,DATA_ATTR:K,ARIA_ATTR:G,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:Y,DOCTYPE_NAME:Z,CUSTOM_ELEMENT:u(/^[a-z][.\w]*(-[.\w]+)+$/i)});let J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));let s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}};var ee=function e(){let t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,n=t=>e(t);if(n.version="3.1.7",n.removed=[],!i||!i.document||9!==i.document.nodeType)return n.isSupported=!1,n;let{document:s}=i,o=s,a=o.currentScript,{DocumentFragment:l,HTMLTemplateElement:h,Node:d,Element:u,NodeFilter:p,NamedNodeMap:m=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:I,DOMParser:U,trustedTypes:j}=i,$=u.prototype,K=M($,"cloneNode"),G=M($,"remove"),Q=M($,"nextSibling"),Y=M($,"childNodes"),ee=M($,"parentNode");if("function"==typeof h){let e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let et="",{implementation:ei,createNodeIterator:en,createDocumentFragment:es,getElementsByTagName:eo}=s,{importNode:er}=o,ea={};n.isSupported="function"==typeof r&&"function"==typeof ee&&ei&&void 0!==ei.createHTMLDocument;let{MUSTACHE_EXPR:el,ERB_EXPR:eh,TMPLIT_EXPR:ed,DATA_ATTR:ec,ARIA_ATTR:eu,IS_SCRIPT_OR_DATA:eg,ATTR_WHITESPACE:ep,CUSTOM_ELEMENT:em}=X,{IS_ALLOWED_URI:ef}=X,e_=null,ev=N({},[...T,...R,...O,...A,...B]),eb=null,eC=N({},[...W,...H,...V,...z]),ew=Object.seal(g(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ey=null,eS=null,ek=!0,ex=!0,eL=!1,eD=!0,eI=!1,eN=!0,eE=!1,eM=!1,eT=!1,eR=!1,eO=!1,eP=!1,eA=!0,eF=!1,eB=!0,eW=!1,eH={},eV=null,ez=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eU=null,ej=N({},["audio","video","img","source","image","track"]),e$=null,eK=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eG="http://www.w3.org/1998/Math/MathML",eq="http://www.w3.org/2000/svg",eQ="http://www.w3.org/1999/xhtml",eY=eQ,eZ=!1,eX=null,eJ=N({},[eG,eq,eQ],C),e0=null,e1=["application/xhtml+xml","text/html"],e2=null,e5=null,e4=s.createElement("form"),e3=function(e){return e instanceof RegExp||e instanceof Function},e7=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e5||e5!==e){if(e&&"object"==typeof e||(e={}),e=E(e),e2="application/xhtml+xml"===(e0=-1===e1.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?C:b,e_=x(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,e2):ev,eb=x(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,e2):eC,eX=x(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,C):eJ,e$=x(e,"ADD_URI_SAFE_ATTR")?N(E(eK),e.ADD_URI_SAFE_ATTR,e2):eK,eU=x(e,"ADD_DATA_URI_TAGS")?N(E(ej),e.ADD_DATA_URI_TAGS,e2):ej,eV=x(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,e2):ez,ey=x(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,e2):{},eS=x(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,e2):{},eH=!!x(e,"USE_PROFILES")&&e.USE_PROFILES,ek=!1!==e.ALLOW_ARIA_ATTR,ex=!1!==e.ALLOW_DATA_ATTR,eL=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eD=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eI=e.SAFE_FOR_TEMPLATES||!1,eN=!1!==e.SAFE_FOR_XML,eE=e.WHOLE_DOCUMENT||!1,eR=e.RETURN_DOM||!1,eO=e.RETURN_DOM_FRAGMENT||!1,eP=e.RETURN_TRUSTED_TYPE||!1,eT=e.FORCE_BODY||!1,eA=!1!==e.SANITIZE_DOM,eF=e.SANITIZE_NAMED_PROPS||!1,eB=!1!==e.KEEP_CONTENT,eW=e.IN_PLACE||!1,ef=e.ALLOWED_URI_REGEXP||q,eY=e.NAMESPACE||eQ,ew=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&e3(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ew.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&e3(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ew.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ew.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eI&&(ex=!1),eO&&(eR=!0),eH&&(e_=N({},B),eb=[],!0===eH.html&&(N(e_,T),N(eb,W)),!0===eH.svg&&(N(e_,R),N(eb,H),N(eb,z)),!0===eH.svgFilters&&(N(e_,O),N(eb,H),N(eb,z)),!0===eH.mathMl&&(N(e_,A),N(eb,V),N(eb,z))),e.ADD_TAGS&&(e_===ev&&(e_=E(e_)),N(e_,e.ADD_TAGS,e2)),e.ADD_ATTR&&(eb===eC&&(eb=E(eb)),N(eb,e.ADD_ATTR,e2)),e.ADD_URI_SAFE_ATTR&&N(e$,e.ADD_URI_SAFE_ATTR,e2),e.FORBID_CONTENTS&&(eV===ez&&(eV=E(eV)),N(eV,e.FORBID_CONTENTS,e2)),eB&&(e_["#text"]=!0),eE&&N(e_,["html","head","body"]),e_.table&&(N(e_,["tbody"]),delete ey.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=J(j,a)),null!==t&&"string"==typeof et&&(et=t.createHTML(""));c&&c(e),e5=e}},e9=N({},["mi","mo","mn","ms","mtext"]),e8=N({},["annotation-xml"]),e6=N({},["title","style","font","a","script"]),te=N({},[...R,...O,...P]),tt=N({},[...A,...F]),ti=function(e){let t=ee(e);t&&t.tagName||(t={namespaceURI:eY,tagName:"template"});let i=b(e.tagName),n=b(t.tagName);return!!eX[e.namespaceURI]&&(e.namespaceURI===eq?t.namespaceURI===eQ?"svg"===i:t.namespaceURI===eG?"svg"===i&&("annotation-xml"===n||e9[n]):!!te[i]:e.namespaceURI===eG?t.namespaceURI===eQ?"math"===i:t.namespaceURI===eq?"math"===i&&e8[n]:!!tt[i]:e.namespaceURI===eQ?(t.namespaceURI!==eq||!!e8[n])&&(t.namespaceURI!==eG||!!e9[n])&&!tt[i]&&(e6[i]||!te[i]):"application/xhtml+xml"===e0&&!!eX[e.namespaceURI])},tn=function(e){v(n.removed,{element:e});try{ee(e).removeChild(e)}catch(t){G(e)}},ts=function(e,t){try{v(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){v(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!eb[e])if(eR||eO)try{tn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},to=function(e){let i=null,n=null;if(eT)e="<remove></remove>"+e;else{let t=w(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===e0&&eY===eQ&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let o=t?t.createHTML(e):e;if(eY===eQ)try{i=new U().parseFromString(o,e0)}catch(e){}if(!i||!i.documentElement){i=ei.createDocument(eY,"template",null);try{i.documentElement.innerHTML=eZ?et:o}catch(e){}}let r=i.body||i.documentElement;return(e&&n&&r.insertBefore(s.createTextNode(n),r.childNodes[0]||null),eY===eQ)?eo.call(i,eE?"html":"body")[0]:eE?i.documentElement:r},tr=function(e){return en.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},ta=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tl=function(e){return"function"==typeof d&&e instanceof d},th=function(e,t,i){ea[e]&&f(ea[e],e=>{e.call(n,t,i,e5)})},td=function(e){let t=null;if(th("beforeSanitizeElements",e,null),ta(e))return tn(e),!0;let i=e2(e.nodeName);if(th("uponSanitizeElement",e,{tagName:i,allowedTags:e_}),e.hasChildNodes()&&!tl(e.firstElementChild)&&L(/<[/\w]/g,e.innerHTML)&&L(/<[/\w]/g,e.textContent)||7===e.nodeType||eN&&8===e.nodeType&&L(/<[/\w]/g,e.data))return tn(e),!0;if(!e_[i]||ey[i]){if(!ey[i]&&tu(i)&&(ew.tagNameCheck instanceof RegExp&&L(ew.tagNameCheck,i)||ew.tagNameCheck instanceof Function&&ew.tagNameCheck(i)))return!1;if(eB&&!eV[i]){let t=ee(e)||e.parentNode,i=Y(e)||e.childNodes;if(i&&t){let n=i.length;for(let s=n-1;s>=0;--s){let n=K(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,Q(e))}}}return tn(e),!0}return e instanceof u&&!ti(e)||("noscript"===i||"noembed"===i||"noframes"===i)&&L(/<\/no(script|embed|frames)/i,e.innerHTML)?(tn(e),!0):(eI&&3===e.nodeType&&(t=e.textContent,f([el,eh,ed],e=>{t=y(t,e," ")}),e.textContent!==t&&(v(n.removed,{element:e.cloneNode()}),e.textContent=t)),th("afterSanitizeElements",e,null),!1)},tc=function(e,t,i){if(eA&&("id"===t||"name"===t)&&(i in s||i in e4))return!1;if(ex&&!eS[t]&&L(ec,t));else if(ek&&L(eu,t));else if(!eb[t]||eS[t]){if(!(tu(e)&&(ew.tagNameCheck instanceof RegExp&&L(ew.tagNameCheck,e)||ew.tagNameCheck instanceof Function&&ew.tagNameCheck(e))&&(ew.attributeNameCheck instanceof RegExp&&L(ew.attributeNameCheck,t)||ew.attributeNameCheck instanceof Function&&ew.attributeNameCheck(t))||"is"===t&&ew.allowCustomizedBuiltInElements&&(ew.tagNameCheck instanceof RegExp&&L(ew.tagNameCheck,i)||ew.tagNameCheck instanceof Function&&ew.tagNameCheck(i))))return!1}else if(e$[t]);else if(L(ef,y(i,ep,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===S(i,"data:")&&eU[e]);else if(eL&&!L(eg,y(i,ep,"")));else if(i)return!1;return!0},tu=function(e){return"annotation-xml"!==e&&w(e,em)},tg=function(e){th("beforeSanitizeAttributes",e,null);let{attributes:i}=e;if(!i)return;let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eb},o=i.length;for(;o--;){let{name:r,namespaceURI:a,value:l}=i[o],h=e2(r),d="value"===r?l:k(l);if(s.attrName=h,s.attrValue=d,s.keepAttr=!0,s.forceKeepAttr=void 0,th("uponSanitizeAttribute",e,s),d=s.attrValue,s.forceKeepAttr||(ts(r,e),!s.keepAttr))continue;if(!eD&&L(/\/>/i,d)){ts(r,e);continue}eI&&f([el,eh,ed],e=>{d=y(d,e," ")});let c=e2(e.nodeName);if(tc(c,h,d)){if(eF&&("id"===h||"name"===h)&&(ts(r,e),d="user-content-"+d),eN&&L(/((--!?|])>)|<\/(style|title)/i,d)){ts(r,e);continue}if(t&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(a);else switch(j.getAttributeType(c,h)){case"TrustedHTML":d=t.createHTML(d);break;case"TrustedScriptURL":d=t.createScriptURL(d)}try{a?e.setAttributeNS(a,r,d):e.setAttribute(r,d),ta(e)?tn(e):_(n.removed)}catch(e){}}}th("afterSanitizeAttributes",e,null)},tp=function e(t){let i=null,n=tr(t);for(th("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)th("uponSanitizeShadowNode",i,null),td(i)||(i.content instanceof l&&e(i.content),tg(i));th("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,a=null,h=null;if((eZ=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tl(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw D("dirty is not a string, aborting")}else throw D("toString is not a function");if(!n.isSupported)return e;if(eM||e7(i),n.removed=[],"string"==typeof e&&(eW=!1),eW){if(e.nodeName){let t=e2(e.nodeName);if(!e_[t]||ey[t])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)1===(r=(s=to("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?s=r:s.appendChild(r);else{if(!eR&&!eI&&!eE&&-1===e.indexOf("<"))return t&&eP?t.createHTML(e):e;if(!(s=to(e)))return eR?null:eP?et:""}s&&eT&&tn(s.firstChild);let c=tr(eW?e:s);for(;a=c.nextNode();)td(a)||(a.content instanceof l&&tp(a.content),tg(a));if(eW)return e;if(eR){if(eO)for(h=es.call(s.ownerDocument);s.firstChild;)h.appendChild(s.firstChild);else h=s;return(eb.shadowroot||eb.shadowrootmode)&&(h=er.call(o,h,!0)),h}let u=eE?s.outerHTML:s.innerHTML;return eE&&e_["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&L(Z,s.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+s.ownerDocument.doctype.name+">\n"+u),eI&&f([el,eh,ed],e=>{u=y(u,e," ")}),t&&eP?t.createHTML(u):u},n.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e7(e),eM=!0},n.clearConfig=function(){e5=null,eM=!1},n.isValidAttribute=function(e,t,i){return e5||e7({}),tc(e2(e),e2(t),i)},n.addHook=function(e,t){"function"==typeof t&&(ea[e]=ea[e]||[],v(ea[e],t))},n.removeHook=function(e){if(ea[e])return _(ea[e])},n.removeHooks=function(e){ea[e]&&(ea[e]=[])},n.removeAllHooks=function(){ea={}},n}();let et=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),ei=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),en="vscode-relative-path";function es(e,t){if("*"===t.override)return!0;try{let i=new URL(e,en+"://");if(t.override.includes(i.protocol.replace(/:$/,""))||t.allowRelativePaths&&i.protocol===en+":"&&!e.trim().toLowerCase().startsWith(en))return!0;return!1}catch(e){return!1}}let eo=Object.freeze({ALLOWED_TAGS:[...et],ALLOWED_ATTR:[...ei],ALLOW_UNKNOWN_PROTOCOLS:!0});function er(e,t){return ea(e,t,"trusted")}function ea(e,t,i){try{var n,o;let r={...eo};t?.allowedTags&&(t.allowedTags.override&&(r.ALLOWED_TAGS=[...t.allowedTags.override]),t.allowedTags.augment&&(r.ALLOWED_TAGS=[...r.ALLOWED_TAGS??[],...t.allowedTags.augment]));let a=[...ei];t?.allowedAttributes&&(t.allowedAttributes.override&&(a=[...t.allowedAttributes.override]),t.allowedAttributes.augment&&(a=[...a,...t.allowedAttributes.augment])),a=a.map(e=>"string"==typeof e?e.toLowerCase():{attributeName:e.attributeName.toLowerCase(),shouldKeep:e.shouldKeep});let l=new Set(a.map(e=>"string"==typeof e?e:e.attributeName)),h=new Map;for(let e of a)"string"==typeof e?h.delete(e):h.set(e.attributeName,e);if(r.ALLOWED_ATTR=Array.from(l),n={override:t?.allowedLinkProtocols?.override??[s.ny.http,s.ny.https],allowRelativePaths:t?.allowRelativeLinkPaths??!1},o={override:t?.allowedMediaProtocols?.override??[s.ny.http,s.ny.https],allowRelativePaths:t?.allowRelativeMediaPaths??!1},ee.addHook("afterSanitizeAttributes",e=>{for(let t of["href","src"])if(e.hasAttribute(t)){let i=e.getAttribute(t);"href"===t?i.startsWith("#")||es(i,n)||e.removeAttribute(t):es(i,o)||e.removeAttribute(t)}}),t?.replaceWithPlaintext&&ee.addHook("uponSanitizeElement",eh),h.size&&ee.addHook("uponSanitizeAttribute",(e,t)=>{let i=h.get(t.attrName);if(i){let n=i.shouldKeep(e,t);"string"==typeof n?(t.keepAttr=!0,t.attrValue=n):t.keepAttr=n}else t.keepAttr=l.has(t.attrName)}),"dom"===i)return ee.sanitize(e,{...r,RETURN_DOM_FRAGMENT:!0});return ee.sanitize(e,{...r,RETURN_TRUSTED_TYPE:!0})}finally{ee.removeAllHooks()}}let el=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function eh(e,t,i){if(!t.allowedTags[t.tagName]&&"body"!==t.tagName){let t=ed(e);e.nodeType===Node.COMMENT_NODE?e.parentElement?.insertBefore(t,e):e.parentElement?.replaceChild(t,e)}}function ed(e){let t,i;if(e.nodeType===Node.COMMENT_NODE)t=`<!--${e.textContent}-->`;else{let n=e.tagName.toLowerCase(),s=el.includes(n),o=e.attributes.length?" "+Array.from(e.attributes).map(e=>`${e.name}="${e.value}"`).join(" "):"";t=`<${n}${o}>`,s||(i=`</${n}>`)}let n=document.createDocumentFragment(),s=e.ownerDocument.createTextNode(t);for(n.appendChild(s);e.firstChild;)n.appendChild(e.firstChild);let o=i?e.ownerDocument.createTextNode(i):void 0;return o&&n.appendChild(o),n}function ec(e,t,i){let n=ea(t,i,"dom");(0,o.Ln)(e,n)}},46712:(e,t,i)=>{"use strict";i.d(t,{E:()=>c});var n=i(52161),s=i(23001),o=i(75364),r=i(10675),a=i(86578),l=i(18805),h=i(17397),d=i(24244);i(55780);class c extends h.jG{get onDidBlur(){return this._onDidBlur.event}get onDidCancel(){return this._onDidCancel.event}get onDidRun(){return this._onDidRun.event}get onWillRun(){return this._onWillRun.event}constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new h.Cm),this.viewItemDisposables=this._register(new h.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this._onWillRun=this._register(new l.vl),this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(e=>this._onWillRun.fire(e))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical"}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,e=>{let t=new s.Z(e),n=!0,r="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof o.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())})),this._register(n.ko(this.domNode,n.Bx.KEY_UP,e=>{let t=new s.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let e=this.viewItems.find(e=>e instanceof o.EH&&e.isEnabled());e instanceof o.EH&&e.setFocusable(!0)}else this.viewItems.forEach(e=>{e instanceof o.EH&&e.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){let t=this.actionsList.children[e];if(n.QX(n.bq(),t)){this.focusedItem=e,this.viewItems[this.focusedItem]?.showHover?.();break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(e=>this._onWillRun.fire(e))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){if("number"==typeof e)return this.viewItems[e]?.action;if(n.sb(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t<this.actionsList.childNodes.length;t++)if(this.actionsList.childNodes[t]===e)return this.viewItems[t].action}}push(e,t={}){let i=Array.isArray(e)?e:[e],s=d.Et(t.index)?t.index:null;if(i.forEach(e=>{let i,r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(i=this.options.actionViewItemProvider(e,a)),i||(i=new o.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(i,n.ko(r,n.Bx.CONTEXT_MENU,e=>{n.fs.stop(e,!0)})),i.actionRunner=this._actionRunner,i.setActionContext(this.context),i.render(r),null===s||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(i)):(this.actionsList.insertBefore(r,this.actionsList.children[s]),this.viewItems.splice(s,0,i),s++)}),this.focusable){let e=!1;for(let t of this.viewItems)t instanceof o.EH&&(!e&&t.action.id!==a.wv.ID&&(t.isEnabled()||!this.options.focusOnlyEnabledItems)?(t.setFocusable(!0),e=!0):t.setFocusable(!1))}"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,h.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){let e=this.viewItems.findIndex(e=>e.isEnabled());this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){let i;if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let n=this.focusedItem;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){let t;if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let i=this.focusedItem;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!t.isEnabled()||t.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();let n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;d.Tn(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===a.wv.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(void 0===this.focusedItem)return;let t=this.viewItems[this.focusedItem];if(t instanceof o.EH){let i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,h.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},46754:(e,t,i)=>{"use strict";i.d(t,{P:()=>a,w:()=>r});var n=i(16891),s=i(12338),o=i(97375);class r extends n.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n,s,o){super(o),this._debugNameData=e,this._computeFn=t,this._changeTracker=i,this._handleLastObserverRemoved=n,this._equalityComparator=s,this._state=0,this._value=void 0,this._updateCount=0,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._changeSummary=void 0,this._isUpdating=!1,this._isComputing=!1,this._didReportChange=!1,this._isInBeforeUpdate=!1,this._isReaderValid=!1,this._store=void 0,this._delayedStore=void 0,this._removedObserverToCallEndUpdateOn=null,this._changeSummary=this._changeTracker?.createChangeSummary(void 0)}onLastObserverRemoved(){for(let e of(this._state=0,this._value=void 0,(0,o.tZ)()?.handleDerivedCleared(this),this._dependencies))e.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&(this._store.dispose(),this._store=void 0),void 0!==this._delayedStore&&(this._delayedStore.dispose(),this._delayedStore=void 0),this._handleLastObserverRemoved?.()}get(){if(this._isComputing,0===this._observers.size){let e;try{let t;this._isReaderValid=!0,this._changeTracker&&(t=this._changeTracker.createChangeSummary(void 0),this._changeTracker.beforeUpdate?.(this,t)),e=this._computeFn(this,t)}finally{this._isReaderValid=!1}return this.onLastObserverRemoved(),e}do{if(1===this._state){for(let e of this._dependencies)if(e.reportChanges(),2===this._state)break}1===this._state&&(this._state=3),3!==this._state&&this._recompute()}while(3!==this._state);return this._value}_recompute(){let e=!1;this._isComputing=!0,this._didReportChange=!1;let t=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=t;try{let t=this._changeSummary;this._isReaderValid=!0,this._changeTracker&&(this._isInBeforeUpdate=!0,this._changeTracker.beforeUpdate?.(this,t),this._isInBeforeUpdate=!1,this._changeSummary=this._changeTracker?.createChangeSummary(t));let i=0!==this._state,n=this._value;this._state=3;let s=this._delayedStore;void 0!==s&&(this._delayedStore=void 0);try{void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._value=this._computeFn(this,t)}finally{for(let e of(this._isReaderValid=!1,this._dependenciesToBeRemoved))e.removeObserver(this);this._dependenciesToBeRemoved.clear(),void 0!==s&&s.dispose()}e=this._didReportChange||i&&!this._equalityComparator(n,this._value),(0,o.tZ)()?.handleObservableUpdated(this,{oldValue:n,newValue:this._value,change:void 0,didChange:e,hadValue:i})}catch(e){(0,s.y4)(e)}if(this._isComputing=!1,!this._didReportChange&&e)for(let e of this._observers)e.handleChange(this,void 0);else this._didReportChange=!1}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){if(this._isUpdating)throw new s.D7("Cyclic deriveds are not supported yet!");this._updateCount++,this._isUpdating=!0;try{let e=1===this._updateCount;if(3===this._state&&(this._state=1,!e))for(let e of this._observers)e.handlePossibleChange(this);if(e)for(let e of this._observers)e.beginUpdate(this)}finally{this._isUpdating=!1}}endUpdate(e){if(this._updateCount--,0===this._updateCount){for(let e of[...this._observers])e.endUpdate(this);if(this._removedObserverToCallEndUpdateOn){let e=[...this._removedObserverToCallEndUpdateOn];for(let t of(this._removedObserverToCallEndUpdateOn=null,e))t.endUpdate(this)}}(0,s.Ft)(()=>this._updateCount>=0)}handlePossibleChange(e){if(3===this._state&&this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e))for(let e of(this._state=1,this._observers))e.handlePossibleChange(this)}handleChange(e,t){if(this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)||this._isInBeforeUpdate){(0,o.tZ)()?.handleDerivedDependencyChanged(this,e,t);let i=!1;try{i=!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:t,didChange:t=>t===e},this._changeSummary)}catch(e){(0,s.y4)(e)}let n=3===this._state;if(i&&(1===this._state||n)&&(this._state=2,n))for(let e of this._observers)e.handlePossibleChange(this)}}_ensureReaderValid(){if(!this._isReaderValid)throw new s.D7("The reader object cannot be used outside its compute function!")}readObservable(e){this._ensureReaderValid(),e.addObserver(this);let t=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),t}get store(){return this._ensureReaderValid(),void 0===this._store&&(this._store=new s.Cm),this._store}addObserver(e){let t=!this._observers.has(e)&&this._updateCount>0;super.addObserver(e),t&&(this._removedObserverToCallEndUpdateOn&&this._removedObserverToCallEndUpdateOn.has(e)?this._removedObserverToCallEndUpdateOn.delete(e):e.beginUpdate(this))}removeObserver(e){this._observers.has(e)&&this._updateCount>0&&(this._removedObserverToCallEndUpdateOn||(this._removedObserverToCallEndUpdateOn=new Set),this._removedObserverToCallEndUpdateOn.add(e)),super.removeObserver(e)}debugGetState(){return{state:this._state,stateStr:function(e){switch(e){case 0:return"initial";case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state),updateCount:this._updateCount,isComputing:this._isComputing,dependencies:this._dependencies,value:this._value}}debugSetValue(e){this._value=e}debugRecompute(){this._isComputing?this._state=2:this._recompute()}setValue(e,t,i){this._value=e;let n=this._observers;for(let e of(t.updateObserver(this,this),n))e.handleChange(this,i)}}class a extends r{constructor(e,t,i,n,s,o,r){super(e,t,i,n,s,r),this.set=o}}},47576:(e,t,i)=>{"use strict";i.d(t,{AL:()=>d,D7:()=>f,EM:()=>p,MB:()=>h,M_:()=>a,Qg:()=>u,aD:()=>c,cU:()=>function e(t){if(t instanceof Error){let{name:i,message:n,cause:s}=t;return{$isError:!0,name:i,message:n,stack:t.stacktrace||t.stack,noTelemetry:m.isErrorNoTelemetry(t),cause:s?e(s):void 0,code:t.code}}return t},dz:()=>r,iH:()=>g,y4:()=>o});class n{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack){if(m.isErrorNoTelemetry(e))throw new m(e.message+"\n\n"+e.stack);throw Error(e.message+"\n\n"+e.stack)}throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}let s=new n;function o(e){s.onUnexpectedError(e)}function r(e){h(e)||s.onUnexpectedError(e)}function a(e){h(e)||s.onUnexpectedExternalError(e)}let l="Canceled";function h(e){return e instanceof d||e instanceof Error&&e.name===l&&e.message===l}class d extends Error{constructor(){super(l),this.name=this.message}}function c(){let e=Error(l);return e.name=e.message,e}function u(e){return e?Error(`Illegal argument: ${e}`):Error("Illegal argument")}function g(e){return e?Error(`Illegal state: ${e}`):Error("Illegal state")}class p extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class m extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof m)return e;let t=new m;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},47713:()=>{},47717:(e,t,i)=>{"use strict";i.d(t,{Yh:()=>l,QM:()=>a});var n,s,o,r,a,l,h=i(60414),d=i(79186),c=i(24244),u=i(12704),g=i(26065),p=i(92158),m=i(81552),f=i(47982),_=i(10902);class v{static columnSelect(e,t,i,n,s,o){let r=Math.abs(s-i)+1,a=i>s,l=n>o,h=n<o,d=[];for(let s=0;s<r;s++){let r=i+(a?-s:s),c=e.columnFromVisibleColumn(t,r,n),u=e.columnFromVisibleColumn(t,r,o),g=e.visibleColumnFromColumn(t,new f.y(r,c)),p=e.visibleColumnFromColumn(t,new f.y(r,u));if(!h||!(g>o)&&!(p<n))l&&(p>n||g<o)||d.push(new m.mG(new _.Q(r,c,r,c),0,0,new f.y(r,u),0))}if(0===d.length)for(let e=0;e<r;e++){let n=i+(a?-e:e),s=t.getLineMaxColumn(n);d.push(new m.mG(new _.Q(n,s,n,s),0,0,new f.y(n,s),0))}return{viewStates:d,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,v.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0,s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=s;i<=o;i++){let s=t.getLineMaxColumn(i);n=Math.max(n,e.visibleColumnFromColumn(t,new f.y(i,s)))}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){let s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){let s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}var b=i(92725),C=i(6351),w=i(56274),y=i(86425),S=i(49044),k=i(69662),x=i(52161),L=i(17182);class D extends g.DX{runEditorCommand(e,t,i){let n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}(n=o||(o={})).metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:`Property-value pairs that can be passed through this argument:
|
|
89
89
|
* 'to': A mandatory direction value.
|
|
90
90
|
\`\`\`
|
|
91
91
|
'up', 'down'
|
|
@@ -167,7 +167,7 @@ struct VSOutput {
|
|
|
167
167
|
}
|
|
168
168
|
`;class S extends _.i{constructor(e,t,i,n,s,o){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=i,this._canvas=n,this._ctx=s,this._shapeBindBuffer=this._register(new l.HE),this._initialized=!1,this._shapeCollection=this._register(new C([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(o)}async _initWebgpu(e){let t;if(this._device=await e,this._store.isDisposed)return;let i=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:i,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};{let e=new Float32Array(6),i=(t=this._canvas.width,i=this._canvas.height)=>(e[0]=t,e[1]=i,e[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*(0,o.fz)().devicePixelRatio),e[3]=0,e[4]=e[0]-e[2],e[5]=e[1]-e[3],e);t=this._register(p.B.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>i())).object,this._register((0,m.qR)(this._canvas,(0,o.fz)(),(e,n)=>{this._device.queue.writeBuffer(t,0,i(e,n))}))}this._scrollOffsetBindBuffer=this._register(p.B.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:2*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(2);let n=()=>p.B.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=n(),this._register(f.Jh.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=n(),this._pipeline&&this._updateBindGroup(this._pipeline,t)})),this._vertexBuffer=this._register(p.B.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:m.xW.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},m.xW)).object;let s=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:y});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:s,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:s,targets:[{format:i,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,t),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,i,n,s,o,r,a){return this._shapeCollection.createEntry({x:e,y:t,width:i,height:n,red:s,green:o,blue:r,alpha:a})}onScrollChanged(e){if(this._device){let e=(0,o.fz)().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*e,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*e,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;let e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();let t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();let i=t.beginRenderPass(this._renderPassDescriptor);i.setPipeline(this._pipeline),i.setVertexBuffer(0,this._vertexBuffer),i.setBindGroup(0,this._bindGroup);let n=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());i.setScissorRect(n,0,this._canvas.width-n,this._canvas.height),i.draw(m.xW.length/2,this._shapeCollection.entryCount),i.end();let s=t.finish();this._device.queue.submit([s])}}i(85223);class k extends l.jG{constructor(){super(),this._ruleCache=new Map,this._container=(0,o.$)("div.monaco-decoration-css-rule-extractor"),this._dummyElement=(0,o.$)("span"),this._container.appendChild(this._dummyElement),this._register((0,l.s)(()=>this._container.remove()))}getStyleRules(e,t){let i=this._ruleCache.get(t);if(i)return i;this._dummyElement.className=t,e.appendChild(this._container);let n=this._getStyleRules(t);return this._ruleCache.set(t,n),e.removeChild(this._container),n}_getStyleRules(e){let t=[],i=[...(0,o.a)().styleSheets];for(let n=0;n<i.length;n++)for(let s of i[n].cssRules)if(s instanceof CSSImportRule)s.styleSheet&&i.push(s.styleSheet);else if(s instanceof CSSStyleRule){let i=`.${e}`,n=s.selectorText.indexOf(i);if(-1!==n){let e=n+i.length;(s.selectorText.length===e||s.selectorText.substring(e,e+1).match(/[ :]/))&&t.push(s)}}return t}}var x=i(35683);class L{constructor(){this._nextId=1,this._cacheById=new Map,this._cacheByStyle=new x.QO}getOrCreateEntry(e,t,i){if(void 0===e&&void 0===t&&void 0===i)return 0;let n=this._cacheByStyle.get(e??0,+!!t,void 0===i?"":i.toFixed(2));if(n)return n.id;let s=this._nextId++,o={id:s,color:e,bold:t,opacity:i};return this._cacheById.set(s,o),this._cacheByStyle.set(o,e??0,+!!t,void 0===i?"":i.toFixed(2)),s}getStyleSet(e){if(0!==e)return this._cacheById.get(e)}}var D=function(e,t){return function(i,n){t(i,n,e)}};let I=class extends l.jG{static{n=this}static{this._decorationCssRuleExtractor=new k}static get decorationCssRuleExtractor(){return n._decorationCssRuleExtractor}static{this._decorationStyleCache=new L}static get decorationStyleCache(){return n._decorationStyleCache}static get atlas(){if(!n._atlas)throw new a.D7("Cannot call ViewGpuContext.textureAtlas before device is resolved");return n._atlas}get atlas(){return n.atlas}constructor(e,t,i,a){super(),this._instantiationService=t,this._notificationService=i,this.configurationService=a,this.maxGpuCols=2e3,this.canvas=(0,r.Z)(document.createElement("canvas")),this.canvas.setClassName("editorCanvas"),this._register(f.Jh.runAndSubscribe(a.onDidChangeConfiguration,e=>{if(!e||e.affectsConfiguration("editor.scrollbar.verticalScrollbarSize")){let e=a.getValue("editor").scrollbar?.verticalScrollbarSize??14;this.canvas.domNode.style.boxSizing="border-box",this.canvas.domNode.style.paddingRight=`${e}px`}})),this.ctx=(0,m.HS)(this.canvas.domNode.getContext("webgpu")),n.device||(n.device=p.B.requestDevice(e=>{let t=[{label:s.kg(73,"Use DOM-based rendering"),run:()=>this.configurationService.updateValue("editor.experimentalGpuAcceleration","off")}];this._notificationService.prompt(g.AI.Warning,e,t)}).then(e=>(n.deviceSync=e.object,n._atlas||(n._atlas=this._instantiationService.createInstance(c.L,e.object.limits.maxTextureDimension2D,void 0,n.decorationStyleCache)),e.object)));const l=(0,h.FY)(this,(0,o.fz)().devicePixelRatio);this._register((0,o.ko)((0,o.fz)(),"resize",()=>{l.set((0,o.fz)().devicePixelRatio,void 0)})),this.devicePixelRatio=l,this._register((0,h.lp)(this.devicePixelRatio,()=>n.atlas?.clear()));const d=(0,h.FY)(this,{width:this.canvas.domNode.width,height:this.canvas.domNode.height});this._register((0,m.qR)(this.canvas.domNode,(0,o.fz)(),(e,t)=>{this.canvas.domNode.width=e,this.canvas.domNode.height=t,d.set({width:e,height:t},void 0)})),this.canvasDevicePixelDimensions=d;const u=(0,h.FY)(this,0);this._register(this.configurationService.onDidChangeConfiguration(t=>{u.set(e.configuration.options.get(165).contentLeft,void 0)})),this.contentLeft=u,this.rectangleRenderer=this._instantiationService.createInstance(S,e,this.contentLeft,this.devicePixelRatio,this.canvas.domNode,this.ctx,n.device)}canRender(e,t,i){let s=t.getViewLineRenderingData(i);if(s.containsRTL||s.maxColumn>this.maxGpuCols)return!1;if(s.inlineDecorations.length>0){let e=!0;for(let t of s.inlineDecorations){if(0!==t.type){e=!1;break}let i=n._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,t.inlineClassName);if(!(e&&=i.every(e=>{if(e.selectorText.includes(":"))return!1;for(let t of e.style)if(!E(t,e.style))return!1;return!0})))break}return e}return!0}canRenderDetailed(e,t,i){let s=t.getViewLineRenderingData(i),o=[];if(s.containsRTL&&o.push("containsRTL"),s.maxColumn>this.maxGpuCols&&o.push("maxColumn > maxGpuCols"),s.inlineDecorations.length>0){let e=!0,t=[],i=[],r=[];for(let o of s.inlineDecorations){if(0!==o.type){t.push(o.type),e=!1;continue}let s=n._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,o.inlineClassName);if(!(e&&=s.every(e=>{if(e.selectorText.includes(":"))return i.push(e.selectorText),!1;for(let t of e.style)if(!E(t,e.style))return r.push(`${t}: ${e.style[t]}`),!1;return!0})))continue}t.length>0&&o.push(`inlineDecorations with unsupported types (${t.map(e=>`\`${e}\``).join(", ")})`),r.length>0&&o.push(`inlineDecorations with unsupported CSS rules (${r.map(e=>`\`${e}\``).join(", ")})`),i.length>0&&o.push(`inlineDecorations with unsupported CSS selectors (${i.map(e=>`\`${e}\``).join(", ")})`)}return o}};I=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([D(1,d._Y),D(2,g.Ot),D(3,u.pG)],I);let N=["color","font-weight","opacity"];function E(e,t){return!!N.includes(e)}},55537:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){let i=this.getForeground(e),n=this.getFontStyle(e),s=`color: ${t[i]};`;1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){let t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(1&i),bold:!!(2&i),underline:!!(4&i),strikethrough:!!(8&i)}}}},55780:()=>{},56274:(e,t,i)=>{"use strict";i.d(t,{T:()=>a,v:()=>l});var n=i(39443),s=i(29643),o=i(81552),r=i(17182);class a{static indent(e,t,i){if(null===t||null===i)return[];let s=[];for(let t=0,o=i.length;t<o;t++)s[t]=new n.Y(i[t],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return s}static outdent(e,t,i){let s=[];for(let t=0,o=i.length;t<o;t++)s[t]=new n.Y(i[t],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return s}static paste(e,t,i,n,s,o){return r.Dr.getEdits(e,t,i,n,s,o)}static tab(e,t,i){return r.h0.getCommands(e,t,i)}static compositionType(e,t,i,n,s,o,a,l){return r.YA.getEdits(e,t,i,n,s,o,a,l)}static compositionEndWithInterceptors(e,t,i,n,a,l){if(!n)return null;let h=null;for(let e of n)if(null===h)h=e.insertedText;else if(h!==e.insertedText)return null;if(!h||1!==h.length)return r.Tl.getEdits(t,n);let d=h,c=!1;for(let e of n)if(0!==e.deletedText.length){c=!0;break}if(c){if(!(0,r.ey)(t,d)||!t.surroundingPairs.hasOwnProperty(d))return null;let e=(0,o.vG)(d);for(let t of n)if(0!==t.deletedSelectionStart||t.deletedSelectionEnd!==t.deletedText.length||/^[ \t]+$/.test(t.deletedText)||e&&(0,o.vG)(t.deletedText))return null;let i=[];for(let e of a){if(!e.isEmpty())return null;i.push(e.getPosition())}if(i.length!==n.length)return null;let l=[];for(let e=0,o=i.length;e<o;e++)l.push(new s.y(i[e],n[e].deletedText,t.surroundingPairs[d]));return new o.vY(4,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}let u=r.K4.getEdits(t,i,a,l,d);if(void 0!==u)return u;let g=r.oi.getEdits(t,i,a,d,!0,!1);return void 0!==g?g:r.Tl.getEdits(t,n)}static typeWithInterceptors(e,t,i,n,s,o,a){let l=r.AO.getEdits(i,n,s,a,e);if(void 0!==l)return l;let h=r.dU.getEdits(i,n,s,a,e);if(void 0!==h)return h;let d=r.sx.getEdits(t,i,n,s,o,a);if(void 0!==d)return d;let c=r.oi.getEdits(i,n,s,a,!1,e);if(void 0!==c)return c;let u=r.is.getEdits(i,n,s,a,e);if(void 0!==u)return u;let g=r.kr.getEdits(t,i,n,s,a,e);return void 0!==g?g:r.Ls.getEdits(i,t,s,a,e)}static typeWithoutInterceptors(e,t,i,n,s){return r.UN.getEdits(e,n,s)}}class l{constructor(e,t,i,n,s,o,r){this.deletedText=e,this.deletedSelectionStart=t,this.deletedSelectionEnd=i,this.insertedText=n,this.insertedSelectionStart=s,this.insertedSelectionEnd=o,this.insertedTextRange=r}}},56303:(e,t,i)=>{"use strict";i.d(t,{aQ:()=>O,nr:()=>P,Sx:()=>z,po:()=>R,tj:()=>T});var n=i(52161),s=i(25083),o=i(79186),r=i(30430),a=i(18805),l=i(39894),h=i(55537);class d{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}let c=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class u{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;let t=e.match(c);if(!t)throw Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=r.Q1.fromHex("#"+e)),i}getColorMap(){return this._id2color.slice(0)}}class g{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,s=e.length;n<s;n++){let s=e[n],o=-1;if("string"==typeof s.fontStyle){o=0;let e=s.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let r=null;"string"==typeof s.foreground&&(r=s.foreground);let a=null;"string"==typeof s.background&&(a=s.background),t[i++]=new d(s.token||"",n,o,r,a)}return t}(e),t)}static createFromParsedTokenTheme(e,t){return function(e,t){e.sort((e,t)=>{var i,n;let s=(i=e.token,i<(n=t.token)?-1:+(i>n));return 0!==s?s:e.index-t.index});let i=0,n="000000",s="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}let o=new u;for(let e of t)o.getId(e);let r=new f(new m(i,o.getId(n),o.getId(s)));for(let t=0,i=e.length;t<i;t++){let i=e[t];r.insert(i.token,i.fontStyle,o.getId(i.foreground),o.getId(i.background))}return new g(o,r)}(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(void 0===i){let e=this._match(t),n=function(e){let t=e.match(p);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 3}throw Error("Unexpected match for standard token type!")}(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(e|i)>>>0}}let p=/\b(comment|string|regex|regexp)\b/;class m{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new m(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class f{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){let t,i;if(""===e)return this._mainRule;let n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let s=this._children.get(t);return void 0!==s?s.match(i):this._mainRule}insert(e,t,i,n){let s,o;if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let r=e.indexOf(".");-1===r?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1));let a=this._children.get(s);void 0===a&&(a=new f(this._mainRule.clone()),this._children.set(s,a)),a.insert(o,t,i,n)}}var _=i(92108),v=i(11671);let b={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[v.YtV]:"#FFFFFE",[v.By2]:"#000000",[v.tan]:"#E5EBF1",[_.vV]:"#D3D3D3",[_.H0]:"#939393",[v.QwA]:"#ADD6FF4D"}},C={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[v.YtV]:"#1E1E1E",[v.By2]:"#D4D4D4",[v.tan]:"#3A3D41",[_.vV]:"#404040",[_.H0]:"#707070",[v.QwA]:"#ADD6FF26"}},w={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[v.YtV]:"#000000",[v.By2]:"#FFFFFF",[_.vV]:"#FFFFFF",[_.H0]:"#FFFFFF"}},y={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[v.YtV]:"#FFFFFF",[v.By2]:"#292929",[_.vV]:"#292929",[_.H0]:"#292929"}};var S=i(98332),k=i(5027),x=i(17397),L=i(92740),D=i(49214),I=i(46546),N=i(51973);class E{getIcon(e){let t=(0,N.HT)(),i=e.defaults;for(;I.L.isThemeIcon(i);){let e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var M=i(8502);let T="vs",R="vs-dark",O="hc-black",P="hc-light",A=S.O.as(v.FdG.ColorContribution),F=S.O.as(k.Fd.ThemingContribution);class B{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(W(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,r.Q1.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=H(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,r.Q1.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){let i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=A.resolveDefaultColor(e,this),this.defaultColors[e]=t),t}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case T:return L.zM.LIGHT;case O:return L.zM.HIGH_CONTRAST_DARK;case P:return L.zM.HIGH_CONTRAST_LIGHT;default:return L.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=H(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}let i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){let t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=g.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){let n=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=h.x.getForeground(n),o=h.x.getFontStyle(n);return{foreground:s,italic:!!(1&o),bold:!!(2&o),underline:!!(4&o),strikethrough:!!(8&o)}}get tokenColorMap(){return[]}}function W(e){return e===T||e===R||e===O||e===P}function H(e){switch(e){case T:return b;case R:return C;case O:return w;case P:return y}}function V(e){let t=H(e);return new B(e,t)}class z extends x.jG{constructor(){super(),this._onColorThemeChange=this._register(new a.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new a.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new E,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(T,V(T)),this._knownThemes.set(R,V(R)),this._knownThemes.set(O,V(O)),this._knownThemes.set(P,V(P));const e=this._register(function(e){let t=new x.Cm,i=t.add(new a.vl),n=(0,N.HT)();return t.add(n.onDidChange(()=>i.fire())),e&&t.add(e.onDidProductIconThemeChange(()=>i.fire())),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){let t=e?e.getProductIconTheme():new E,i={},s=new D.M$,o=new D.M$;for(let e of n.getIcons()){let n=t.getIcon(e);if(!n)continue;let r=n.font,a=D.mG`--vscode-icon-${D.s7(e.id)}-font-family`,l=D.mG`--vscode-icon-${D.s7(e.id)}-content`;r?(i[r.id]=r.definition,o.push(D.mG`${a}: ${D.r$(r.id)};`,D.mG`${l}: ${D.r$(n.fontCharacter)};`),s.push(D.mG`.codicon-${D.s7(e.id)}:before { content: ${D.r$(n.fontCharacter)}; font-family: ${D.r$(r.id)}; }`)):(o.push(D.mG`${l}: ${D.r$(n.fontCharacter)}; ${a}: 'codicon';`),s.push(D.mG`.codicon-${D.s7(e.id)}:before { content: ${D.r$(n.fontCharacter)}; }`))}for(let e in i){let t=i[e],n=t.weight?D.mG`font-weight: ${D.yj(t.weight)};`:D.mG``,o=t.style?D.mG`font-style: ${D.yj(t.style)};`:D.mG``,r=new D.M$;for(let e of t.src)r.push(D.mG`${D.Tf(e.location)} format(${D.r$(e.format)})`);s.push(D.mG`@font-face { src: ${r.join(", ")}; font-family: ${D.r$(e)};${n}${o} font-display: block; }`)}return s.push(D.mG`:root { ${o.join(" ")} }`),s.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
|
169
169
|
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(T),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),(0,o.Dy)(M.G,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return n.Cl(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=s.li(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),x.jG.None}_registerShadowDomContainer(e){let t=s.li(e,e=>{e.className="monaco-colors",e.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw Error("Illegal theme name!");if(!W(t.base)&&!W(e))throw Error("Illegal theme base!");this._knownThemes.set(e,new B(e,t)),W(e)&&this._knownThemes.forEach(t=>{t.base===e&&t.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(T),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=M.G.matchMedia("(forced-colors: active)").matches;if(e!==(0,L.Bb)(this._theme.type)){let t;t=(0,L.HD)(this._theme.type)?e?O:R:e?P:T,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};F.getThemingParticipants().forEach(e=>e(this._theme,i,this._environment));let n=[];for(let e of A.getColors()){let t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,v.Bbc)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);let s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){let t=[];for(let i=1,n=e.length;i<n;i++){let n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.push(".mtks { text-decoration: line-through; }"),t.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),t.join("\n")}(s)),i.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join("\n"),this._updateCSS(),l.dG.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
|
170
|
-
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},56388:(e,t,i)=>{"use strict";i.d(t,{T:()=>g});var n=i(89536),s=i(97957),o=i(19379),r=i(64760);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){let s=i>>1;for(let o=0;o<s;o++){let s=o<<1;e[o]=n.Xw.create23(e[s],e[s+1],s+3===i?e[s+2]:null,t)}i=s}return n.Xw.create23(e[0],e[1],i>=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function h(e,t){return e.listHeight===t.listHeight?n.Xw.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i,s=e=e.toMutable(),o=[];for(;;){if(t.listHeight===s.listHeight){i=t;break}if(4!==s.kind)throw Error("unexpected");o.push(s),s=s.makeLastElementMutable()}for(let e=o.length-1;e>=0;e--){let t=o[e];i?t.childrenLength>=3?i=n.Xw.create23(t.unappendChild(),i,null,!1):(t.appendChildOfSameHeight(i),i=void 0):t.handleChildrenChanged()}return i?n.Xw.create23(e,i,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable(),s=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw Error("unexpected");s.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=s.length-1;e>=0;e--){let t=s[e];o?t.childrenLength>=3?o=n.Xw.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Xw.create23(o,e,null,!1):e}(t,e)}class d{constructor(e){this.lastOffset=r.Vp,this.nextNodes=[e],this.offsets=[r.Vp],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.zG)(e,this.lastOffset))throw Error("Invalid offset");for(this.lastOffset=e;;){let i=u(this.nextNodes);if(!i)return;let n=u(this.offsets);if((0,r.zG)(e,n))return;if((0,r.zG)(n,e))if((0,r.QB)(n,i.length)<=e)this.nextNodeAfterCurrent();else{let e=c(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;let e=c(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}nextNodeAfterCurrent(){for(;;){let e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;let i=u(this.nextNodes),n=c(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.QB)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function c(e,t=-1){for(;;){if(++t>=e.childrenLength)return -1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw Error("Not supported");this.oldNodeReader=i?new d(i):void 0,this.positionMapper=new s.W(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(o.gV.getEmpty(),0);return e||(e=n.Xw.getEmpty()),e}parseList(e,t){let i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){let i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}(4!==n.kind||0!==n.childrenLength)&&i.push(n)}return this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;let i=t,n=e[i].listHeight;for(t++;t<e.length&&e[t].listHeight===n;)t++;return t-i>=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),s=i();if(!s)return n;for(let e=i();e;e=i())l(n,s)<=l(s,e)?(n=h(n,s),s=e):s=h(s,e);return h(n,s)}(i):a(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.Vh)(t)){let i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>(null===t||!!(0,r.zG)(i.length,t))&&i.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;let i=this.tokenizer.read();switch(i.kind){case 2:return new n.Gc(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.yF(i.length);let s=e.merge(i.bracketIds),o=this.parseList(s,t+1),r=this.tokenizer.peek();if(r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds)))return this.tokenizer.read(),n.Nn.create(i.astNode,o,r.astNode);return n.Nn.create(i.astNode,o,null)}default:throw Error("unexpected")}}}},56636:(e,t,i)=>{"use strict";i.d(t,{GN:()=>s,a6:()=>o,vo:()=>n,wc:()=>r});class n{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}function s(e,t){return!(t.options.hideInCommentTokens&&o(e,t)||t.options.hideInStringTokens&&r(e,t))}function o(e,t){return a(e,t.range,e=>1===e)}function r(e,t){return a(e,t.range,e=>2===e)}function a(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){let s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber,a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;a<s.getCount()&&!(r&&s.getStartOffset(a)>t.endColumn-1);){if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}},57270:(e,t,i)=>{"use strict";i.d(t,{HS:()=>r,qR:()=>a,xW:()=>o});var n=i(47576),s=i(17397);let o=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function r(e){if(!e)throw Error(`Value "${e}" cannot be null`);return e}function a(e,t,i){let o=new t.ResizeObserver(t=>{let n=t.find(t=>t.target===e);if(!n)return;if(!("devicePixelContentBoxSize"in n)){o?.disconnect(),o=void 0;return}let s=n.devicePixelContentBoxSize[0].inlineSize,r=n.devicePixelContentBoxSize[0].blockSize;s>0&&r>0&&i(s,r)});try{o.observe(e,{box:["device-pixel-content-box"]})}catch{throw o.disconnect(),o=void 0,new n.D7("Could not observe device pixel dimensions")}return(0,s.s)(()=>o?.disconnect())}},57669:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});var n,s=i(24244);!function(e){function t(e){return!!e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;let i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let i=0;for(let n of e)if(t(n,i++))return!0;return!1},e.every=function(e,t){let i=0;for(let n of e)if(!t(n,i++))return!1;return!0},e.find=function(e,t){for(let i of e)if(t(i))return i},e.filter=function*(e,t){for(let i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(let n of e)yield t(n,i++)},e.flatMap=function*(e,t){let i=0;for(let n of e)yield*t(n,i++)},e.concat=function*(...e){for(let t of e)(0,s.xZ)(t)?yield*t:yield t},e.reduce=function(e,t,i){let n=i;for(let i of e)n=t(n,i);return n},e.length=function(e){let t=0;for(let i of e)t++;return t},e.slice=function*(e,t,i=e.length){for(t<-e.length&&(t=0),t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]},e.consume=function(t,i=1/0){let n=[];if(0===i)return[n,t];let s=t[Symbol.iterator]();for(let t=0;t<i;t++){let t=s.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator]:()=>s}]},e.asyncToArray=async function(e){let t=[];for await(let i of e)t.push(i);return t},e.asyncToArrayFlat=async function(e){let t=[];for await(let i of e)t=t.concat(i);return t}}(n||(n={}))},57909:()=>{},58293:()=>{},59116:()=>{},59461:()=>{},59689:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0,s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();let n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},60414:(e,t,i)=>{"use strict";i.d(t,{Ec:()=>n.E,aS:()=>l,i8:()=>n.i,kg:()=>r});var n=i(75488);let s="pseudo"===(0,n.i)()||"undefined"!=typeof document&&document.location&&"string"==typeof document.location.hash&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(e,i)=>{let n=t[i[0]],s=e;return"string"==typeof n?s=n:("number"==typeof n||"boolean"==typeof n||null==n)&&(s=String(n)),s}),s&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function r(e,t,...i){return"number"==typeof e?o(a(e,t),i):o(t,i)}function a(e,t){let i=(0,n.E)()?.[e];if("string"!=typeof i){if("string"==typeof t)return t;throw Error(`!!! NLS MISSING: ${e} !!!`)}return i}function l(e,t,...i){let n,s=o(n="number"==typeof e?a(e,t):t,i);return{value:s,original:t===n?s:o(t,i)}}},60749:(e,t,i)=>{"use strict";i.d(t,{Mh:()=>eB,Gc:()=>eE});var n=i(47576),s=i(76863),o=i(65677),r=i(72375),a=i(72981),l=i(17397);function h(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let d=h(),c=/[&<>"']/,u=RegExp(c.source,"g"),g=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p=RegExp(g.source,"g"),m={"&":"&","<":"<",">":">",'"':""","'":"'"},f=e=>m[e];function _(e,t){if(t){if(c.test(e))return e.replace(u,f)}else if(g.test(e))return e.replace(p,f);return e}let v=/(^|[^\[])\^/g;function b(e,t){let i="string"==typeof e?e:e.source;t=t||"";let n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(v,"$1"),i=i.replace(e,s),n},getRegex:()=>new RegExp(i,t)};return n}function C(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}let w={exec:()=>null};function y(e,t){let i=e.replace(/\|/g,(e,t,i)=>{let n=!1,s=t;for(;--s>=0&&"\\"===i[s];)n=!n;return n?"|":" |"}).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function S(e,t,i){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let o=e.charAt(n-s-1);if(o!==t||i)if(o!==t&&i)s++;else break;else s++}return e.slice(0,n-s)}function k(e,t,i,n){let s=t.href,o=t.title?_(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;let e={type:"link",raw:i,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:s,title:o,text:_(r)}}class x{options;rules;lexer;constructor(e){this.options=e||d}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:S(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],i=function(e,t){let i=e.match(/^(\s+)(?:```)/);if(null===i)return t;let n=i[1];return t.split("\n").map(e=>{let t=e.match(/^\s+/);if(null===t)return e;let[i]=t;return i.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=S(e,"#");this.options.pedantic?e=t.trim():(!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:S(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=S(t[0],"\n").split("\n"),i="",n="",s=[];for(;e.length>0;){let t,o=!1,r=[];for(t=0;t<e.length;t++)if(/^ {0,3}>/.test(e[t]))r.push(e[t]),o=!0;else if(o)break;else r.push(e[t]);e=e.slice(t);let a=r.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
|
|
170
|
+
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},56388:(e,t,i)=>{"use strict";i.d(t,{T:()=>g});var n=i(89536),s=i(97957),o=i(19379),r=i(64760);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){let s=i>>1;for(let o=0;o<s;o++){let s=o<<1;e[o]=n.Xw.create23(e[s],e[s+1],s+3===i?e[s+2]:null,t)}i=s}return n.Xw.create23(e[0],e[1],i>=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function h(e,t){return e.listHeight===t.listHeight?n.Xw.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i,s=e=e.toMutable(),o=[];for(;;){if(t.listHeight===s.listHeight){i=t;break}if(4!==s.kind)throw Error("unexpected");o.push(s),s=s.makeLastElementMutable()}for(let e=o.length-1;e>=0;e--){let t=o[e];i?t.childrenLength>=3?i=n.Xw.create23(t.unappendChild(),i,null,!1):(t.appendChildOfSameHeight(i),i=void 0):t.handleChildrenChanged()}return i?n.Xw.create23(e,i,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable(),s=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw Error("unexpected");s.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=s.length-1;e>=0;e--){let t=s[e];o?t.childrenLength>=3?o=n.Xw.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Xw.create23(o,e,null,!1):e}(t,e)}class d{constructor(e){this.lastOffset=r.Vp,this.nextNodes=[e],this.offsets=[r.Vp],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.zG)(e,this.lastOffset))throw Error("Invalid offset");for(this.lastOffset=e;;){let i=u(this.nextNodes);if(!i)return;let n=u(this.offsets);if((0,r.zG)(e,n))return;if((0,r.zG)(n,e))if((0,r.QB)(n,i.length)<=e)this.nextNodeAfterCurrent();else{let e=c(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;let e=c(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}nextNodeAfterCurrent(){for(;;){let e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;let i=u(this.nextNodes),n=c(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.QB)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function c(e,t=-1){for(;;){if(++t>=e.childrenLength)return -1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw Error("Not supported");this.oldNodeReader=i?new d(i):void 0,this.positionMapper=new s.W(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(o.gV.getEmpty(),0);return e||(e=n.Xw.getEmpty()),e}parseList(e,t){let i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){let i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}(4!==n.kind||0!==n.childrenLength)&&i.push(n)}return this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;let i=t,n=e[i].listHeight;for(t++;t<e.length&&e[t].listHeight===n;)t++;return t-i>=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),s=i();if(!s)return n;for(let e=i();e;e=i())l(n,s)<=l(s,e)?(n=h(n,s),s=e):s=h(s,e);return h(n,s)}(i):a(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.Vh)(t)){let i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>(null===t||!!(0,r.zG)(i.length,t))&&i.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;let i=this.tokenizer.read();switch(i.kind){case 2:return new n.Gc(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.yF(i.length);let s=e.merge(i.bracketIds),o=this.parseList(s,t+1),r=this.tokenizer.peek();if(r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds)))return this.tokenizer.read(),n.Nn.create(i.astNode,o,r.astNode);return n.Nn.create(i.astNode,o,null)}default:throw Error("unexpected")}}}},56636:(e,t,i)=>{"use strict";i.d(t,{GN:()=>s,a6:()=>o,vo:()=>n,wc:()=>r});class n{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}function s(e,t){return!(t.options.hideInCommentTokens&&o(e,t)||t.options.hideInStringTokens&&r(e,t))}function o(e,t){return a(e,t.range,e=>1===e)}function r(e,t){return a(e,t.range,e=>2===e)}function a(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){let s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber,a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;a<s.getCount()&&!(r&&s.getStartOffset(a)>t.endColumn-1);){if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}},57270:(e,t,i)=>{"use strict";i.d(t,{HS:()=>r,qR:()=>a,xW:()=>o});var n=i(47576),s=i(17397);let o=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function r(e){if(!e)throw Error(`Value "${e}" cannot be null`);return e}function a(e,t,i){let o=new t.ResizeObserver(t=>{let n=t.find(t=>t.target===e);if(!n)return;if(!("devicePixelContentBoxSize"in n)){o?.disconnect(),o=void 0;return}let s=n.devicePixelContentBoxSize[0].inlineSize,r=n.devicePixelContentBoxSize[0].blockSize;s>0&&r>0&&i(s,r)});try{o.observe(e,{box:["device-pixel-content-box"]})}catch{throw o.disconnect(),o=void 0,new n.D7("Could not observe device pixel dimensions")}return(0,s.s)(()=>o?.disconnect())}},57669:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});var n,s=i(24244);!function(e){function t(e){return!!e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;let i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let i=0;for(let n of e)if(t(n,i++))return!0;return!1},e.every=function(e,t){let i=0;for(let n of e)if(!t(n,i++))return!1;return!0},e.find=function(e,t){for(let i of e)if(t(i))return i},e.filter=function*(e,t){for(let i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(let n of e)yield t(n,i++)},e.flatMap=function*(e,t){let i=0;for(let n of e)yield*t(n,i++)},e.concat=function*(...e){for(let t of e)(0,s.xZ)(t)?yield*t:yield t},e.reduce=function(e,t,i){let n=i;for(let i of e)n=t(n,i);return n},e.length=function(e){let t=0;for(let i of e)t++;return t},e.slice=function*(e,t,i=e.length){for(t<-e.length&&(t=0),t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]},e.consume=function(t,i=1/0){let n=[];if(0===i)return[n,t];let s=t[Symbol.iterator]();for(let t=0;t<i;t++){let t=s.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator]:()=>s}]},e.asyncToArray=async function(e){let t=[];for await(let i of e)t.push(i);return t},e.asyncToArrayFlat=async function(e){let t=[];for await(let i of e)t=t.concat(i);return t}}(n||(n={}))},57909:()=>{},58190:()=>{},58293:()=>{},59116:()=>{},59461:()=>{},59689:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0,s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();let n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},60414:(e,t,i)=>{"use strict";i.d(t,{Ec:()=>n.E,aS:()=>l,i8:()=>n.i,kg:()=>r});var n=i(75488);let s="pseudo"===(0,n.i)()||"undefined"!=typeof document&&document.location&&"string"==typeof document.location.hash&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(e,i)=>{let n=t[i[0]],s=e;return"string"==typeof n?s=n:("number"==typeof n||"boolean"==typeof n||null==n)&&(s=String(n)),s}),s&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function r(e,t,...i){return"number"==typeof e?o(a(e,t),i):o(t,i)}function a(e,t){let i=(0,n.E)()?.[e];if("string"!=typeof i){if("string"==typeof t)return t;throw Error(`!!! NLS MISSING: ${e} !!!`)}return i}function l(e,t,...i){let n,s=o(n="number"==typeof e?a(e,t):t,i);return{value:s,original:t===n?s:o(t,i)}}},60749:(e,t,i)=>{"use strict";i.d(t,{Mh:()=>eB,Gc:()=>eE});var n=i(47576),s=i(76863),o=i(65677),r=i(72375),a=i(72981),l=i(17397);function h(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let d=h(),c=/[&<>"']/,u=RegExp(c.source,"g"),g=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p=RegExp(g.source,"g"),m={"&":"&","<":"<",">":">",'"':""","'":"'"},f=e=>m[e];function _(e,t){if(t){if(c.test(e))return e.replace(u,f)}else if(g.test(e))return e.replace(p,f);return e}let v=/(^|[^\[])\^/g;function b(e,t){let i="string"==typeof e?e:e.source;t=t||"";let n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(v,"$1"),i=i.replace(e,s),n},getRegex:()=>new RegExp(i,t)};return n}function C(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}let w={exec:()=>null};function y(e,t){let i=e.replace(/\|/g,(e,t,i)=>{let n=!1,s=t;for(;--s>=0&&"\\"===i[s];)n=!n;return n?"|":" |"}).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function S(e,t,i){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let o=e.charAt(n-s-1);if(o!==t||i)if(o!==t&&i)s++;else break;else s++}return e.slice(0,n-s)}function k(e,t,i,n){let s=t.href,o=t.title?_(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;let e={type:"link",raw:i,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:s,title:o,text:_(r)}}class x{options;rules;lexer;constructor(e){this.options=e||d}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:S(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],i=function(e,t){let i=e.match(/^(\s+)(?:```)/);if(null===i)return t;let n=i[1];return t.split("\n").map(e=>{let t=e.match(/^\s+/);if(null===t)return e;let[i]=t;return i.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=S(e,"#");this.options.pedantic?e=t.trim():(!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:S(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=S(t[0],"\n").split("\n"),i="",n="",s=[];for(;e.length>0;){let t,o=!1,r=[];for(t=0;t<e.length;t++)if(/^ {0,3}>/.test(e[t]))r.push(e[t]),o=!0;else if(o)break;else r.push(e[t]);e=e.slice(t);let a=r.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
|
|
171
171
|
${a}`:a,n=n?`${n}
|
|
172
172
|
${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=h,0===e.length)break;let d=s[s.length-1];if(d?.type==="code")break;if(d?.type==="blockquote"){let t=d.raw+"\n"+e.join("\n"),o=this.blockquote(t);s[s.length-1]=o,i=i.substring(0,i.length-d.raw.length)+o.raw,n=n.substring(0,n.length-d.text.length)+o.text;break}if(d?.type==="list"){let t=d.raw+"\n"+e.join("\n"),o=this.list(t);s[s.length-1]=o,i=i.substring(0,i.length-d.raw.length)+o.raw,n=n.substring(0,n.length-d.raw.length)+o.raw,e=t.substring(s[s.length-1].raw.length).split("\n");continue}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),r=!1;for(;e;){let i,n=!1,a="",l="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let h=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),d=e.split("\n",1)[0],c=!h.trim(),u=0;if(this.options.pedantic?(u=2,l=h.trimStart()):c?u=t[1].length+1:(u=(u=t[2].search(/[^ ]/))>4?1:u,l=h.slice(u),u+=t[1].length),c&&/^ *$/.test(d)&&(a+=d+"\n",e=e.substring(d.length+1),n=!0),!n){let t=RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),i=RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),n=RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){let o=e.split("\n",1)[0];if(d=o,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),n.test(d)||s.test(d)||t.test(d)||i.test(e))break;if(d.search(/[^ ]/)>=u||!d.trim())l+="\n"+d.slice(u);else{if(c||h.search(/[^ ]/)>=4||n.test(h)||s.test(h)||i.test(h))break;l+="\n"+d}c||d.trim()||(c=!0),a+=o+"\n",e=e.substring(o.length+1),h=d.slice(u)}}!s.loose&&(r?s.loose=!0:/\n *\n *$/.test(a)&&(r=!0));let g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(l))&&(i="[ ] "!==g[0],l=l.replace(/^\[[ xX]\] +/,"")),s.items.push({type:"list_item",raw:a,task:!!g,checked:i,loose:!1,text:l,tokens:[]}),s.raw+=a}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){let t=s.items[e].tokens.filter(e=>"space"===e.type);s.loose=t.length>0&&t.some(e=>/\n.*\n/.test(e.raw))}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(/\s+/g," "),i=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;let i=y(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let e of n)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e<i.length;e++)o.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:o.align[e]});for(let e of s)o.rows.push(y(e,o.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:_(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let t=S(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(")"))return -1;let i=0;for(let t=0;t<e.length;t++)if("\\"===e[t])t++;else if("("===e[t])i++;else if(")"===e[t]&&--i<0)return t;return -1}(t[2],0);if(e>-1){let i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){let e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),k(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=t[(i[2]||i[1]).replace(/\s+/g," ").toLowerCase()];if(!e){let e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return k(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let i=[...n[0]].length-1,s,o,r=i,a=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(!(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6]))continue;if(o=[...s].length,n[3]||n[4]){r+=o;continue}if((n[5]||n[6])&&i%3&&!((i+o)%3)){a+=o;continue}if((r-=o)>0)continue;o=Math.min(o,o+r+a);let t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+o);if(Math.min(i,o)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," "),i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=_(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,i;return i="@"===t[2]?"mailto:"+(e=_(t[1])):e=_(t[1]),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])i="mailto:"+(e=_(t[0]));else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);e=_(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:_(t[0]),{type:"text",raw:t[0],text:e}}}}let L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,D=/(?:[*+-]|\d{1,9}[.)])/,I=b(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,D).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),N=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M=b(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",E).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),T=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,D).getRegex(),R="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",O=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",O).replace("tag",R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A=b(N).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),F={blockquote:b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:M,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:P,lheading:I,list:T,newline:/^(?: *(?:\n|$))+/,paragraph:A,table:w,text:/^[^\n]+/},B=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),W={...F,table:B,paragraph:b(N).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex()},H={...F,html:b("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",O).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:w,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(N).replace("hr",L).replace("heading"," *#{1,6} *[^\n]").replace("lheading",I).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,z=/^( {2,}|\\)\n(?!\s*$)/,U="\\p{P}\\p{S}",j=b(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,U).getRegex(),$=b(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,U).getRegex(),K=b("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,U).getRegex(),G=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,U).getRegex(),q=b(/\\([punct])/,"gu").replace(/punct/g,U).getRegex(),Q=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y=b(O).replace("(?:--\x3e|$)","--\x3e").getRegex(),Z=b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J=b(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",X).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ee=b(/^!?\[(label)\]\[(ref)\]/).replace("label",X).replace("ref",E).getRegex(),et=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",E).getRegex(),ei=b("reflink|nolink(?!\\()","g").replace("reflink",ee).replace("nolink",et).getRegex(),en={_backpedal:w,anyPunctuation:q,autolink:Q,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:w,emStrongLDelim:$,emStrongRDelimAst:K,emStrongRDelimUnd:G,escape:V,link:J,nolink:et,punctuation:j,reflink:ee,reflinkSearch:ei,tag:Z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:w},es={...en,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",X).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X).getRegex()},eo={...en,escape:b(V).replace("])","~|])").getRegex(),url:b(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},er={...eo,br:b(z).replace("{2,}","*").getRegex(),text:b(eo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:F,gfm:W,pedantic:H},el={normal:en,gfm:eo,breaks:er,pedantic:es};class eh{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||d,this.options.tokenizer=this.options.tokenizer||new x,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:ea.normal,inline:el.normal};this.options.pedantic?(t.block=ea.pedantic,t.inline=el.pedantic):this.options.gfm&&(t.block=ea.gfm,this.options.breaks?t.inline=el.breaks:t.inline=el.gfm),this.tokenizer.rules=t}static get rules(){return{block:ea,inline:el}}static lex(e,t){return new eh(t).lex(e)}static lexInline(e,t){return new eh(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){let n,s,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(e,t,i)=>t+" ".repeat(i.length));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),(s=t[t.length-1])&&("paragraph"===s.type||"text"===s.type)?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),(s=t[t.length-1])&&("paragraph"===s.type||"text"===s.type)?(s.raw+="\n"+n.raw,s.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t,i=1/0,n=e.slice(1);this.options.extensions.startBlock.forEach(e=>{"number"==typeof(t=e.call({lexer:this},n))&&t>=0&&(i=Math.min(i,t))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){s=t[t.length-1],i&&s?.type==="paragraph"?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),(s=t[t.length-1])&&"text"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,o,r,a,l=e;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if((i=this.tokenizer.emStrong(e,l,a))||(i=this.tokenizer.codespan(e))||(i=this.tokenizer.br(e))||(i=this.tokenizer.del(e))||(i=this.tokenizer.autolink(e))||!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let t,i=1/0,n=e.slice(1);this.options.extensions.startInline.forEach(e=>{"number"==typeof(t=e.call({lexer:this},n))&&t>=0&&(i=Math.min(i,t))}),i<1/0&&i>=0&&(s=e.substring(0,i+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}}class ed{options;parser;constructor(e){this.options=e||d}space(e){return""}code({text:e,lang:t,escaped:i}){let n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+"\n";return n?'<pre><code class="language-'+_(n)+'">'+(i?s:_(s,!0))+"</code></pre>\n":"<pre><code>"+(i?s:_(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){let t=this.parser.parse(e);return`<blockquote>
|
|
173
173
|
${t}</blockquote>
|
|
@@ -183,7 +183,7 @@ ${e}</tr>
|
|
|
183
183
|
${(0,ey.ih)(e)}
|
|
184
184
|
\`\`\`
|
|
185
185
|
`,e});function eU(e){let t="";return e.forEach(e=>{t+=e.raw}),t}function ej(e){if(e.tokens)for(let t=e.tokens.length-1;t>=0;t--){let i=e.tokens[t];if("text"===i.type){let n=i.raw.split("\n"),s=n[n.length-1];if(s.includes("`"))return e$(e,"`");if(s.includes("**"))return e$(e,"**");if(s.match(/\*\w/))return e$(e,"*");else if(s.match(/(^|\s)__\w/))return e$(e,"__");else if(s.match(/(^|\s)_\w/))return e$(e,"_");else if(s.match(/(^|\s)\[.*\]\(\w*/)||s.match(/^[^\[]*\]\([^\)]*$/)&&e.tokens.slice(0,t).some(e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/))){let i=e.tokens.slice(t+1);if(i[0]?.type==="link"&&i[1]?.type==="text"&&i[1].raw.match(/^ *"[^"]*$/)||s.match(/^[^"]* +"[^"]*$/))return e$(e,'")',!1);return e$(e,")",!1)}else if(s.match(/(^|\s)\[\w*[^\]]*$/))return e$(e,"](https://microsoft.com)",!1)}}}function e$(e,t,i=!0){let n=eU(Array.isArray(e)?e:[e]);return e_((i?n.trimEnd():n)+t)[0]}},60905:(e,t,i)=>{"use strict";i.d(t,{$B:()=>h,Dk:()=>c,IN:()=>g,RE:()=>m,XS:()=>f,cv:()=>r,ho:()=>d,ir:()=>o,m$:()=>u,mk:()=>l,oJ:()=>a,t8:()=>p});var n=i(11671),s=i(30430);let o={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},r={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},a={progressBarBackground:(0,n.GuP)(n.BTi)},l={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)};(0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9);let h={checkboxBackground:(0,n.GuP)(n.OcU),checkboxBorder:(0,n.GuP)(n.C5U),checkboxForeground:(0,n.GuP)(n.t0B),checkboxDisabledBackground:(0,n.GuP)(n.Uv),checkboxDisabledForeground:(0,n.GuP)(n.hsb)};(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.DSL),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp);let d={inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)},c={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:d,toggleStyles:l},u={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)};(0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS);let g={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)};function p(e){let t={...g};for(let i in e){let s=e[i];t[i]=void 0!==s?(0,n.GuP)(s):void 0}return t}let m={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,s.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},f={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},61137:()=>{},61771:(e,t,i)=>{"use strict";i.d(t,{_:()=>n});let n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},61968:(e,t,i)=>{"use strict";i.d(t,{LN:()=>a,aG:()=>d,uO:()=>h});var n=i(17970),s=i(35468),o=i(47982),r=i(10902);class a{getOffsetRange(e){return new s.L(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return r.Q.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new l.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new l.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let t=e.replacements.map(e=>this.getTextReplacement(e));return new l.deps.TextEdit(t)}}class l{static{this._deps=void 0}static get deps(){if(!this._deps)throw Error("Dependencies not set. Call _setDependencies first.");return this._deps}}function h(e){l._deps=e}class d extends a{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&(this.lineStartOffsetByLineIdx.push(t+1),t>0&&"\r"===e.charAt(t-1)?this.lineEndOffsetByLineIdx.push(t-1):this.lineEndOffsetByLineIdx.push(t));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){let t=this._validatePosition(e);return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}_validatePosition(e){if(e.lineNumber<1)return new o.y(1,1);let t=this.textLength.lineCount+1;if(e.lineNumber>t){let e=this.getLineLength(t);return new o.y(t,e+1)}if(e.column<1)return new o.y(e.lineNumber,1);let i=this.getLineLength(e.lineNumber);return e.column-1>i?new o.y(e.lineNumber,i+1):e}getPosition(e){let t=(0,n.iM)(this.lineStartOffsetByLineIdx,t=>t<=e),i=e-this.lineStartOffsetByLineIdx[t]+1;return new o.y(t+1,i)}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new l.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}},61971:(e,t,i)=>{"use strict";let n,s,o;i.d(t,{Su:()=>c,b7:()=>d,fe:()=>u});var r=i(32563),a=i(18780),l=i(2281);function h(){return n||(n=new TextDecoder("UTF-16LE")),n}function d(){return o||(o=a.cm()?h():(s||(s=new TextDecoder("UTF-16BE")),s)),o}function c(e,t,i){let n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?function(e,t,i){let n=[],s=0;for(let o=0;o<i;o++){let i=l.$l(e,t);t+=2,n[s++]=String.fromCharCode(i)}return n.join("")}(e,t,i):h().decode(n)}class u{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return d().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){let t=this._capacity-this._bufferLength;t<=1&&(0===t||r.pc(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}},62401:()=>{},62709:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var n=i(14585),s=i(63325),o=i(71179);function r(e,t,i,r){t.tokenization.forceTokenization(i.startLineNumber);let a=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a);if(!l)return null;let h=new o.V(t,r).getProcessedTokenContextAroundRange(i),d=h.previousLineProcessedTokens.getLineContent(),c=h.beforeRangeProcessedTokens.getLineContent(),u=h.afterRangeProcessedTokens.getLineContent(),g=l.onEnter(e,d,c,u);if(!g)return null;let p=g.indentAction,m=g.appendText,f=g.removeText||0;m?p===n.l.Indent&&(m=" "+m):m=p===n.l.Indent||p===n.l.IndentOutdent?" ":"";let _=(0,s.Cw)(t,i.startLineNumber,i.startColumn);return f&&(_=_.substring(0,_.length-f)),{indentAction:p,appendText:m,removeText:f,indentation:_}}},62747:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});let n=(0,i(51328).u1)("themeService")},62769:()=>{},62954:(e,t,i)=>{"use strict";i.d(t,{d:()=>g});var n=i(18805),s=i(52161),o=i(75364),r=i(1315),a=i(10675);i(40380);var l=i(23001),h=i(27393),d=i(86578);class c extends d.LN{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new n.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,s.BC)(e,(0,s.$)(".monaco-dropdown")),this._label=(0,s.BC)(this._element,(0,s.$)(".dropdown-label"));let i=t.labelRenderer;for(const e of(i||(i=e=>(e.textContent=t.label||"",null)),[s.Bx.CLICK,s.Bx.MOUSE_DOWN,h.B.Tap]))this._register((0,s.ko)(this.element,e,e=>s.fs.stop(e,!0)));for(const e of[s.Bx.MOUSE_DOWN,h.B.Tap])this._register((0,s.ko)(this._label,e,e=>{(0,s.Er)(e)&&0!==e.button||(this.visible?this.hide():this.show())}));this._register((0,s.ko)(this._label,s.Bx.KEY_DOWN,e=>{let t=new l.Z(e);(t.equals(3)||t.equals(10))&&(s.fs.stop(e,!0),this.visible?this.hide():this.show())}));const o=i(this._label);o&&this._register(o),this._register(h.q.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class u extends c{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class g extends o.EH{get onDidChangeVisibility(){return this._onDidChangeVisibility.event}constructor(e,t,i,s=Object.create(null)){super(null,e,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new n.vl),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=e=>(this.element=(0,s.BC)(e,(0,s.$)("a.action-label")),this.renderLabel(this.element)),i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new u(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(e=>{this.element?.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}renderLabel(e){let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter(e=>!!e):this.options.classNames&&(t=this.options.classNames),t.find(e=>"icon"===e)||t.push("codicon"),e.classList.add(...t),this._action.label&&this._register((0,r.i)().setupManagedHover(this.options.hoverDelegate??(0,a.nZ)("mouse"),e,this._action.label)),null}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){let e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}},63003:(e,t,i)=>{"use strict";function n(){return!1}function s(e){return{dispose(){}}}i.d(t,{O:()=>s,e:()=>n})},63130:(e,t,i)=>{"use strict";i.d(t,{_:()=>s});var n=i(17397);class s extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw Error("TextModelPart is disposed!")}}},63147:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{Uq:()=>s,mu:()=>o,qE:()=>n});class s{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class o{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}},63325:(e,t,i)=>{"use strict";i.d(t,{JZ:()=>E,Cw:()=>O});var n=i(18805),s=i(17397),o=i(32563),r=i(65825),a=i(14585);class l{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n "}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n "}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new a.i3(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a.i3({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var h=i(51765),d=i(347),c=i(19011);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let i of t.close){let t=i.charAt(i.length-1);e.push(t)}return(0,h.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;let n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;let s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=c.Fu.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;let a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;let l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(47576);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{let t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,s=this._regExpRules.length;e<s;e++){let s=this._regExpRules[e];if([{reg:s.beforeText,text:i},{reg:s.afterText,text:n},{reg:s.previousLineText,text:t}].every(e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))))return s.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){let t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:a.l.IndentOutdent}}if(e>=2&&i.length>0){for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:a.l.Indent}}return null}static _createOpenBracketRegExp(e){let t=o.bm(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",f._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=o.bm(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,f._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,m.dz)(e),null}}}var _=i(51328),v=i(87050),b=i(12401),C=i(44597),w=i(84906),y=i(83391);class S{constructor(e,t){this.languageId=e;const i=t.brackets?k(t.brackets):[],n=new y.VV(e=>{let t=new Set;return{info:new L(this,e,t),closing:t}}),s=new y.VV(e=>{let t=new Set,i=new Set;return{info:new D(this,e,t,i),opening:t,openingColorized:i}});for(const[e,t]of i){const i=n.get(e),o=s.get(t);i.closing.add(o.info),o.opening.add(i.info)}for(const[e,o]of t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter(e=>"<"!==e[0]||">"!==e[1])){const t=n.get(e),i=s.get(o);t.closing.add(i.info),i.openingColorized.add(t.info),i.opening.add(t.info)}this._openingBrackets=new Map([...n.cachedValues].map(([e,t])=>[e,t.info])),this._closingBrackets=new Map([...s.cachedValues].map(([e,t])=>[e,t.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){let t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,c.xb)(t,e)}}function k(e){return e.filter(([e,t])=>""!==e&&""!==t)}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var I=function(e,t){return function(i,n){t(i,n,e)}};class N{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}let E=(0,_.u1)("languageConfigurationService"),M=class extends s.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(T));this._register(this.configurationService.onDidChangeConfiguration(e=>{let t=e.change.keys.some(e=>i.has(e)),n=e.change.overrides.filter(([e,t])=>t.some(e=>i.has(e))).map(([e])=>e);if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new N(void 0));else for(let e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new N(e)))})),this._register(this._registry.onDidChange(e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new N(e.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){var s,o;let r,a,l=t.getLanguageConfiguration(e);if(!l){if(!n.isRegisteredLanguageId(e))return new H(e,{});l=new H(e,{})}let h=(s=l.languageId,r=(o=i).getValue(T.brackets,{overrideIdentifier:s}),a=o.getValue(T.colorizedBracketPairs,{overrideIdentifier:s}),{brackets:R(r),colorizedBracketPairs:R(a)}),d=A([l.underlyingConfig,h]);return new H(l.languageId,d)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(0,v.pG),I(1,b.L)],M);let T={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map(e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]}).filter(e=>!!e)}function O(e,t,i){let n=e.getLineContent(t),s=o.UU(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let i=new F(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,s.lC)((0,s.s)(()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){let e=this._resolve();e&&(this._resolved=new H(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(F.cmp),A(this._entries.map(e=>e.configuration)))}}function A(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class F{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class B{constructor(e){this.languageId=e}}class W extends s.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(w.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));let o=n.register(t,i);return this._onDidChange.fire(new B(e)),(0,s.lC)((0,s.s)(()=>{o.dispose(),this._onDidChange.fire(new B(e))}))}getLanguageConfiguration(e){let t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new c.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&("string"==typeof t.lineComment?i.lineCommentToken=t.lineComment:(i.lineCommentToken=t.lineComment.comment,i.lineCommentNoIndent=t.lineComment.noIndent)),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,C.v)(E,M,1)},63708:(e,t,i)=>{"use strict";i.d(t,{t:()=>n});let n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(85127).K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},63849:(e,t,i)=>{"use strict";i.d(t,{mJ:()=>y,x8:()=>C});var n=i(52161),s=i(49214),o=i(9634);class r{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){let e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function a(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return 7*!!t;default:return 0}}var l=i(46712),h=i(12704),d=i(1315),c=i(69015),u=i(98761),g=i(18805);class p{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class m{constructor(e=new Set,t=10){this._history=e,this._limit=t,this._onChange(),this._history.onDidChange&&(this._disposable=this._history.onDidChange(()=>this._onChange()))}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();let e=this._elements;this._navigator=new p(e,0,e.length,e.length)}_reduceToLimit(){let e=this._elements;if(e.length>this._limit){let t=e.slice(e.length-this._limit);this._history.replace?this._history.replace(t):this._history=new Set(t)}}_currentPosition(){let e=this._navigator.current();return e?this._elements.indexOf(e):-1}get _elements(){let e=[];return this._history.forEach(t=>e.push(t)),e}dispose(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0)}}var f=i(54006);i(96260);var _=i(60414),v=i(17397);let b=n.$,C={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class w extends u.x{get onDidChange(){return this._onDidChange.event}get onDidHeightChange(){return this._onDidHeightChange.event}constructor(e,t,i){super(),this.state="idle",this.maxHeight=1/0,this.hover=this._register(new v.HE),this._onDidChange=this._register(new g.vl),this._onDidHeightChange=this._register(new g.vl),this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.BC(e,b(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=n.BC(this.element,b(".ibwrapper"));if(this.input=n.BC(r,b(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:1/0,this.mirror=n.BC(r,b("div.mirror")),this.mirror.innerText="\xa0",this.scrollableElement=new c.Se(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.BC(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(e=>this.input.scrollTop=e.scrollTop));const t=this._register(new o.f(e.ownerDocument,"selectionchange")),i=g.Jh.filter(t.event,()=>{let t=e.ownerDocument.getSelection();return t?.anchorNode===r});this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new l.E(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover.value||(this.hover.value=this._register((0,d.i)().setupDelayedHoverAtMouse(this.input,()=>({content:this.tooltip,appearance:{compact:!0}}))))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.OK(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return n.X7(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){let e=this.input.selectionStart;if(null===e)return null;let t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;let e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&(0,f.aI)(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));let i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${s.gI(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&((e=this.validation(this.value))?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){let t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){let e,t;if(!this.contextViewProvider||!this.message)return;let i=()=>e.style.width=n.Tr(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{var s,o,l;if(!this.message)return null;e=n.BC(t,b(".monaco-inputbox-container")),i();let h=b("span.monaco-inputbox-message");if(this.message.formatContent){let e;s=this.message.content,o=void 0,(e=h??document.createElement("div")).textContent="",function e(t,i,s,o){let r;if(2===i.type)r=document.createTextNode(i.content||"");else if(3===i.type)r=document.createElement("b");else if(4===i.type)r=document.createElement("i");else if(7===i.type&&o)r=document.createElement("code");else if(5===i.type&&s){let e=document.createElement("a");s.disposables.add(n.un(e,"click",e=>{s.callback(String(i.index),e)})),r=e}else 8===i.type?r=document.createElement("br"):1===i.type&&(r=t);r&&t!==r&&t.appendChild(r),r&&Array.isArray(i.children)&&i.children.forEach(t=>{e(r,t,s,o)})}(e,function(e,t){let i={type:1,children:[]},n=0,s=i,o=[],l=new r(e);for(;!l.eos();){let e=l.next(),i="\\"===e&&0!==a(l.peek(),t);if(i&&(e=l.next()),i||0===a(e,t)||e!==l.peek())if("\n"===e)2===s.type&&(s=o.pop()),s.children.push({type:8});else if(2!==s.type){let t={type:2,content:e};s.children.push(t),o.push(s),s=t}else s.content+=e;else{l.advance(),2===s.type&&(s=o.pop());let i=a(e,t);if(s.type===i||5===s.type&&6===i)s=o.pop();else{let e={type:i,children:[]};5===i&&(e.index=n,n++),s.children.push(e),o.push(s),s=e}}}return 2===s.type&&(s=o.pop()),o.length,i}(s,!!o?.renderCodeSegments),o?.actionHandler,o?.renderCodeSegments)}else l=this.message.content,(h??document.createElement("div")).textContent=l;h.classList.add(this.classForType(this.message.type));let d=this.stylesForType(this.message.type);return h.style.backgroundColor=d.background??"",h.style.color=d.foreground??"",h.style.border=d.border?`1px solid ${d.border}`:"",n.BC(e,h),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?_.kg(9,"Error: {0}",this.message.content):2===this.message.type?_.kg(10,"Warning: {0}",this.message.content):_.kg(11,"Info: {0}",this.message.content),h.xE(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;let e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText="\xa0",this.layout()}applyStyles(){let e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",n=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${s.gI(n,"transparent")}`}layout(){if(!this.mirror)return;let e=this.cachedContentHeight;this.cachedContentHeight=n.OK(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){let t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;null!==i&&null!==n&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}class y extends w{constructor(e,t,i){const s=_.kg(12," or {0} for history",`\u21C5`),o=_.kg(13," ({0} for history)",`\u21C5`);super(e,t,i),this._onDidFocus=this._register(new g.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new g.vl),this.onDidBlur=this._onDidBlur.event,this.history=this._register(new m(i.history,100));const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){let e=this.placeholder.endsWith(")")?s:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&!n.X7(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver((e,t)=>{e.forEach(e=>{e.target.textContent||r()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>r()),this.onblur(this.input,()=>{let e=e=>{if(!this.placeholder.endsWith(e))return!1;{let t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}};e(o)||e(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",h.h5(this.value?this.value:_.kg(14,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,h.h5(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}},64059:(e,t,i)=>{"use strict";i.d(t,{J:()=>o,U:()=>s});var n=i(51328);let s=(0,n.u1)("textResourceConfigurationService"),o=(0,n.u1)("textResourcePropertiesService")},64418:(e,t,i)=>{"use strict";i.d(t,{i:()=>s});var n=i(17397);class s extends n.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){let n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}},64760:(e,t,i)=>{"use strict";i.d(t,{C7:()=>r,MS:()=>f,QB:()=>g,Qx:()=>w,VL:()=>C,Vh:()=>l,Vp:()=>a,eu:()=>c,l4:()=>d,o0:()=>b,pW:()=>p,qe:()=>h,rR:()=>y,sS:()=>u,vr:()=>v,wP:()=>m,zG:()=>_});var n=i(32563),s=i(10902),o=i(21040);function r(e,t,i,n){return e!==i?h(i-e,n):h(0,n-t)}let a=0;function l(e){return 0===e}function h(e,t){return 0x4000000*e+t}function d(e){let t=Math.floor(e/0x4000000);return new o.W(t,e-0x4000000*t)}function c(e){return Math.floor(e/0x4000000)}function u(e){return e}function g(e,t){let i=e+t;return t>=0x4000000&&(i-=e%0x4000000),i}function p(e,t){return e.reduce((e,i)=>g(e,t(i)),a)}function m(e,t){return e===t}function f(e,t){if(t-e<=0)return a;let i=Math.floor(e/0x4000000),n=Math.floor(t/0x4000000),s=t-0x4000000*n;return i===n?h(0,s-(e-0x4000000*i)):h(n-i,s)}function _(e,t){return e<t}function v(e,t){return e<=t}function b(e,t){return e>=t}function C(e){return h(e.lineNumber-1,e.column-1)}function w(e,t){let i=Math.floor(e/0x4000000),n=Math.floor(t/0x4000000);return new s.Q(i+1,e-0x4000000*i+1,n+1,t-0x4000000*n+1)}function y(e){let t=(0,n.uz)(e);return h(t.length-1,t[t.length-1].length)}},65212:(e,t,i)=>{"use strict";i.d(t,{O:()=>d});var n=i(83725),s=i(17397),o=i(18780),r=i(61971),a=i(55537),l=i(57270);let h=0;class d extends s.jG{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(e,t,i,n){super(),this.fontSize=e,this.fontFamily=t,this.devicePixelRatio=i,this._decorationStyleCache=n,this.id=h++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=o.zx?"greyscale":"subpixel";const s=Math.ceil(this.fontSize*i);this._canvas=new OffscreenCanvas(3*s,3*s),this._ctx=(0,l.HS)(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:"greyscale"===this._antiAliasing})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${s}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(e,t,i,n){return""===e?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===e&&this._workGlyphConfig.tokenMetadata===t&&this._workGlyphConfig.decorationStyleSetId===i?this._workGlyph:(this._workGlyphConfig.chars=e,this._workGlyphConfig.tokenMetadata=t,this._workGlyphConfig.decorationStyleSetId=i,this._rasterizeGlyph(e,t,i,n))}_rasterizeGlyph(e,t,i,n){let s=Math.ceil(this.fontSize*this.devicePixelRatio),o=3*s;this._canvas.width!==o&&(this._canvas.width=o,this._canvas.height=o),this._ctx.save();let l=(15&t)/10,h=n[a.x.getBackground(t)],d=this._decorationStyleCache.getStyleSet(i);"subpixel"===this._antiAliasing?(this._ctx.fillStyle=h,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let c=new r.fe(200),u=a.x.getFontStyle(t);1&u&&c.appendString("italic "),d?.bold!==void 0?d.bold&&c.appendString("bold "):2&u&&c.appendString("bold "),c.appendString(`${s}px ${this.fontFamily}`),this._ctx.font=c.build(),d?.color!==void 0?this._ctx.fillStyle=`#${d.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=n[a.x.getForeground(t)],this._ctx.textBaseline="top",d?.opacity!==void 0&&(this._ctx.globalAlpha=d.opacity),this._ctx.fillText(e,s+l,s),this._ctx.restore();let g=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if("subpixel"===this._antiAliasing){let e=parseInt(h.substring(1,3),16),t=parseInt(h.substring(3,5),16),i=parseInt(h.substring(5,7),16);this._clearColor(g,e,t,i),this._ctx.putImageData(g,0,0)}return this._findGlyphBoundingBox(g,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-s,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-s,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(e,t,i,n){for(let s=0;s<e.data.length;s+=4)e.data[s]===t&&e.data[s+1]===i&&e.data[s+2]===n&&(e.data[s+3]=0)}_findGlyphBoundingBox(e,t){let i=this._canvas.height,n=this._canvas.width,s=!1;for(let o=0;o<i;o++){for(let i=0;i<n;i++){let r=o*n*4+4*i+3;if(0!==e.data[r]){t.top=o,s=!0;break}}if(s)break}t.left=0,s=!1;for(let o=0;o<n;o++){for(let r=0;r<i;r++){let i=r*n*4+4*o+3;if(0!==e.data[i]){t.left=o,s=!0;break}}if(s)break}t.right=n,s=!1;for(let o=n-1;o>=t.left;o--){for(let r=0;r<i;r++){let i=r*n*4+4*o+3;if(0!==e.data[i]){t.right=o,s=!0;break}}if(s)break}t.bottom=t.top,s=!1;for(let o=i-1;o>=0;o--){for(let i=0;i<n;i++){let r=o*n*4+4*i+3;if(0!==e.data[r]){t.bottom=o,s=!0;break}}if(s)break}}getTextMetrics(e){return this._ctx.measureText(e)}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([n.B],d.prototype,"cacheKey",null)},65339:(e,t,i)=>{"use strict";i.d(t,{J:()=>r,k:()=>o});var n=i(24244);let s=Object.create(null);function o(e,t){if((0,n.Kg)(t)){let i=s[t];if(void 0===i)throw Error(`${e} references an unknown codicon: ${t}`);t=i}return s[e]=t,{id:e}}function r(){return s}},65677:(e,t,i)=>{"use strict";i.d(t,{R$:()=>g,_k:()=>m,m2:()=>l,pS:()=>u,pz:()=>f,sA:()=>d});var n=i(12917),s=i(32563),o=i(46546);let r=RegExp(`\\$\\(${o.L.iconNameExpression}(?:${o.L.iconModifierExpression})?\\)`,"g"),a=RegExp(`(\\\\)?${r.source}`,"g");function l(e){return e.replace(a,(e,t)=>t?e:`\\${e}`)}let h=RegExp(`\\\\${r.source}`,"g");function d(e){return e.replace(h,e=>`\\${e}`)}let c=RegExp(`(\\s)?(\\\\)?${r.source}(\\s)?`,"g");function u(e){return -1===e.indexOf("$(")?e:e.replace(c,(e,t,i,n)=>i?e:t||n||"")}function g(e){return e?e.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}let p=RegExp(`\\$\\(${o.L.iconNameCharacter}+\\)`,"g");function m(e){p.lastIndex=0;let t="",i=[],n=0;for(;;){let s=p.lastIndex,o=p.exec(e),r=e.substring(s,o?.index);if(r.length>0){t+=r;for(let e=0;e<r.length;e++)i.push(n)}if(!o)break;n+=o[0].length}return{text:t,iconOffsets:i}}function f(e,t,i=!1){let{text:o,iconOffsets:r}=t;if(!r||0===r.length)return(0,n.yr)(e,o,i);let a=(0,s.NB)(o," "),l=o.length-a.length,h=(0,n.yr)(e,a,i);if(h)for(let e of h){let t=r[e.start+l]+l;e.start+=t,e.end+=t}return h}},65801:()=>{},65825:(e,t,i)=>{"use strict";i.d(t,{Io:()=>a,J3:()=>o,Ld:()=>r,Th:()=>function e(t,i,s,o,r){if(i=a(i),r||(r=n.f.first(l)),s.length>r.maxLen){let n=t-r.maxLen/2;return n<0?n=0:o+=n,s=s.substring(n,t+r.maxLen/2),e(t,i,s,o,r)}let h=Date.now(),d=t-1-o,c=-1,u=null;for(let e=1;!(Date.now()-h>=r.timeBudget);e++){let t=d-r.windowSize*e;i.lastIndex=Math.max(0,t);let n=function(e,t,i,n){let s;for(;s=e.exec(t);){let t=s.index||0;if(t<=i&&e.lastIndex>=i)return s;if(n>0&&t>n)break}return null}(i,s,d,c);if(!n&&u||(u=n,t<=0))break;c=t}if(u){let e={word:u[0],startColumn:o+1+u.index,endColumn:o+1+u.index+u[0].length};return i.lastIndex=0,e}return null}});var n=i(57669),s=i(56046);let o="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let i of o)e.indexOf(i)>=0||(t+="\\"+i);return RegExp(t+="\\s]+)","g")}();function a(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}let l=new s.w;l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},66488:(e,t,i)=>{"use strict";var n;function s(e,t){let i=new Map;for(let n of e){let e=t(n),s=i.get(e);s||(s=[],i.set(e,s)),s.push(n)}return i}function o(e,t){let i=[],n=[];for(let n of e)t.has(n)||i.push(n);for(let i of t)e.has(i)||n.push(i);return{removed:i,added:n}}function r(e,t){let i=new Set;for(let n of t)e.has(n)&&i.add(n);return i}i.d(t,{E$:()=>r,Fi:()=>s,Zv:()=>o,iD:()=>a});class a{static{n=Symbol.toStringTag}constructor(e,t){for(const i of(this.toKey=t,this._map=new Map,this[n]="SetWithKey",e))this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[Symbol.iterator](){return this.values()}}},67133:(e,t,i)=>{"use strict";i.d(t,{_:()=>c,ou:()=>l,tk:()=>h});var n=i(47576),s=i(55537),o=i(89536),r=i(64760),a=i(19379);class l{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new d(this.textModel,this.bracketTokens),this._offset=r.Vp,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.qe)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.QB)(this._offset,e);let t=(0,r.l4)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.QB)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.sS)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,i=0;for(;;){let n=this.lineTokens,o=n.getCount(),a=null;if(this.lineTokenOffset<o){let l=n.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<o&&l===n.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;let h=0===s.x.getTokenType(l),d=s.x.containsBalancedBrackets(l),c=n.getEndOffset(this.lineTokenOffset);if(d&&h&&this.lineCharOffset<c){let e=n.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,c),i=this.bracketTokens.getSingleLanguageBracketTokens(e),s=i.regExpGlobal;if(s){s.lastIndex=0;let e=s.exec(t);e&&(a=i.getToken(e[0]))&&(this.lineCharOffset+=e.index)}}if(i+=c-this.lineCharOffset,a)if(e===this.lineIdx&&t===this.lineCharOffset)return this.lineCharOffset+=(0,r.sS)(a.length),a;else{this.peekedToken=a;break}this.lineTokenOffset++,this.lineCharOffset=c}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,(i+=33)>1e3))break;if(i>1500)break}let n=(0,r.C7)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.gV.getEmpty(),new o.yF(n))}}class c{constructor(e,t){let i;this.text=e,this._offset=r.Vp,this.idx=0;const n=t.getRegExpStr(),s=n?RegExp(n+"|\n","gi"):null,h=[];let d=0,c=0,u=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.qe)(0,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(0,e))));const m=[];for(let e=0;e<60;e++)m.push(new l((0,r.qe)(1,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(1,e))));if(s)for(s.lastIndex=0;null!==(i=s.exec(e));){const e=i.index,n=i[0];if("\n"===n)d++,c=e+1;else{if(u!==e){let t;if(g===d){const i=e-u;if(i<p.length)t=p[i];else{const e=(0,r.qe)(0,i);t=new l(e,0,-1,a.gV.getEmpty(),new o.yF(e))}}else{const i=d-g,n=e-c;if(1===i&&n<m.length)t=m[n];else{const e=(0,r.qe)(i,n);t=new l(e,0,-1,a.gV.getEmpty(),new o.yF(e))}}h.push(t)}h.push(t.getToken(n)),u=e+n.length,g=d}}const f=e.length;if(u!==f){const e=g===d?(0,r.qe)(0,f-u):(0,r.qe)(d-g,f-c);h.push(new l(e,0,-1,a.gV.getEmpty(),new o.yF(e)))}this.length=(0,r.qe)(d,f-c),this.tokens=h}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new n.EM}}},67352:()=>{},67418:(e,t,i)=>{"use strict";function n(e,t){let i,n=this,s=!1;return function(){if(s)return i;if(s=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}i.d(t,{P:()=>n})},67437:()=>{},68450:(e,t,i)=>{"use strict";i.d(t,{x:()=>a});var n=i(52161),s=i(32563);i(89422);var o=i(17397),r=i(1315);class a extends o.jG{constructor(e,t,i){super(),this.options=t,this.styles=i,this.count=0,this.hover=this._register(new o.HE),this.element=(0,n.BC)(e,(0,n.$)(".monaco-count-badge")),this._register((0,o.s)(()=>e.removeChild(this.element))),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0),this.updateHover()}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.updateHover(),this.render()}updateHover(){""===this.titleFormat||this.hover.value?""===this.titleFormat&&this.hover.value&&(this.hover.value=void 0):this.hover.value=(0,r.i)().setupDelayedHoverAtMouse(this.element,()=>({content:(0,s.GP)(this.titleFormat,this.count),appearance:{compact:!0}}))}render(){this.element.textContent=(0,s.GP)(this.countFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},68587:(e,t,i)=>{"use strict";i.d(t,{x:()=>oh});var n,s,o,r,a,l,h,d,c,u,g,p,m,f,_,v=i(28137),b=i(26065);let C=class{static{this.ID="editor.contrib.markerDecorations"}constructor(e,t){}dispose(){}};C=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=v.A,function(e,t){n(e,t,1)})],C),(0,b.HW)(C.ID,C,0);var w=i(52161),y=i(47576),S=i(18805),k=i(17397),x=i(86431);i(32779);var L=i(89314),D=i(79186),I=i(51765),N=i(54006),E=i(18780),M=i(53068),T=i(9641);class R{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){let t=R._read(e,this.key);this.migrate(t,t=>R._read(e,t),(t,i)=>R._write(e,t,i))}static _read(e,t){if(void 0===e)return;let i=t.indexOf(".");if(i>=0){let n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){let n=t.indexOf(".");if(n>=0){let s=t.substring(0,n);e[s]=e[s]||{},this._write(e[s],t.substring(n+1),i);return}e[t]=i}}function O(e,t){R.items.push(new R(e,t))}function P(e,t){O(e,(i,n,s)=>{if(void 0!==i){for(let[n,o]of t)if(i===n)return void s(e,o)}})}P("wordWrap",[[!0,"on"],[!1,"off"]]),P("lineNumbers",[[!0,"on"],[!1,"off"]]),P("cursorBlinking",[["visible","solid"]]),P("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),P("renderLineHighlight",[[!0,"line"],[!1,"none"]]),P("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),P("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),P("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),P("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),P("autoIndent",[[!1,"advanced"],[!0,"full"]]),P("matchBrackets",[[!0,"always"],[!1,"never"]]),P("renderFinalNewline",[[!0,"on"],[!1,"off"]]),P("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),P("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),P("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),P("defaultColorDecorators",[[!0,"auto"],[!1,"never"]]),P("minimap.autohide",[[!0,"mouseover"],[!1,"none"]]),O("autoClosingBrackets",(e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))}),O("renderIndentGuides",(e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))}),O("highlightActiveIndentGuide",(e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))});let A={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};O("suggest.filteredTypes",(e,t,i)=>{if(e&&"object"==typeof e){for(let n of Object.entries(A))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}}),O("quickSuggestions",(e,t,i)=>{if("boolean"==typeof e){let t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}}),O("experimental.stickyScroll.enabled",(e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))}),O("experimental.stickyScroll.maxLineCount",(e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))}),O("editor.experimentalEditContextEnabled",(e,t,i)=>{"boolean"==typeof e&&(i("editor.experimentalEditContextEnabled",void 0),void 0===t("editor.editContext")&&i("editor.editContext",e))}),O("codeActionsOnSave",(e,t,i)=>{if(e&&"object"==typeof e){let t=!1,n={};for(let i of Object.entries(e))"boolean"==typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}}),O("codeActionWidget.includeNearbyQuickfixes",(e,t,i)=>{"boolean"==typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))}),O("lightbulb.enabled",(e,t,i)=>{"boolean"==typeof e&&i("lightbulb.enabled",e?void 0:"off")}),O("inlineSuggest.edits.codeShifting",(e,t,i)=>{"boolean"==typeof e&&(i("inlineSuggest.edits.codeShifting",void 0),i("inlineSuggest.edits.allowCodeShifting",e?"always":"never"))});var F=i(96444),B=i(59827),W=i(39520),H=i(22967),V=i(13718),z=i(18573),U=i(17674);let j=class extends k.jG{constructor(e,t,i,n,s){super(),this._accessibilityService=s,this._onDidChange=this._register(new S.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new S.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new B.n0,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new M.u(n,i.dimension)),this._targetWindowId=(0,w.zk)(n).vscodeWindowId,this._rawOptions=q(i),this._validatedOptions=G.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(19)&&this._containerObserver.startObserving(),this._register(W.D.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(F.M.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(T.T.onDidChange(()=>this._recomputeOptions())),this._register(z.c.getInstance((0,w.zk)(n)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._register(U.U.onDidChangeInputMode(()=>this._recomputeOptions()))}_recomputeOptions(){let e=this._computeOptions(),t=G.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){let e=this._readEnvConfiguration(),t=H._8.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:this._validatedOptions.get(164)||F.M.getTabFocusMode(),inputMode:U.U.getInputMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount,editContextSupported:e.editContextSupported};return G.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){let e;return{extraEditorClassName:(e="",D.nr||D.c8?e+="no-minimap-shadow enable-user-select ":e+="no-user-select ",E.zx&&(e+="mac "),e),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:D.Tc||D.gm,pixelRatio:z.c.getInstance((0,w.ZF)(this._targetWindowId,!0).window).value,editContextSupported:"function"==typeof globalThis.EditContext,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return T.T.readFontInfo((0,w.ZF)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){let t=q(e);G.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=G.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){let t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};j=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(s=V.j,function(e,t){s(e,t,4)})],j);class ${constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class K{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class G{static validateOptions(e){let t=new $;for(let i of B.BE){let n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){let i=new K;for(let n of B.BE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!!(Array.isArray(e)&&Array.isArray(t))&&I.aI(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(!G._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){let i=[],n=!1;for(let s of B.BE){let o=!G._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new B.lw(i):null}static applyUpdate(e,t){let i=!1;for(let n of B.BE)if(t.hasOwnProperty(n.name)){let s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function q(e){let t=N.Go(e);return R.items.forEach(e=>e.apply(t)),t}var Q=i(92158),Y=i(32444);!function(e){let t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},s={...t},o=0,r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,c()}function h(){1===r.input&&(performance.mark("input/end"),r.input=2)}function d(){1===r.render&&(performance.mark("render/end"),r.render=2)}function c(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",s),o++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){let i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/o,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(h)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(d),c())},e.getAndClearMeasurements=function(){if(0===o)return;let e={keydown:p(t),input:p(i),render:p(n),total:p(s),sampleCount:o};return m(t),m(i),m(n),m(s),o=0,e}}(c||(c={}));var Z=i(2721),X=i(64418);class J extends X.i{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class ee{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){let t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;let s=new Uint8Array(n);for(let e=0;e<n;e++)s[e]=i[n-e-1];return s}}var et=i(10980),ei=i(47982),en=i(10902),es=i(71974),eo=i(39898),er=i(96716),ea=i(72981);class el{constructor(e=null){this.hitTarget=e,this.type=0}}class eh{get hitTarget(){return this.spanNode}constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}(u||(u={})).createFromDOMInfo=function(e,t,i){let n=e.getPositionFromDOMInfo(t,i);return n?new eh(n,t,null):new el(t)};class ed{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class ec{static _deduceRage(e,t=null){return!t&&e?new en.Q(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,i){return{type:0,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,i,n,s,o){return{type:e,element:t,mouseColumn:i,position:n,range:s,detail:o}}static createViewZone(e,t,i,n,s){return{type:e,element:t,mouseColumn:i,position:n,range:this._deduceRage(n),detail:s}}static createContentText(e,t,i,n,s){return{type:6,element:e,mouseColumn:t,position:i,range:this._deduceRage(i,n),detail:s}}static createContentEmpty(e,t,i,n){return{type:7,element:e,mouseColumn:t,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(e,t,i){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createScrollbar(e,t,i){return{type:11,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,t,i){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createOutsideEditor(e,t,i,n){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:i,outsideDistance:n}}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class eu{static isTextArea(e){return 2===e.length&&3===e[0]&&7===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class eg{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(165),this.viewDomNode=t.viewDomNode,this.viewLinesGpu=t.viewLinesGpu,this.lineHeight=n.get(75),this.stickyTabStops=n.get(132),this.typicalHalfwidthCharacterWidth=n.get(59).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return eg.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){let n,s=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount(),r=null,a=null;return i.afterLineNumber!==o&&(a=new ei.y(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new ei.y(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),n=null===a?r:null===r?a:t<s?r:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:r,positionAfter:a,position:n}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){let e=this._context.viewModel.getLineCount(),t=this._context.viewModel.getLineMaxColumn(e);return{range:new en.Q(e,t,e,t),isAfterLines:!0}}let t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.viewModel.getLineMaxColumn(t);return{range:new en.Q(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return eg._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==e.ownerDocument.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)break;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}isRtl(e){return this.viewModel.getTextDirection(e)===er.z4.RTL}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class ep{constructor(e,t,i,n){this.editorPos=t,this.pos=i,this.relativePos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ev._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class em extends ep{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=ee.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,s){super(e,t,i,n),this.hitTestResult=new ea.d(()=>ev.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=s;const o=!!this._eventTarget;this._useHitTestTarget=!o}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
|
|
186
|
-
target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?es.A.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return ec.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return ec.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return ec.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return ec.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return ec.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return ec.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return ec.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return ec.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return ec.createOverlayWidget(this.target,this._getMouseColumn(),e)}}let ef={isAfterLines:!0};function e_(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class ev{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){let t=e.target,i=ee.collect(t,this._viewHelper.viewDomNode);return!!(eu.isChildOfContentWidgets(i)||eu.isChildOfOverflowingContentWidgets(i)||eu.isChildOfOverlayWidgets(i)||eu.isChildOfOverflowingOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){let o=new eg(this._context,this._viewHelper,e),r=new em(o,t,i,n,s);try{let e=ev._createMouseTarget(o,r);if(6===e.type&&o.stickyTabStops&&null!==e.position){let t=ev._snapToSoftTabBoundary(e.position,o.viewModel),i=en.Q.fromPositions(t,t).plusRange(e.range);return r.fulfillContentText(t,i,e.detail)}return e}catch(e){return r.fulfillUnknown()}}static _createMouseTarget(e,t){if(null===t.target)return t.fulfillUnknown();let i=null;return eu.isChildOfOverflowGuard(t.targetPath)||eu.isChildOfOverflowingContentWidgets(t.targetPath)||eu.isChildOfOverflowingOverlayWidgets(t.targetPath)||(i=i||t.fulfillUnknown()),(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=i||ev._hitTestContentWidget(e,t))||ev._hitTestOverlayWidget(e,t))||ev._hitTestMinimap(e,t))||ev._hitTestScrollbarSlider(e,t))||ev._hitTestViewZone(e,t))||ev._hitTestMargin(e,t))||ev._hitTestViewCursor(e,t))||ev._hitTestTextArea(e,t))||ev._hitTestViewLines(e,t))||ev._hitTestScrollbar(e,t))||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(eu.isChildOfContentWidgets(t.targetPath)||eu.isChildOfOverflowingContentWidgets(t.targetPath)){let i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(eu.isChildOfOverlayWidgets(t.targetPath)||eu.isChildOfOverflowingOverlayWidgets(t.targetPath)){let i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){for(let i of e.lastRenderData.lastViewCursorsRenderData)if(t.target===i.domNode)return t.fulfillContentText(i.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){let i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(let o of i){if(n<o.contentLeft||n>o.contentLeft+o.width)continue;let i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){let e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return eu.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition(),s=Math.abs(t.relativePos.x),o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if((s-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth){let r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition());return o.glyphMarginLane=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber)[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,o)}return(s-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o))}return null}static _hitTestViewLines(e,t){if(!eu.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ei.y(1,1),ef);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new ei.y(i,n),ef)}if(eu.isStrictChildOfViewLines(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineLength(i),s=e.getLineWidth(i);if(0===n){let e=e_(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(new ei.y(i,1),e)}if(e.isRtl(i)){if(t.mouseContentHorizontalOffset+s<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let n=e_(t.mouseContentHorizontalOffset-s),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,n)}}else if(t.mouseContentHorizontalOffset>=s){let n=e_(t.mouseContentHorizontalOffset-s),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,n)}}else if(e.viewLinesGpu){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){let n=e.getLineWidth(i),s=e_(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new ei.y(i,1),s)}let n=e.getLineWidth(i);if(e.isRtl(i)){if(t.mouseContentHorizontalOffset+n<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let s=e_(t.mouseContentHorizontalOffset-n),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}else if(t.mouseContentHorizontalOffset>=n){let s=e_(t.mouseContentHorizontalOffset-n),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}let s=e.viewLinesGpu.getPositionAtCoordinate(i,t.mouseContentHorizontalOffset);if(s)return t.fulfillContentText(s,en.Q.fromPositions(s,s),{injectedText:null,mightBeForeignElement:!1})}let i=t.hitTestResult.value;return 1===i.type?ev.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(eu.isChildOfMinimap(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ei.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(eu.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){let i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ei.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(eu.isChildOfScrollableElement(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ei.y(i,n))}return null}getMouseColumn(e){let t=this._context.configuration.options,i=t.get(165),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return ev._getMouseColumn(n,t.get(59).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){let o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){let e=e_(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}let l=e.visibleRangeForPosition(o,r);if(!l)return t.fulfillUnknown(n);let h=l.left;if(1>Math.abs(t.mouseContentHorizontalOffset-h))return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});let d=[];if(d.push({offset:l.left,column:r}),r>1){let t=e.visibleRangeForPosition(o,r-1);t&&d.push({offset:t.left,column:r-1})}if(r<e.viewModel.getLineMaxColumn(o)){let t=e.visibleRangeForPosition(o,r+1);t&&d.push({offset:t.left,column:r+1})}d.sort((e,t)=>e.offset-t.offset);let c=t.pos.toClientCoordinates(w.zk(e.viewDomNode)),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right,p=null;for(let e=1;e<d.length;e++){let i=d[e-1],s=d[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=s.offset){p=new en.Q(o,i.column,o,s.column),n=Math.abs(i.offset-t.mouseContentHorizontalOffset)<Math.abs(s.offset-t.mouseContentHorizontalOffset)?new ei.y(o,i.column):new ei.y(o,s.column);break}}return t.fulfillContentText(n,p,{mightBeForeignElement:!g||!!s,injectedText:s})}static _doHitTestWithCaretRangeFromPoint(e,t){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),s=n+e.lineHeight;if(!(i===e.viewModel.getLineCount()&&t.mouseVerticalOffset>s)){let i=Math.floor((n+s)/2),o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);let r=new Z.nz(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(w.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(w.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let i,n=w.jG(e.viewDomNode);if(!(i=n?void 0===n.caretRangeFromPoint?function(e,t,i){let n=document.createRange(),s=e.elementFromPoint(t,i);if(s?.hasChildNodes()){let e;for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;let i=s.getBoundingClientRect(),o=w.zk(s),r=o.getComputedStyle(s,null).getPropertyValue("font-style"),a=o.getComputedStyle(s,null).getPropertyValue("font-variant"),l=o.getComputedStyle(s,null).getPropertyValue("font-weight"),h=o.getComputedStyle(s,null).getPropertyValue("font-size"),d=o.getComputedStyle(s,null).getPropertyValue("line-height"),c=o.getComputedStyle(s,null).getPropertyValue("font-family"),u=`${r} ${a} ${l} ${h}/${d} ${c}`,g=s.innerText,p=i.left,m=0;if(t>i.left+i.width)m=g.length;else{let i=eb.getInstance();for(let n=0;n<g.length+1;n++){if(t<(p+=e=i.getCharWidth(g.charAt(n),u)/2)){m=n;break}p+=e}}n.setStart(s.firstChild,m),n.setEnd(s.firstChild,m)}return n}(n,t.clientX,t.clientY):n.caretRangeFromPoint(t.clientX,t.clientY):e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY))||!i.startContainer)return new el;let s=i.startContainer;if(s.nodeType===s.TEXT_NODE){let t=s.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===et.G.CLASS_NAME?u.createFromDOMInfo(e,t,i.startOffset):new el(s.parentNode)}if(s.nodeType===s.ELEMENT_NODE){let t=s.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===et.G.CLASS_NAME?u.createFromDOMInfo(e,s,s.textContent.length):new el(s)}return new el}static _doHitTestWithCaretPositionFromPoint(e,t){let i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){let t=i.offsetNode.parentNode,n=t?t.parentNode:null,s=n?n.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===et.G.CLASS_NAME?u.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new el(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){let t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,s=t?t.parentNode:null,o=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(n===et.G.CLASS_NAME){let t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return u.createFromDOMInfo(e,t,0)}else if(o===et.G.CLASS_NAME)return u.createFromDOMInfo(e,i.offsetNode,0)}return new el(i.offsetNode)}static _snapToSoftTabBoundary(e,t){let i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),s=eo.s.atomicPosition(i,e.column-1,n,2);return -1!==s?new ei.y(e.lineNumber,s+1):e}static doHitTest(e,t){let i=new el;if("function"==typeof e.viewDomNode.ownerDocument.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(w.zk(e.viewDomNode)))),1===i.type){let t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);(t||!n.equals(i.position))&&(i=new eh(n,i.spanNode,t))}return i}}class eb{static{this._INSTANCE=null}static getInstance(){return eb._INSTANCE||(eb._INSTANCE=new eb),eb._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let i=e+t;if(this._cache[i])return this._cache[i];let n=this._canvas.getContext("2d");n.font=t;let s=n.measureText(e).width;return this._cache[i]=s,s}}var eC=i(26946),ew=i(27393),ey=i(8502),eS=i(28378),ek=i(10965),ex=i(69015);class eL extends k.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=this._createDragScrollingOperation(e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class eD extends k.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=w.PG(w.zk(o.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}}class eI extends eL{_createDragScrollingOperation(e,t){return new eN(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}}class eN extends eD{_getScrollSpeed(){let e=this._context.configuration.options.get(75),t=this._context.configuration.options.get(165).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e,t=this._context.configuration.options.get(75),i=this._getScrollSpeed(),n=this._tick()/1e3*i*t,s="above"===this._position.outsidePosition?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,s),this._viewHelper.renderNow();let o=this._context.viewLayout.getLinesViewportData(),r="above"===this._position.outsidePosition?o.startLineNumber:o.endLineNumber;{let t=(0,Z.wt)(this._viewHelper.viewDomNode),i=this._context.configuration.options.get(165).horizontalScrollbarHeight,n=new Z.nz(this._mouseEvent.pos.x,t.y+t.height-i-.1),s=(0,Z.i_)(this._viewHelper.viewDomNode,t,n);e=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),t,n,s,null)}e.position&&e.position.lineNumber===r||(e="above"===this._position.outsidePosition?ec.createOutsideEditor(this._position.mouseColumn,new ei.y(r,1),"above",this._position.outsideDistance):ec.createOutsideEditor(this._position.mouseColumn,new ei.y(r,this._context.viewModel.getLineMaxColumn(r)),"below",this._position.outsideDistance)),this._dispatchMouse(e,!0,2),this._animationFrameDisposable=w.PG(w.zk(e.element),()=>this._execute())}}class eE extends eL{_createDragScrollingOperation(e,t){return new eM(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}}class eM extends eD{_getScrollSpeed(){let e=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,t=this._context.configuration.options.get(165).contentWidth/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e,t=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,i=this._getScrollSpeed(),n=this._tick()/1e3*i*t*.5,s="left"===this._position.outsidePosition?-n:n;if(this._context.viewModel.viewLayout.deltaScrollNow(s,0),this._viewHelper.renderNow(),!this._position.position)return;let o=this._position.position.lineNumber;{let t=(0,Z.wt)(this._viewHelper.viewDomNode),i=this._context.configuration.options.get(165).horizontalScrollbarHeight,n=new Z.nz(this._mouseEvent.pos.x,t.y+t.height-i-.1),s=(0,Z.i_)(this._viewHelper.viewDomNode,t,n);e=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),t,n,s,null)}e="left"===this._position.outsidePosition?ec.createOutsideEditor(e.mouseColumn,new ei.y(o,e.mouseColumn),"left",this._position.outsideDistance):ec.createOutsideEditor(e.mouseColumn,new ei.y(o,e.mouseColumn),"right",this._position.outsideDistance),this._dispatchMouse(e,!0,2),this._animationFrameDisposable=w.PG(w.zk(e.element),()=>this._execute())}}class eT extends X.i{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new ev(this._context,i),this._mouseDownOperation=this._register(new eR(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(e,t)=>this._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(165).height;const n=new Z.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=w.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new Z.dO(e,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e)));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e,t)=>{s=t})),this._register(w.ko(this.viewHelper.viewDomNode,w.Bx.POINTER_UP,e=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=ex.QC.INSTANCE,t=0,i=W.D.getZoomLevel(),n=!1,s=0,o=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(84))return;let a=new eS.$(o);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(r(o)){let e=W.D.getZoomLevel(),t=a.deltaY>0?1:-1;W.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=W.D.getZoomLevel(),n=r(o),s=0),t=Date.now(),s+=a.deltaY,n&&(W.D.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())};function r(e){return E.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(w.ko(this.viewHelper.viewDomNode,w.Bx.MOUSE_WHEEL,o,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(165)){let e=this._context.configuration.options.get(165).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let i=new Z.Hh(e,t).toPageCoordinates(w.zk(this.viewHelper.viewDomNode)),n=(0,Z.wt)(this.viewHelper.viewDomNode);if(i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width)return null;let s=(0,Z.i_)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){let t=w.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find(e=>this.viewHelper.viewDomNode.contains(e)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e,t){let i=this._createMouseTarget(e,!0),n=6===i.type||7===i.type,s=2===i.type||3===i.type||4===i.type,o=3===i.type,r=this._context.configuration.options.get(125),a=8===i.type||5===i.type,l=9===i.type,h=e.leftButton||e.middleButton;E.zx&&e.leftButton&&e.ctrlKey&&(h=!1);let d=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(h&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){let n=i.detail;h&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class eR extends k.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new Z.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new eI(this._context,this._viewHelper,this._mouseTargetFactory,(e,t,i)=>this._dispatchMouse(e,t,i))),this._leftRightDragScrolling=this._register(new eE(this._context,this._viewHelper,this._mouseTargetFactory,(e,t,i)=>this._dispatchMouse(e,t,i))),this._mouseState=new eO,this._currentSelection=new ek.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13===t.type?"above"===t.outsidePosition||"below"===t.outsidePosition?(this._topBottomDragScrolling.start(t,e),this._leftRightDragScrolling.stop()):(this._leftRightDragScrolling.start(t,e),this._topBottomDragScrolling.stop()):(this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;let s=this._context.configuration.options;if(!s.get(104)&&s.get(42)&&!s.get(28)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,e=>this._onMouseDownThenMove(e),e=>{let t=this._findMousePosition(this._lastMouseEvent,!1);w.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posy<t.y){let i=t.y-e.posy,o=Math.max(n.getCurrentScrollTop()-i,0),r=eg.getZoneAtCoord(this._context,o);if(r){let e=this._helpPositionJumpOverViewZone(r);if(e)return ec.createOutsideEditor(s,e,"above",i)}let a=n.getLineNumberAtVerticalOffset(o);return ec.createOutsideEditor(s,new ei.y(a,1),"above",i)}if(e.posy>t.y+t.height){let o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=eg.getZoneAtCoord(this._context,r);if(a){let e=this._helpPositionJumpOverViewZone(a);if(e)return ec.createOutsideEditor(s,e,"below",o)}let l=n.getLineNumberAtVerticalOffset(r);return ec.createOutsideEditor(s,new ei.y(l,i.getLineMaxColumn(l)),"below",o)}let o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y),r=this._context.configuration.options.get(165),a=r.contentLeft;if(e.relativePos.x<=a){let t=a-e.relativePos.x;return ec.createOutsideEditor(s,new ei.y(o,1),"left",t)}let l=0===r.minimap.minimapLeft?r.width-r.verticalScrollbarWidth:r.minimap.minimapLeft;if(e.relativePos.x>=l){let t=e.relativePos.x-l;return ec.createOutsideEditor(s,new ei.y(o,i.getLineMaxColumn(o)),"right",t)}return null}_findMousePosition(e,t){let i=this._getPositionOutsideEditor(e);if(i)return i;let n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){let e=this._helpPositionJumpOverViewZone(n.detail);if(e)return ec.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){let t=new ei.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;if(i&&n)if(i.isBefore(t))return i;else return n;return null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class eO{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let i=new Date().getTime();i-this._lastSetMouseDownCountTime>eO.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var eP=i(9634),eA=i(23001),eF=i(50197),eB=i(32563),eW=i(23762),eH=i(69728);class eV{static{this.EMPTY=new eV("",0,0,null,void 0)}constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let i,n=e.getValue(),s=e.getSelectionStart(),o=e.getSelectionEnd();return t&&n.substring(0,s)===t.value.substring(0,t.selectionStart)&&(i=t.newlineCountBeforeSelection),new eV(n,s,o,null,i)}collapseSelection(){return this.selectionStart===this.value.length?this:new eV(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(e,t){let i=this.value===e.getValue();return t?this.selectionStart===e.getSelectionStart()&&this.selectionEnd===e.getSelectionEnd()&&i:i}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){let t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){let t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}let t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);let i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let n=Math.min((0,eB.Qp)(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min((0,eB.Vi)(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),o=(e.value.substring(n,e.value.length-s),t.value.substring(n,t.value.length-s)),r=e.selectionStart-n,a=e.selectionEnd-n;return t.selectionStart-n==t.selectionEnd-n?{text:o,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}:{text:o,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let i=Math.min((0,eB.Qp)(e.value,t.value),e.selectionEnd),n=Math.min((0,eB.Vi)(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:o,replacePrevCharCnt:r,replaceNextCharCnt:s.length-r,positionDelta:a-o.length}}static fromScreenReaderContentState(e){return new eV(e.value,e.selectionStart,e.selectionEnd,e.selection,e.newlineCountBeforeSelection)}}var ez=i(24924),eU=function(e,t){return function(i,n){t(i,n,e)}};(g||(g={})).Tap="-monaco-textarea-synthetic-tap";class ej{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){let t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let e$=class extends k.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,o){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=o,this._onFocus=this._register(new S.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new S.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new S.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new S.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new S.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new S.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new S.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new S.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new S.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new S.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new S.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new k.HE),this._asyncTriggerCut=this._register(new eF.uC(()=>this._onCut.fire(),0)),this._textAreaState=eV.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(S.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new eF.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown(e=>{let t=new eA.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)})),this._register(this._textArea.onKeyUp(e=>{let t=new eA.Z(e);this._onKeyUp.fire(t)})),this._register(this._textArea.onCompositionStart(e=>{let t=new ej;if(this._currentComposition){this._currentComposition=t;return}if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code)){t.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:e.data});return}this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})})),this._register(this._textArea.onCompositionUpdate(e=>{let t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){let t=eV.readFromTextArea(this._textArea,this._textAreaState),i=eV.deduceAndroidCompositionInput(this._textAreaState,t);this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e);return}let i=t.handleCompositionUpdate(e.data);this._textAreaState=eV.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)})),this._register(this._textArea.onCompositionEnd(e=>{let t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){let e=eV.readFromTextArea(this._textArea,this._textAreaState),t=eV.deduceAndroidCompositionInput(this._textAreaState,e);this._textAreaState=e,this._onType.fire(t),this._onCompositionEnd.fire();return}let i=t.handleCompositionUpdate(e.data);this._textAreaState=eV.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let t=eV.readFromTextArea(this._textArea,this._textAreaState),i=eV.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&(eB.pc(i.text.charCodeAt(0))||127===i.text.charCodeAt(0))||(this._textAreaState=t,(""!==i.text||0!==i.replacePrevCharCnt||0!==i.replaceNextCharCnt||0!==i.positionDelta)&&("insertFromPaste"===e.inputType?this._onPaste.fire({text:i.text,metadata:eH.bs.INSTANCE.get(i.text)}):this._onType.fire(i)))})),this._register(this._textArea.onCut(e=>{this._logService.trace("TextAreaInput#onCut",e),this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(e=>{this._logService.trace("TextAreaInput#onCopy",e),this._ensureClipboardGetsEditorSelection(e)})),this._register(this._textArea.onPaste(e=>{if(this._logService.trace("TextAreaInput#onPaste",e),this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=eH.Mz.getTextData(e.clipboardData);this._logService.trace("TextAreaInput#onPaste with id : ",i?.id," with text.length: ",t.length),t&&(i=i||eH.bs.INSTANCE.get(t),this._logService.trace("TextAreaInput#onPaste (before onPaste)"),this._onPaste.fire({text:t,metadata:i}))})),this._register(this._textArea.onFocus(()=>{let e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new eF.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return w.ko(this._textArea.ownerDocument,"selectionchange",t=>{if(c.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let i=Date.now(),n=i-e;if(e=i,n<5)return;let s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selection)return;let o=this._textArea.getValue();if(this._textAreaState.value!==o)return;let r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;let l=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(d[0],d[1],d[2]),g=new ek.L(h.lineNumber,h.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.isWrittenToTextArea(this._textArea,this._hasFocus)||this._logService.trace(`writeTextAreaState(reason: ${e})`),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){(this._accessibilityService.isScreenReaderOptimized()||"render"!==e)&&!this._currentComposition&&this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){let t,i=this._host.getDataToCopy();this._logService.getLevel()===eW.$b.Trace&&(t=(0,ez.b)());let n={version:1,id:t,isFromEmptySelection:i.isFromEmptySelection,multicursorText:i.multicursorText,mode:i.mode};eH.bs.INSTANCE.set(this._browser.isFirefox?i.text.replace(/\r\n/g,"\n"):i.text,n),e.preventDefault(),e.clipboardData&&eH.Mz.setTextData(e.clipboardData,i.text,i.html,n),this._logService.trace("TextAreaEditContextInput#_ensureClipboardGetsEditorSelection with id : ",t," with text.length: ",i.text.length)}};e$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([eU(4,V.j),eU(5,eW.rr)],e$);class eK extends k.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this._onSyntheticTap=this._register(new S.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new eP.f(this._actual,"keydown")).event,this.onKeyPress=this._register(new eP.f(this._actual,"keypress")).event,this.onKeyUp=this._register(new eP.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new eP.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new eP.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new eP.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new eP.f(this._actual,"beforeinput")).event,this.onInput=this._register(new eP.f(this._actual,"input")).event,this.onCut=this._register(new eP.f(this._actual,"cut")).event,this.onCopy=this._register(new eP.f(this._actual,"copy")).event,this.onPaste=this._register(new eP.f(this._actual,"paste")).event,this.onFocus=this._register(new eP.f(this._actual,"focus")).event,this.onBlur=this._register(new eP.f(this._actual,"blur")).event,this._register(this.onKeyDown(()=>c.onKeyDown())),this._register(this.onBeforeInput(()=>c.onBeforeInput())),this._register(this.onInput(()=>c.onInput())),this._register(this.onKeyUp(()=>c.onKeyUp())),this._register(w.ko(this._actual,g.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=w.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&w.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){let n=this._actual,s=null,o=w.jG(n);s=o?o.activeElement:w.bq();let r=w.zk(s),a=s===n,l=n.selectionStart,h=n.selectionEnd;if(a&&l===t&&h===i){D.gm&&r.parent!==r&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),D.gm&&r.parent!==r&&n.focus();return}try{let e=w.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),w.wk(n,e)}catch(e){}}}class eG extends eT{constructor(e,t,i){super(e,t,i),this._register(ew.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Tap,e=>this.onTap(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Change,e=>this.onChange(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Contextmenu,e=>this._onContextMenu(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(w.ko(this.viewHelper.linesContentDomNode,"pointerdown",e=>{let t=e.pointerType;if("mouse"===t){this._lastPointerType="mouse";return}"touch"===t?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new Z.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,e=>this._onMouseMove(e))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e,t)=>this._onMouseDown(e,t)))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let i=this._createMouseTarget(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class eq extends eT{constructor(e,t,i){super(e,t,i),this._register(ew.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Tap,e=>this.onTap(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Change,e=>this.onChange(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Contextmenu,e=>this._onContextMenu(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let e=document.createEvent("CustomEvent");e.initEvent(g.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class eQ extends k.jG{constructor(e,t,i){super(),(E.un||E.m0&&E.Fr)&&eC.e.pointerEvents?this.handler=this._register(new eG(e,t,i)):ey.G.TouchEvent?this.handler=this._register(new eq(e,t,i)):this.handler=this._register(new eT(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var eY=i(6515),eZ=i(47717);class eX{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){eZ.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new ei.y(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(86)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(86)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){let t=this.configuration.options,i=E.j9&&t.get(121),n=t.get(28),s=t.get(171);e.middleButton&&!i?s||this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){eZ.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){eZ.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),eZ.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),eZ.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){eZ.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){eZ.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){eZ.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){eZ.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){eZ.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){eZ.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){eZ.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){eZ.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){eZ.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var eJ=i(98194),e0=i(61971);class e1{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new y.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;let i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i)return this._rendLineNumberStart-=t-e+1,null;if(e>n)return null;let s=0,o=0;for(let r=i;r<=n;r++){let i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(s,o)}onLinesChanged(e,t){let i=e+t-1;if(0===this.getCount())return!1;let n=this.getStartLineNumber(),s=this.getEndLineNumber(),o=!1;for(let t=e;t<=i;t++)t>=n&&t<=s&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;let i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);let o=[];for(let e=0;e<i;e++)o[e]=this._lineFactory.createLine();let r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),h=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(o).concat(l),h}onTokensChanged(e){if(0===this.getCount())return!1;let t=this.getStartLineNumber(),i=this.getEndLineNumber(),n=!1;for(let s=0,o=e.length;s<o;s++){let o=e[s];if(o.toLineNumber<t||o.fromLineNumber>i)continue;let r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){let t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class e2{constructor(e,t){this._viewContext=e,this._lineFactory=t,this.domNode=this._createDomNode(),this._linesCollection=new e1(this._lineFactory)}_createDomNode(){let e=(0,Y.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(165)}onFlushed(e,t){if(t){let e=this._linesCollection.getStartLineNumber(),t=this._linesCollection.getEndLineNumber();for(let i=e;i<=t;i++)this._linesCollection.getLine(i).getDomNode()?.remove()}return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){let i=t[e].getDomNode();i?.remove()}return!0}onLinesInserted(e){let t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){let i=t[e].getDomNode();i?.remove()}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){let t=this._linesCollection._get(),i=new e5(this.domNode.domNode,this._lineFactory,e,this._viewContext),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},s=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}class e5{static{this._ttPolicy=(0,eJ.H)("editorViewLayer",{createHTML:e=>e})}constructor(e,t,i,n){this._domNode=e,this._lineFactory=t,this._viewportData=i,this._viewContext=n}render(e,t,i,n){let s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1<t||i<s.rendLineNumberStart){s.rendLineNumberStart=t,s.linesLength=i-t+1,s.lines=[];for(let e=t;e<=i;e++)s.lines[e-t]=this._lineFactory.createLine();return this._finishRendering(s,!0,n),s}if(this._renderUntouchedLines(s,Math.max(t-s.rendLineNumberStart,0),Math.min(i-s.rendLineNumberStart,s.linesLength-1),n,t),s.rendLineNumberStart>t){let e=Math.min(i,s.rendLineNumberStart-1);t<=e&&(this._insertLinesBefore(s,t,e,n,t),s.linesLength+=e-t+1)}else if(s.rendLineNumberStart<t){let e=Math.min(s.linesLength,t-s.rendLineNumberStart);e>0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1<i){let e=s.rendLineNumberStart+s.linesLength;e<=i&&(this._insertLinesAfter(s,e,i,n,t),s.linesLength+=i-e+1)}else if(s.rendLineNumberStart+s.linesLength-1>i){let e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){let o=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){let t=o+e;r[e].layoutLine(t,n[t-s],this._lineHeightForLineNumber(t))}}_insertLinesBefore(e,t,i,n,s){let o=[],r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){let t=e.lines[i].getDomNode();t?.remove()}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,s){let o=[],r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,t){let i=e.linesLength-t;for(let n=0;n<t;n++){let t=e.lines[i+n].getDomNode();t?.remove()}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){e5._ttPolicy&&(i=e5._ttPolicy.createHTML(i));let s=this._domNode.lastChild;t||!s?this._domNode.innerHTML=i:s.insertAdjacentHTML("afterend",i);let o=this._domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){let i=e.lines[t];n[t]&&(i.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){let n=document.createElement("div");e5._ttPolicy&&(t=e5._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){let s=e.lines[t];if(i[t]){let e=n.firstChild,t=s.getDomNode();t.parentNode.replaceChild(e,t),s.setDomNode(e)}}}static{this._sb=new e0.fe(1e5)}_finishRendering(e,t,i){let n=e5._sb,s=e.linesLength,o=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<s;e++){let t=o[e];if(a[e]=!1,t.getDomNode())continue;let s=e+r;t.renderLine(s,i[e],this._lineHeightForLineNumber(s),this._viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1,l=[];for(let e=0;e<s;e++){let s=o[e];if(l[e]=!1,a[e])continue;let h=e+r;s.renderLine(h,i[e],this._lineHeightForLineNumber(h),this._viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}_lineHeightForLineNumber(e){return this._viewContext.viewLayout.getLineHeightForLineNumber(e)}}class e4 extends J{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new e2(this._context,{createLine:()=>new e3(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(59);(0,L.M)(this.domNode,t),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);let t=this._context.configuration.options.get(59);return(0,L.M)(this.domNode,t),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){let t=this._dynamicOverlays.filter(e=>e.shouldRender());for(let i=0,n=t.length;i<n;i++){let n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class e3{constructor(e){this._dynamicOverlays=e,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=(0,Y.Z)(e)}onContentChanged(){}onTokensChanged(){}renderLine(e,t,i,n,s){let o="";for(let t=0,i=this._dynamicOverlays.length;t<i;t++)o+=this._dynamicOverlays[t].render(n.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,s.appendString('<div style="top:'),s.appendString(String(t)),s.appendString("px;height:"),s.appendString(String(i)),s.appendString("px;line-height:"),s.appendString(String(i)),s.appendString('px;">'),s.appendString(o),s.appendString("</div>"),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i),this._domNode.setLineHeight(i))}}class e7 extends e4{constructor(e){super(e);const t=this._context.configuration.options.get(165);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class e9 extends e4{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,L.M)(this.domNode,t.get(59))}onConfigurationChanged(e){let t=this._context.configuration.options;(0,L.M)(this.domNode,t.get(59));let i=t.get(165);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class e8{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return e8.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(5===i.type||8===i.type)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ei.y(e.afterLineNumber,1)).lineNumber}}}i(31827);class e6 extends J{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,t=this._context.configuration.options.get(165),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);let n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;for(let i of e.getDecorationsInViewport()){let n,s;if(!i.options.blockClassName)continue;let o=this.blocks[t];o||(o=this.blocks[t]=(0,Y.Z)(document.createElement("div")),this.domNode.appendChild(o)),i.options.blockIsAfterEnd?(n=e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!0)):(n=e.getVerticalOffsetForLineNumber(i.range.startLineNumber,!0),s=i.range.isEmpty()&&!i.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(i.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!0));let[r,a,l,h]=i.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+i.options.blockClassName),o.setLeft(this.contentLeft-h),o.setWidth(this.contentWidth+h+a),o.setTop(n-e.scrollTop-r),o.setHeight(s-n+r+l),t++}for(let e=t;e<this.blocks.length;e++)this.blocks[e].domNode.remove();this.blocks.length=t}}class te extends J{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,Y.Z)(document.createElement("div")),ee.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,Y.Z)(document.createElement("div")),ee.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){for(let t of Object.keys(this._widgets))this._widgets[t].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){for(let e of Object.keys(this._widgets))this._widgets[e].updateAnchorViewPosition()}addWidget(e){let t=new tt(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let e=this._widgets[t];delete this._widgets[t];let i=e.domNode.domNode;i.remove(),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){for(let t of Object.keys(this._widgets))this._widgets[t].onBeforeRender(e)}prepareRender(e){for(let t of Object.keys(this._widgets))this._widgets[t].prepareRender(e)}render(e){for(let t of Object.keys(this._widgets))this._widgets[t].render(e)}}class tt{constructor(e,t,i){this._primaryAnchor=new ti(null,null),this._secondaryAnchor=new ti(null,null),this._context=e,this._viewDomNode=t,this._actual=i;const n=this._context.configuration.options,s=n.get(165),o=n.get(4);this.domNode=(0,Y.Z)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=(this._actual.allowEditorOverflow||!1)&&o,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this._fixedOverflowWidgets=n.get(51),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(e.hasChanged(165)){let e=t.get(165);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new ti(null,null);let n=t.model.validatePosition(e);return t.coordinatesConverter.modelPositionIsVisible(n)?new ti(e,t.coordinatesConverter.convertModelPositionToViewPosition(n,i??void 0)):new ti(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){let s=e.top,o=e.top+e.height,r=n.viewportHeight-o,a=e.left;return a+t>n.scrollLeft+n.viewportWidth&&(a=n.scrollLeft+n.viewportWidth-t),a<n.scrollLeft&&(a=n.scrollLeft),{fitsAbove:s>=i,aboveTop:s-i,fitsBelow:r>=i,belowTop:o,left:a}}_layoutHorizontalSegmentInPage(e,t,i,n){let s=Math.max(15,t.left-n),o=Math.min(t.left+t.width+n,e.width-15),r=this._viewDomNode.domNode.ownerDocument.defaultView,a=t.left+i-(r?.scrollX??0);if(a+n>o){let e=a-(o-n);a-=e,i-=e}if(a<s){let e=a-s;a-=e,i-=e}return[i,a]}_layoutBoxInPage(e,t,i,n){let s=e.top-i,o=e.top+e.height,r=w.BK(this._viewDomNode.domNode),a=this._viewDomNode.domNode.ownerDocument,l=a.defaultView,h=r.top+s-(l?.scrollY??0),d=r.top+o-(l?.scrollY??0),c=w.tG(a.body),[u,g]=this._layoutHorizontalSegmentInPage(c,r,e.left-n.scrollLeft+this._contentLeft,t),p=h>=22,m=d+i<=c.height-22;return this._fixedOverflowWidgets?{fitsAbove:p,aboveTop:Math.max(h,22),fitsBelow:m,belowTop:d,left:g}:{fitsAbove:p,aboveTop:s,fitsBelow:m,belowTop:o,left:u}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new tn(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){return{primary:t(this._primaryAnchor.viewPosition,this._affinity),secondary:t(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity)};function t(t,i){if(!t)return null;let n=e.visibleRangeForPosition(t);if(!n)return null;let s=1===t.column&&3===i?0:n.left;return new ts(e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop,s,e.getLineHeightForLineNumber(t.lineNumber))}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;let n=this._context.configuration.options.get(59),s=t.left;return s=s<e.left?Math.max(s,e.left-i+n.typicalFullwidthCharacterWidth):Math.min(s,e.left+i-n.typicalFullwidthCharacterWidth),new ts(e.top,s,e.height)}_prepareRenderWidget(e){let t;if(!this._preference||0===this._preference.length)return null;let{primary:i,secondary:n}=this._getAnchorsCoordinates(e);if(!i)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=to(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeOffsetWidth=e.width,this._cachedDomNodeOffsetHeight=e.height;else{let e=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(e.width),this._cachedDomNodeOffsetHeight=Math.round(e.height)}}let s=this._reduceAnchorCoordinates(i,n,this._cachedDomNodeOffsetWidth);t=this.allowEditorOverflow?this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let e=1;e<=2;e++)for(let i of this._preference)if(1===i){if(!t)return null;if(2===e||t.fitsAbove)return{kind:"inViewport",coordinate:new tn(t.aboveTop,t.left),position:1}}else if(2===i){if(!t)return null;if(2===e||t.fitsBelow)return{kind:"inViewport",coordinate:new tn(t.belowTop,t.left),position:2}}else if(this.allowEditorOverflow)return{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new tn(s.top,s.left)),position:0};else return{kind:"inViewport",coordinate:new tn(s.top,s.left),position:0};return null}onBeforeRender(e){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),"function"==typeof this._actual.afterRender&&to(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?this.domNode.setTop(this._renderData.coordinate.top):this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&to(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}}class ti{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class tn{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class ts{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function to(e,t,...i){try{return e.call(t,...i)}catch{return null}}i(6397);class tr extends X.i{}var ta=i(92108),tl=i(5027),th=i(92740);class td extends tr{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(165);this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ek.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let e of this._selections)t.add(e.positionLineNumber);let i=Array.from(t);i.sort((e,t)=>e-t),I.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);let n=this._selections.every(e=>e.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){let s=this._renderOne(e,!1);for(let e of this._cursorLineNumbers){let o=this._context.viewModel.coordinatesConverter,r=o.convertViewPositionToModelPosition(new ei.y(e,1)).lineNumber,a=o.convertModelPositionToViewPosition(new ei.y(r,1)).lineNumber,l=o.convertModelPositionToViewPosition(new ei.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,h=Math.max(a,t),d=Math.min(l,i);for(let e=h;e<=d;e++)n[e-t]=s}}let s=this._renderOne(e,!0);for(let e of this._cursorLineNumbers)e<t||e>i||(n[e-t]=s);this._renderData=n}render(e,t){if(!this._renderData)return"";let i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class tc extends td{_renderOne(e,t){let i="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(t?" current-line-exact":"");return`<div class="${i}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class tu extends td{_renderOne(e,t){let i="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&t?" current-line-exact-margin":"");return`<div class="${i}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,tl.zy)((e,t)=>{let i=e.getColor(ta.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(ta.Mf)){let i=e.getColor(ta.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,th.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}),i(59461);class tg extends tr{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e];s.options.className&&(i[n++]=s)}i=i.sort((e,t)=>{if(e.options.zIndex<t.options.zIndex)return -1;if(e.options.zIndex>t.options.zIndex)return 1;let i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:en.Q.compareRangesUsingStarts(e.range,t.range)});let s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let e=s;e<=o;e++)r[e-s]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,o=t.length;e<o;e++){let o=t[e];if(!o.options.isWholeLine)continue;let r='<div class="cdr '+o.options.className+'" style="left:0;width:100%;"></div>',a=Math.max(o.range.startLineNumber,n),l=Math.min(o.range.endLineNumber,s);for(let e=a;e<=l;e++){let t=e-n;i[t]+=r}}}_renderNormalDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=null,o=!1,r=null,a=!1;for(let l=0,h=t.length;l<h;l++){let h=t[l];if(h.options.isWholeLine)continue;let d=h.options.className,c=!!h.options.showIfCollapsed,u=h.range;if(c&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new en.Q(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.viewModel.getLineMaxColumn(u.endLineNumber-1))),s===d&&o===c&&en.Q.areIntersectingOrTouching(r,u)){r=en.Q.plusRange(r,u);continue}null!==s&&this._renderNormalDecoration(e,r,s,a,o,n,i),s=d,o=c,r=u,a=h.options.shouldFillLineOnLineBreak??!1}null!==s&&this._renderNormalDecoration(e,r,s,a,o,n,i)}_renderNormalDecoration(e,t,i,n,s,o,r){let a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let e=0,t=a.length;e<t;e++){let t=a[e];if(t.outsideRenderedLine)continue;let l=t.lineNumber-o;if(s&&1===t.ranges.length){let e=t.ranges[0];if(e.width<this._typicalHalfwidthCharacterWidth){let i=Math.max(0,Math.round(Math.round(e.left+e.width/2)-this._typicalHalfwidthCharacterWidth/2));t.ranges[0]=new eY.Y(i,this._typicalHalfwidthCharacterWidth)}}for(let e=0,s=t.ranges.length;e<s;e++){let o=n&&t.continuesOnNextLine&&1===s,a=t.ranges[e],h='<div class="cdr '+i+'" style="left:'+String(a.left)+"px;width:"+(o?"100%;":String(a.width)+"px;")+'"></div>';r[l]+=h}}}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class tp extends J{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(117),r=s.get(83),a=s.get(49),l=s.get(120),h=s.get(158),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,tl.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage,inertialScroll:h};this.scrollbar=this._register(new ex.oO(t.domNode,d,this._context.viewLayout.getScrollable())),ee.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,Y.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(e,t,i)=>{let n={};if(t){let t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){let t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(w.ko(i.domNode,"scroll",e=>c(i.domNode,!0,!0))),this._register(w.ko(t.domNode,"scroll",e=>c(t.domNode,!0,!1))),this._register(w.ko(n.domNode,"scroll",e=>c(n.domNode,!0,!1))),this._register(w.ko(this.scrollbarDomNode.domNode,"scroll",e=>c(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(165);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(81).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(117)||e.hasChanged(83)||e.hasChanged(49)){let e=this._context.configuration.options,t=e.get(117),i=e.get(83),n=e.get(49),s=e.get(120),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,tl.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}i(29393);class tm{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}}class tf{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class t_{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class tv extends tr{_render(e,t,i){let n=[];for(let i=e;i<=t;i++)n[i-e]=new t_;if(0===i.length)return n;i.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1);let s=null,o=0;for(let r=0,a=i.length;r<a;r++){let a=i[r],l=a.className,h=a.zIndex,d=Math.max(a.startLineNumber,e)-e,c=Math.min(a.endLineNumber,t)-e;s===l?(d=Math.max(o+1,d),o=Math.max(o,c)):(s=l,o=c);for(let e=d;e<=o;e++)n[e].add(new tf(l,h,a.tooltip))}return n}}class tb extends J{constructor(e){super(e),this._widgets={},this._context=e;const t=this._context.configuration.options,i=t.get(165);this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=t.get(75),this._glyphMargin=t.get(66),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._lineHeight=t.get(75),this._glyphMargin=t.get(66),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}addWidget(e){let t=(0,Y.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:e.getPosition(),domNode:t,renderInfo:null},t.setPosition("absolute"),t.setDisplay("none"),t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){let i=this._widgets[e.getId()];return!(i.preference.lane===t.lane&&i.preference.zIndex===t.zIndex&&en.Q.equalsRange(i.preference.range,t.range))&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){let t=e.getId();if(this._widgets[t]){let e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(e,t){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let s of e.getDecorationsInViewport()){let e=s.options.glyphMarginClassName;if(!e)continue;let o=Math.max(s.range.startLineNumber,i),r=Math.min(s.range.endLineNumber,n),a=s.options.glyphMargin?.position??er.ZS.Center,l=s.options.zIndex??0;for(let i=o;i<=r;i++){let n=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(i,0)),s=this._context.viewModel.glyphLanes.getLanesAtLine(n.lineNumber).indexOf(a);t.push(new tC(i,s,l,e))}}}_collectWidgetBasedGlyphRenderRequest(e,t){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e of Object.values(this._widgets)){let s=e.preference.range,{startLineNumber:o,endLineNumber:r}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(en.Q.lift(s));if(!o||!r||r<i||o>n)continue;let a=Math.max(o,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(a,0)),h=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new tw(a,h,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((e,t)=>{if(e.lineNumber===t.lineNumber){if(e.laneIndex===t.laneIndex){if(e.zIndex===t.zIndex)return t.type===e.type?0===e.type&&0===t.type?e.className<t.className?-1:1:0:t.type-e.type;return t.zIndex-e.zIndex}return e.laneIndex-t.laneIndex}return e.lineNumber-t.lineNumber}),t}prepareRender(e){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(let e of Object.values(this._widgets))e.renderInfo=null;let t=new I.j3(this._collectSortedGlyphRenderRequests(e)),i=[];for(;t.length>0;){let e=t.peek();if(!e)break;let n=t.takeWhile(t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex);if(!n||0===n.length)break;let s=n[0];if(0===s.type){let e=[];for(let t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;(0===e.length||e[e.length-1]!==t.className)&&e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(let e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let e=this._managedDomNodes.pop();e?.domNode.remove()}return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let i of Object.values(this._widgets))if(i.renderInfo){let n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;i<this._decorationGlyphsToRender.length;i++){let n,s=this._decorationGlyphsToRender[i],o=s.lineNumber,r=e.viewportData.relativeVerticalOffset[o-e.viewportData.startLineNumber],a=this._glyphMarginLeft+s.laneIndex*this._lineHeight;i<this._managedDomNodes.length?n=this._managedDomNodes[i]:(n=(0,Y.Z)(document.createElement("div")),this._managedDomNodes.push(n),this.domNode.appendChild(n));let l=this._context.viewLayout.getLineHeightForLineNumber(o);n.setClassName("cgmr codicon "+s.combinedClassName),n.setPosition("absolute"),n.setTop(r),n.setLeft(a),n.setWidth(t),n.setHeight(l)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){let e=this._managedDomNodes.pop();e?.domNode.remove()}}}class tC{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new ty(this.lineNumber,this.laneIndex,e)}}class tw{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class ty{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}i(93477);var tS=i(24244),tk=i(40365),tx=i(89984);class tL extends tr{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(166),n=t.get(59);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(166),n=t.get(59);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();return!this._primaryPosition?.equals(t)&&(this._primaryPosition=t,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,s=this._primaryPosition,o=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),s),r=[];for(let s=t;s<=i;s++){let i=s-t,a=o[i],l="",h=e.visibleRangeForPosition(new ei.y(s,1))?.left??0;for(let t of a){let i=-1===t.column?h+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ei.y(s,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;let o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(e.visibleRangeForPosition(new ei.y(s,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`<div class="core-guide ${t.className} ${o}" style="left:${i}px;width:${r}px"></div>`}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){let n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?tx.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?tx.N6.EnabledForActive:tx.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){let n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}let{indentSize:l}=this._context.viewModel.model.getOptions(),h=[];for(let i=e;i<=t;i++){let t=[];h.push(t);let d=n?n[i-e]:[],c=new I.j3(d),u=s?s[i-e]:0;for(let e=1;e<=u;e++){let n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===d.length)&&o<=i&&i<=r&&e===a;t.push(...c.takeWhile(e=>e.visibleColumn<n)||[]);let h=c.peek();(!h||h.visibleColumn!==n||h.horizontalLine)&&t.push(new tx.TH(n,-1,`core-guide-indent lvl-${(e-1)%30}`+(s?" indent-active":""),null,-1,-1))}t.push(...c.takeWhile(e=>!0)||[])}return h}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function tD(e){if(!(e&&e.isTransparent()))return e}(0,tl.zy)((e,t)=>{let i=[{bracketColor:ta.sN,guideColor:ta.n4,guideColorActive:ta.bB},{bracketColor:ta.lQ,guideColor:ta.I2,guideColorActive:ta.WS},{bracketColor:ta.ss,guideColor:ta.Bo,guideColorActive:ta.Pe},{bracketColor:ta.l5,guideColor:ta.If,guideColorActive:ta.WD},{bracketColor:ta.sH,guideColor:ta.BD,guideColorActive:ta.P1},{bracketColor:ta.zp,guideColor:ta.IW,guideColorActive:ta.WY}],n=new tk.k,s=[{indentColor:ta.vV,indentColorActive:ta.H0},{indentColor:ta.ob,indentColorActive:ta.Am},{indentColor:ta.hz,indentColorActive:ta.tK},{indentColor:ta.ow,indentColorActive:ta.A3},{indentColor:ta.vP,indentColorActive:ta.tp},{indentColor:ta.CM,indentColorActive:ta.As}],o=i.map(t=>{let i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),o=tD(tD(n)??i?.transparent(.3)),r=tD(tD(s)??i);if(o&&r)return{guideColor:o,guideColorActive:r}}).filter(tS.O9),r=s.map(t=>{let i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=tD(i),o=tD(n);if(s&&o)return{indentColor:s,indentColorActive:o}}).filter(tS.O9);if(o.length>0){for(let e=0;e<30;e++){let i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){let i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}),i(23353);class tI extends tr{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ei.y(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(75);let t=e.get(76);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(109);let i=e.get(165);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,i=!0),(2===this._renderLineNumbers||3===this._renderLineNumbers)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(e,1));if(1!==t.column)return"";let i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){let e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0||i===this._context.viewModel.getLineCount()?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers){this._renderResult=null;return}let t=E.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(e=>!!e.options.lineNumberClassName);s.sort((e,t)=>en.Q.compareRangesUsingEnds(e.range,t.range));let o=0,r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){let n=e-i,l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(e,1)).lineNumber,h=this._getLineRenderLineNumber(e),d="";for(;o<s.length&&s[o].range.endLineNumber<e;)o++;for(let t=o;t<s.length;t++){let{range:i,options:n}=s[t];i.startLineNumber<=e&&(d+=" "+n.lineNumberClassName)}if(!h&&!d){a[n]="";continue}e===r&&0===this._context.viewModel.getLineLength(e)&&("off"===this._renderFinalNewline&&(h=""),"dimmed"===this._renderFinalNewline&&(d+=" dimmed-line-number")),l===this._activeModelLineNumber&&(d+=" active-line-number"),a[n]=`<div class="${tI.CLASS_NAME}${t}${d}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${h}</div>`}this._renderResult=a}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,tl.zy)((e,t)=>{let i=e.getColor(ta.Qt),n=e.getColor(ta.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}),i(32768);let tN="monaco-mouse-cursor-text";i(90289);class tE{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class tM{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(59);this.renderWhitespace=i.get(113),this.experimentalWhitespaceRendering=i.get(47),this.renderControlCharacters=i.get(108),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(40),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(75),this.stopRenderingLineAfter=i.get(133),this.fontLigatures=i.get(60),this.verticalScrollbarSize=i.get(117).verticalScrollbarSize,this.useGpu="on"===i.get(46)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.experimentalWhitespaceRendering===e.experimentalWhitespaceRendering&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.useGpu===e.useGpu}}class tT{constructor(){this._currentVisibleRange=new en.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class tR{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class tO{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e<i;e++){const i=t[e];o=Math.min(o,i.startLineNumber),r=Math.max(r,i.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=r}}class tP extends J{static{this.HORIZONTAL_EXTRA_PX=30}constructor(e,t,i){super(e);const n=this._context.configuration,s=this._context.configuration.options,o=s.get(59),r=s.get(166);this._lineHeight=s.get(75),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=s.get(114),this._cursorSurroundingLines=s.get(35),this._cursorSurroundingLinesStyle=s.get(36),this._canUseLayerHinting=!s.get(39),this._viewLineOptions=new tM(n,this._context.theme.type),this._linesContent=i,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new e2(this._context,{createLine:()=>new et.G(t,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,ee.write(this.domNode,8),this.domNode.setClassName(`view-lines ${tN}`),(0,L.M)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new eF.uC(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new eF.uC(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new tT,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(131).enabled,this._maxNumberStickyLines=s.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(166)&&(this._maxLineWidth=0);let t=this._context.configuration.options,i=t.get(59),n=t.get(166);return this._lineHeight=t.get(75),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(114),this._cursorSurroundingLines=t.get(35),this._cursorSurroundingLinesStyle=t.get(36),this._canUseLayerHinting=!t.get(39),this._stickyScrollEnabled=t.get(131).enabled,this._maxNumberStickyLines=t.get(131).maxLineCount,(0,L.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=new tM(this._context.configuration,this._context.theme.type);if(!this._viewLineOptions.equals(e)){this._viewLineOptions=e;let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let e=t;e<=i;e++)this._visibleLines.getVisibleLine(e).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e,this._viewLineOptions.useGpu);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new tR(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new tO(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let i=this._getViewLineDomNode(e);if(null===i)return null;let n=this._getLineNumberFor(i);if(-1===n||n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new ei.y(n,1);let s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<s||n>o)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t),a=this._context.viewModel.getLineMinColumn(n);return r<a&&(r=a),new ei.y(n,r)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===et.G.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return -1}getLineWidth(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();if(e<t||e>i)return -1;let n=new tE(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let i=e.endLineNumber,n=en.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],o=0,r=new tE(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(n.startLineNumber,1)).lineNumber);let l=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>h)continue;let d=e===n.startLineNumber?n.startColumn:1,c=e!==i,u=c?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,u,r);if(g){if(t&&e<i){let t=a;if(t!==(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(e+1,1)).lineNumber)){let e=g.ranges[g.ranges.length-1];e.width+=this._typicalHalfwidthCharacterWidth,this._context.viewModel.getTextDirection(t)===er.z4.RTL&&(e.left-=this._typicalHalfwidthCharacterWidth)}}s[o++]=new eY.BG(g.outsideRenderedLine,e,eY.Y.from(g.ranges),c)}}return(this._updateLineWidthsSlowIfDomDidLayout(r),0===o)?null:s}_visibleRangesForLineRange(e,t,i){if(this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())return null;let n=new tE(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}_lineIsRenderedRTL(e){return!(e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())&&this._visibleLines.getVisibleLine(e).isRenderedRTL()}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new eY.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){!e.didDomLayout||this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow())}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=1,s=!0;for(let o=t;o<=i;o++){let t=this._visibleLines.getVisibleLine(o);if(e&&!t.getWidthIsFast()){s=!1;continue}n=Math.max(n,t.getWidth(null))}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1,i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){let i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){let n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw Error("Not supported")}render(){throw Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||e.hasRTL||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),E.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,s,o){let r,a,l,h,d=e.top,c=e.height,u=d+c;if(s&&s.length>0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;i<n;i++){let n=s[i];e=Math.min(e,n.startLineNumber),t=Math.max(t,n.endLineNumber)}r=!1,a=this._context.viewLayout.getVerticalOffsetForLineNumber(e),l=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return -1;r=!0,a=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),l=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}let g=("mouse"===t||i)&&"default"===this._cursorSurroundingLinesStyle,p=0,m=0;if(g)i||(p=this._lineHeight);else{let e=Math.min(c/this._lineHeight/2,Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0));p=e*this._lineHeight,m=Math.max(0,e-1)*this._lineHeight}if(i||0!==o&&4!==o||(m+=this._lineHeight),a-=p,(l+=m)-a>c){if(!r)return -1;h=a}else if(5===o||6===o)if(6===o&&d<=a&&l<=u)h=d;else{let e=a-Math.max(5*this._lineHeight,.2*c);h=Math.max(l-c,e)}else h=1===o||2===o?2===o&&d<=a&&l<=u?d:Math.max(0,(a+l)/2-c/2):this._computeMinimumScrolling(d,u,a,l,3===o,4===o);return h}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(165),n=t.left,s=n+t.width-i.verticalScrollbarWidth,o=0x40000000,r=0,a=!1;if("range"===e.type){a=this._lineIsRenderedRTL(e.lineNumber);let t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(let e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(let t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;let e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(a||=this._lineIsRenderedRTL(t.startLineNumber),!e)return null;for(let t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return(e.minimalReveal||(o=Math.max(0,o-tP.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width)?null:{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r,hasRTL:a}}_computeMinimumScrolling(e,t,i,n,s,o){e|=0,t|=0,i|=0,n|=0,s=!!s,o=!!o;let r=t-e;return!(n-i<r)||s?i:o?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e}}i(27895);class tA extends tv{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(165);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e],o=s.options.linesDecorationsClassName,r=s.options.zIndex;o&&(i[n++]=new tm(s.range.startLineNumber,s.range.endLineNumber,o,s.options.linesDecorationsTooltip??null,r));let a=s.options.firstLineDecorationClassName;a&&(i[n++]=new tm(s.range.startLineNumber,s.range.startLineNumber,a,s.options.linesDecorationsTooltip??null,r))}return i}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',o=[];for(let e=t;e<=i;e++){let i=e-t,r=n[i].getDecorations(),a="";for(let e of r){let t='<div class="cldr '+e.className;null!==e.tooltip&&(t+='" title="'+e.tooltip),t+=s,a+=t}o[i]=a}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i(36527);class tF extends J{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setClassName(tF.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,Y.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(tF.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}i(96025);class tB extends tv{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e],o=s.options.marginClassName,r=s.options.zIndex;o&&(i[n++]=new tm(s.range.startLineNumber,s.range.endLineNumber,o,null,r))}return i}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=[];for(let e=t;e<=i;e++){let i=e-t,o=n[i].getDecorations(),r="";for(let e of o)r+='<div class="cmdr '+e.className+'" style=""></div>';s[i]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i(6469);var tW=i(1979);class tH{static{this.Empty=new tH(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=tH._clamp(e),this.g=tH._clamp(t),this.b=tH._clamp(i),this.a=tH._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}var tV=i(39894);class tz extends k.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.lC)(new tz)),this._INSTANCE}constructor(){super(),this._onDidChange=new S.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(tV.dG.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=tV.dG.getColorMap();if(!e){this._colors=[tH.Empty],this._backgroundIsLight=!0;return}this._colors=[tH.Empty];for(let t=1;t<e.length;t++){let i=e[t].rgba;this._colors[t]=new tH(i.r,i.g,i.b,Math.round(255*i.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var tU=i(11671);let tj=(()=>{let e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var t$=i(78355);class tK{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=tK.soften(e,.8),this.charDataLight=tK.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=(0,t$.W)(e[n]*t);return i}renderChar(e,t,i,n,s,o,r,a,l,h,d){var c,u;let g=+this.scale,p=2*this.scale,m=d?1:p;if(t+g>e.width||i+m>e.height)return void console.warn("bad render request outside image data");let f=h?this.charDataLight:this.charDataNormal,_=(c=n,u=l,(c-=32)<0||c>96?u<=2?(c+96)%96:95:c),v=4*e.width,b=r.r,C=r.g,w=r.b,y=s.r-b,S=s.g-C,k=s.b-w,x=Math.max(o,a),L=e.data,D=_*g*p,I=i*v+4*t;for(let e=0;e<m;e++){let e=I;for(let t=0;t<g;t++){let t=f[D++]/255*(o/255);L[e++]=b+y*t,L[e++]=C+S*t,L[e++]=w+k*t,L[e++]=x}I+=v}}blockRenderChar(e,t,i,n,s,o,r,a){let l=+this.scale,h=2*this.scale,d=a?1:h;if(t+l>e.width||i+d>e.height)return void console.warn("bad render request outside image data");let c=4*e.width,u=s/255*.5,g=o.r,p=o.g,m=o.b,f=n.r-g,_=n.g-p,v=n.b-m,b=g+f*u,C=p+_*u,w=m+v*u,y=Math.max(s,r),S=e.data,k=i*c+4*t;for(let e=0;e<d;e++){let e=k;for(let t=0;t<l;t++)S[e++]=b,S[e++]=C,S[e++]=w,S[e++]=y;k+=c}}}var tG=i(67418);let tq={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},tQ=e=>{let t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=tq[e[i]]<<4|15&tq[e[i+1]];return t},tY={1:(0,tG.P)(()=>tQ("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,tG.P)(()=>tQ("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class tZ{static create(e,t){let i;return this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily?this.lastCreated:(i=tY[e]?new tK(tY[e](),e):tZ.createFromSampleData(tZ.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i)}static createSampleData(e){let t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(let e of tj)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw Error("Unexpected source in MinimapCharRenderer");return new tK(tZ._downsample(e,t),t)}static _downsampleChar(e,t,i,n,s){let o=+s,r=2*s,a=n,l=0;for(let n=0;n<r;n++){let s=n/r*16,h=(n+1)/r*16;for(let n=0;n<o;n++){let r=n/o*10,d=(n+1)/o*10,c=0,u=0;for(let i=s;i<h;i++){let n=t+3840*Math.floor(i),s=1-(i-Math.floor(i));for(let t=r;t<d;t++){let i=1-(t-Math.floor(t)),o=n+4*Math.floor(t),r=i*s;u+=r,c+=e[o]*e[o+3]/255*r}}let g=c/u;l=Math.max(l,g),i[a++]=(0,t$.W)(g)}}return l}static _downsample(e,t){let i=2*t*1*t,n=96*i,s=new Uint8ClampedArray(n),o=0,r=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,r,s,o,t)),o+=i,r+=40;if(a>0){let e=255/a;for(let t=0;t<n;t++)s[t]*=e}return s}}var tX=i(35683);let tJ=E.uF?'"Segoe WPC", "Segoe UI", sans-serif':E.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif';var t0=i(56636);class t1{constructor(e,t,i){const n=e.options,s=n.get(163),o=n.get(165),r=o.minimap,a=n.get(59),l=n.get(81);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(119),this.paddingTop=n.get(96).top,this.paddingBottom=n.get(96).bottom,this.showSlider=l.showSlider,this.autohide=l.autohide,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(75),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=o.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=+this.fontScale,this.sectionHeaderFontFamily=tJ,this.sectionHeaderFontSize=l.sectionHeaderFontSize*s,this.sectionHeaderLetterSpacing=l.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=t1._getSectionHeaderColor(t,i.getColor(1)),this.charRenderer=(0,tG.P)(()=>tZ.create(this.fontScale,a.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=t1._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=t1._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let i=e.getColor(tU.ILr);return i?new tH(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(tU.K1Z);return t?tH._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){let i=e.getColor(tU.By2);return i?new tH(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class t2{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,h,d){let c,u,g=e.pixelRatio,p=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/p),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));let i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(h-s),d=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new t2(l,h,n>0,o,l*o,i,Math.floor(e.paddingTop/e.lineHeight),1,Math.min(r,d))}c=o&&i!==r?Math.floor((i-t+1)*p/g):Math.floor(s/f*p/g);let _=Math.floor(e.paddingTop/f),v=Math.floor(e.paddingBottom/f);e.scrollBeyondLastLine&&(v=Math.max(v,s/f-1)),u=v>0?(_+r+v-s/f-1)*p/g:Math.max(0,(_+r)*p/g-c);let b=(u=Math.min(e.minimapHeight-c,u))/(h-s),C=l*b;if(m>=_+r+v)return new t2(l,h,u>0,b,C,c,_,1,r);{let i,s,o=Math.max(1,Math.floor((t>1?t+_:Math.max(1,l/f))-C*g/p));o<_?(i=_-o+1,o=1):(i=0,o=Math.max(1,o-_)),d&&d.scrollHeight===h&&(d.scrollTop>l&&(o=Math.min(o,d.startLineNumber),i=Math.max(i,d.topPaddingLineCount)),d.scrollTop<l&&(o=Math.max(o,d.startLineNumber),i=Math.min(i,d.topPaddingLineCount)));let a=Math.min(r,o-i+m-1),u=(l-n)/f;return s=l>=e.paddingTop?(t-o+i+u)*p/g:l/e.paddingTop*(i+u)*p/g,new t2(l,h,!0,b,s,c,i,o,a)}}}class t5{static{this.INVALID=new t5(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class t4{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new e1({createLine:()=>t5.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;let t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){let e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class t3{constructor(e,t,i,n){this._backgroundFillData=t3._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;let e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){let n=i.r,s=i.g,o=i.b,r=i.a,a=new Uint8ClampedArray(e*t*4),l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=s,a[l+2]=o,a[l+3]=r,l+=4;return a}}class t7{static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];let{minimapLineCount:n}=B.xZ.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),s=t/n,o=s/2;if(!i||0===i.minimapLines.length){let e=[];if(e[0]=1,n>1){for(let t=0,i=n-1;t<i;t++)e[t]=Math.round(t*s+o);e[n-1]=t}return[new t7(s,e),[]]}let r=i.minimapLines,a=r.length,l=[],h=0,d=0,c=1,u=[],g=null;for(let e=0;e<n;e++){let i,p=Math.max(c,Math.round(e*s)),m=Math.max(p,Math.round((e+1)*s));for(;h<a&&r[h]<p;){if(u.length<10){let e=h+1+d;g&&"deleted"===g.type&&g._oldIndex===h-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:h,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),d--}h++}if(h<a&&r[h]<=m)i=r[h],h++;else if(i=0===e?1:e+1===n?t:Math.round(e*s+o),u.length<10){let t=h+1+d;g&&"inserted"===g.type&&g._i===e-1?g.insertToLineNumber++:(g={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},u.push(g)),d++}l[e]=i,c=i}if(u.length<10)for(;h<a;){let e=h+1+d;g&&"deleted"===g.type&&g._oldIndex===h-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:h,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),d--,h++}else u=[{type:"flush"}];return[new t7(s,l),u]}constructor(e,t){this.samplingRatio=e,this.minimapLines=t}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){let n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]<e.fromLineNumber);s--)this.minimapLines[s]<=e.toLineNumber?(this.minimapLines[s]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,s),n=Math.max(n,s)):this.minimapLines[s]-=t;return[i,n]}onLinesInserted(e){let t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class t9 extends J{constructor(e){super(e),this._sectionHeaderCache=new tX.qK(10,1.5),this.tokensColorTracker=tz.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new t1(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=t7.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new t8(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){let e=new t1(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(!this._samplingState)return this._actual.onLinesChanged(e.fromLineNumber,e.count);{let t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return!!t&&this._actual.onLinesChanged(t[0],t[1]-t[0]+1)}}onLinesDeleted(e){if(!this._samplingState)return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber);{let[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i-t+1),this._shouldCheckSampling=!0,!0}}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged(e)}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(!this._samplingState)return this._actual.onTokensChanged(e.ranges);{let t=[];for(let i of e.ranges){let e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));let n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,i]=t7.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,o=t-e+1;s<o;s++)i[s]?n[s]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+s-1]):n[s]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState)for(let e of(this._minimapSelections=[],this._selections)){let[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new ek.L(t,e.startColumn,i,e.endColumn))}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){return this._getMinimapDecorationsInViewport(e,t).filter(e=>!e.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(e,t){let i=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return e=Math.floor(Math.max(1,e-i)),this._getMinimapDecorationsInViewport(e,t).filter(e=>!!e.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){let n=this._samplingState.minimapLines[e-1],s=this._samplingState.minimapLines[t-1];i=new en.Q(n,1,s,this._context.viewModel.getLineMaxColumn(s))}else i=new en.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));let n=this._context.viewModel.getMinimapDecorationsInRange(i);if(this._samplingState){let e=[];for(let t of n){if(!t.options.minimap)continue;let i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),s=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new t0.vo(new en.Q(n,i.startColumn,s,i.endColumn),t.options))}return e}return n}getSectionHeaderText(e,t){let i=e.options.minimap?.sectionHeaderText;if(!i)return null;let n=this._sectionHeaderCache.get(i);if(n)return n;let s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new en.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class t8 extends k.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(tU.yr0),this._domNode=(0,Y.Z)(document.createElement("div")),ee.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,Y.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,Y.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,Y.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,Y.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,Y.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new eF.uC(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register(w.un(this._domNode.domNode,w.Bx.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register(w.un(this._domNode.domNode,w.Bx.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=w.un(this._domNode.domNode,w.Bx.POINTER_DOWN,e=>{e.preventDefault();let t="mouse"===e.pointerType,i=0===e.button;if(0!==this._model.options.renderMinimap&&this._lastRenderData){if("proportional"!==this._model.options.size){if(i&&this._lastRenderData){let t=w.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}if(i||!t){let t=this._model.options.minimapLineHeight,i=Math.floor(this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;i=Math.min(i,this._model.getLineCount()),this._model.revealLineNumber(i)}}}),this._sliderPointerMoveMonitor=new tW._,this._sliderPointerDownListener=w.un(this._slider.domNode,w.Bx.POINTER_DOWN,e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ew.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=w.ko(this._domNode.domNode,ew.B.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=w.ko(this._domNode.domNode,ew.B.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=w.un(this._domNode.domNode,ew.B.End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){this._isMouseOverMinimap?this._hideSoon():this._domNode.toggleClassName("active",!1)}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;let n=e.pageX;this._slider.toggleClassName("active",!0);let s=(e,s)=>{let o=w.BK(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));E.uF&&r>140?this._model.setScrollTop(i.scrollTop):this._model.setScrollTop(i.getDesiredScrollTopFromDelta(e-t))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>s(e.pageY,e.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),"mouseover"===this._model.options.autohide?e.push("minimap-autohide-mouseover"):"scroll"===this._model.options.autohide&&e.push("minimap-autohide-scroll"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return!this._buffers&&this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new t3(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(e){return"scroll"===this._model.options.autohide&&(e.scrollTopChanged||e.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(tU.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let t=t2.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(en.Q.compareRangesUsingStarts);let i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0));let{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);let h=new t6(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,h,e,o),this._renderDecorationsLineHighlights(l,i,h,e,o);let d=new t6(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(let a of t){let t=n.intersectWithViewport(a);if(!t)continue;let[l,h]=t;for(let e=l;e<=h;e++)i.set(e,!0);let d=n.getYForLineNumber(l,s),c=n.getYForLineNumber(h,s);r>=d||(r>o&&e.fillRect(B.xq,o,e.canvas.width,r-o),o=d),r=c}r>o&&e.fillRect(B.xq,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){let o=new Map;for(let r=t.length-1;r>=0;r--){let a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;let h=n.intersectWithViewport(a.range);if(!h)continue;let[d,c]=h,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=c;t++){if(i.has(t))continue;i.set(t,!0);let o=n.getYForLineNumber(d,s);e.fillRect(B.xq,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let l of t){let t=n.intersectWithViewport(l);if(!t)continue;let[h,d]=t;for(let t=h;t<=d;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(let l of t){let t=l.options.minimap;if(!t)continue;let h=n.intersectWithViewport(l.range);if(!h)continue;let[d,c]=h,u=t.getColor(this._theme.value);if(!(!u||u.isTransparent()))for(let h=d;h<=c;h++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,u,n,h,s,s,o,r,a);continue;case 2:{let t=n.getYForLineNumber(h,s);this.renderDecoration(e,u,2,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,h,d){let c=s.getYForLineNumber(o,a);if(c+r<0||c>this._model.options.canvasInnerHeight)return;let{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,m=g===o?i.endColumn:this._model.getLineMaxColumn(o),f=this.getXOffsetForPosition(t,o,p,l,h,d),_=this.getXOffsetForPosition(t,o,m,l,h,d);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return B.xq;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){let i=this._model.getLineContent(t);r=[B.xq];let a=B.xq;for(let e=1;e<i.length+1;e++){let t=i.charCodeAt(e-1),l=a+(9===t?n*s:eB.ne(t)?2*s:s);if(l>=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1<r.length?r[i-1]:o}renderDecoration(e,t,i,n,s,o){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,s,o)}_renderSectionHeaders(e){let t=this._model.options.minimapLineHeight,i=this._model.options.sectionHeaderFontSize,n=this._model.options.sectionHeaderLetterSpacing,s=1.5*i,{canvasInnerWidth:o}=this._model.options,r=this._model.options.backgroundColor,a=`rgb(${r.r} ${r.g} ${r.b} / .7)`,l=this._model.options.sectionHeaderFontColor,h=`rgb(${l.r} ${l.g} ${l.b})`,d=this._decorationsCanvas.domNode.getContext("2d");d.letterSpacing=n+"px",d.font="500 "+i+"px "+this._model.options.sectionHeaderFontFamily,d.strokeStyle=h,d.lineWidth=.4;let c=this._model.getSectionHeaderDecorationsInViewport(e.startLineNumber,e.endLineNumber);c.sort((e,t)=>e.range.startLineNumber-t.range.startLineNumber);let u=t8._fitSectionHeader.bind(null,d,o-B.xq);for(let n of c){let r=e.getYForLineNumber(n.range.startLineNumber,t)+i,l=r-i,c=l+2,g=this._model.getSectionHeaderText(n,u);t8._renderSectionLabel(d,g,n.options.minimap?.sectionHeaderStyle===2,a,h,o,l,s,r,c)}}static _fitSectionHeader(e,t,i){if(!i)return i;let n=e.measureText(i).width,s=e.measureText("…").width;if(n<=t||n<=s)return i;let o=i.length,r=Math.floor((t-s)/(n/i.length))-1,a=Math.ceil(r/2);for(;a>0&&/\s/.test(i[a-1]);)--a;return i.substring(0,a)+"…"+i.substring(o-(r-a))}static _renderSectionLabel(e,t,i,n,s,o,r,a,l,h){t&&(e.fillStyle=n,e.fillRect(0,r,o,a),e.fillStyle=s,e.fillText(t,B.xq,l)),i&&(e.beginPath(),e.moveTo(0,h),e.lineTo(o,h),e.closePath(),e.stroke())}renderLines(e){let t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){let t=this._lastRenderData._get();return new t4(e,t.imageData,t.lines)}let s=this._getBuffer();if(!s)return null;let[o,r,a]=t8._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),h=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,c=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,C=n>b?Math.floor((n-b)/2):0,w=c.a/255,y=new tH(Math.round((c.r-d.r)*w+d.r),Math.round((c.g-d.g)*w+d.g),Math.round((c.b-d.b)*w+d.b),255),S=e.topPaddingLineCount*n,k=[];for(let e=0,o=i-t+1;e<o;e++)a[e]&&t8._renderLine(s,y,c.a,p,m,v,g,u,f,S,C,h,l[e],_,n),k[e]=new t5(S),S+=n;let x=-1===o?0:o,L=-1===r?s.height:r;return this._canvas.domNode.getContext("2d").putImageData(s,0,0,0,x,s.width,L-x),new t4(e,s,k)}static _renderUntouchedLines(e,t,i,n,s,o){let r=[];if(!o){for(let e=0,t=n-i+1;e<t;e++)r[e]=!0;return[-1,-1,r]}let a=o._get(),l=a.imageData.data,h=a.rendLineNumberStart,d=a.lines,c=d.length,u=e.width,g=e.data,p=(n-i+1)*s*u*4,m=-1,f=-1,_=-1,v=-1,b=-1,C=-1,w=t*s;for(let e=i;e<=n;e++){let t=e-i,n=e-h,o=n>=0&&n<c?d[n].dy:-1;if(-1===o){r[t]=!0,w+=s;continue}let a=o*u*4,y=(o+s)*u*4,S=w*u*4,k=(w+s)*u*4;v===a&&C===S?v=y:(-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),_=a,v=y,b=S),C=k,r[t]=!1,w+=s}return -1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),[-1===m?-1:m/(4*u),-1===f?-1:f/(4*u),r]}static _renderLine(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){let m=u.content,f=u.tokens,_=e.width-o,v=1===p,b=B.xq,C=0,w=0;for(let u=0,p=f.getCount();u<p;u++){let p=f.getEndOffset(u),y=f.getForeground(u),S=r.getColor(y);for(;C<p;C++){if(b>_)return;let r=m.charCodeAt(C);if(9===r){let e=c-(C+w)%c;w+=e-1,b+=e*o}else if(32===r)b+=o;else{let c=eB.ne(r)?2:1;for(let u=0;u<c;u++)if(2===s?l.blockRenderChar(e,b,h+d,S,a,t,i,v):l.renderChar(e,b,h+d,r,S,a,t,i,g,n,v),(b+=o)>_)return}}}}}class t6{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}i(72273);class ie extends J{constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,Y.Z)(document.createElement("div")),ee.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,Y.Z)(document.createElement("div")),ee.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}_widgetCanOverflow(e){let t=this._context.configuration.options.get(4);return(e.allowEditorOverflow||!1)&&t}addWidget(e){let t=(0,Y.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._widgetCanOverflow(e)?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOridinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0,t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){let n=t[i],s=this._widgets[n],o=s.widget.getMinContentWidthInPx?.();void 0!==o&&(e=Math.max(e,o))}this._context.viewLayout.setOverlayWidgetsMinWidth(e)}_renderWidget(e,t){let i=e.domNode;if(null===e.preference)return void i.setTop("");let n=2*this._verticalScrollbarWidth+this._minimapWidth;if(0===e.preference||1===e.preference){if(1===e.preference){let e=i.domNode.clientHeight;i.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight)}else i.setTop(0);void 0!==e.stack?(i.setTop(t[e.preference]),t[e.preference]+=i.domNode.clientWidth):i.setRight(n)}else if(2===e.preference)i.domNode.style.right="50%",void 0!==e.stack?(i.setTop(t[2]),t[2]+=i.domNode.clientHeight):i.setTop(0);else{let{top:t,left:n}=e.preference;if(this._context.configuration.options.get(51)&&this._widgetCanOverflow(e.widget)){let e=this._viewDomNodeRect;i.setTop(t+e.top),i.setLeft(n+e.left),i.setPosition("fixed")}else i.setTop(t),i.setLeft(n),i.setPosition("absolute")}}prepareRender(e){this._viewDomNodeRect=w.BK(this._viewDomNode.domNode)}render(e){this._domNode.setWidth(this._editorWidth);let t=Object.keys(this._widgets),i=Array.from({length:3},()=>0);t.sort((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0));for(let e=0,n=t.length;e<n;e++){let n=t[e];this._renderWidget(this._widgets[n],i)}}}var it=i(30430),ii=i(10007);class is{constructor(e,t){const i=e.options;this.lineHeight=i.get(75),this.pixelRatio=i.get(163),this.overviewRulerLanes=i.get(95),this.renderBorder=i.get(94);const n=t.getColor(ta.x9);this.borderColor=n?n.toString():null,this.hideCursor=i.get(68);const s=t.getColor(ta.D0);this.cursorColorSingle=s?s.transparent(.7).toString():null;const o=t.getColor(ta.sC);this.cursorColorPrimary=o?o.transparent(.7).toString():null;const r=t.getColor(ta.we);this.cursorColorSecondary=r?r.transparent(.7).toString():null,this.themeType=t.type;const a=i.get(81),l=a.enabled,h=a.side,d=t.getColor(ta.Xr),c=tV.dG.getDefaultBackground();d?this.backgroundColor=d:l&&"right"===h?this.backgroundColor=c:this.backgroundColor=null;const u=i.get(165).overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[g,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=g,this.w=p}_initLanes(e,t,i){let n=t-e;if(i>=3){let t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2!==i)return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]];{let t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&it.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class io extends J{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,Y.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=tV.dG.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new ei.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new is(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++){let n=this._settings.cursorColorSingle;i>1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort((e,t)=>ei.y.compare(e.position,t.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){let e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes){this._domNode.setBackgroundColor(e?it.Q1.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}let t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(ii.Uv.compareByRenderingProps),1!==this._actualShouldRender||ii.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,I.aI)(this._renderedCursorPositions,this._cursorPositions,(e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color)||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,h=this._domNode.domNode.getContext("2d");e?(e.isOpaque()||h.clearRect(0,0,i,n),h.fillStyle=it.Q1.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):h.clearRect(0,0,i,n);let d=this._settings.x,c=this._settings.w;for(let e of t){let t=e.color,i=e.data;h.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;e<t;e++){let t=i[3*e],m=i[3*e+1],f=i[3*e+2],_=o.getVerticalOffsetForLineNumber(m)*r|0,v=(o.getVerticalOffsetForLineNumber(f)+s)*r|0;if(v-_<a){let e=(_+v)/2|0;e<l?e=l:e+l>n&&(e=n-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&h.fillRect(d[u],g,c[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}h.fillRect(d[u],g,c[u],p-g)}if(!this._settings.hideCursor){let e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7],a=-100,l=-100,d=null;for(let c=0,u=this._cursorPositions.length;c<u;c++){let u=this._cursorPositions[c].color;if(!u)continue;let g=this._cursorPositions[c].position,p=o.getVerticalOffsetForLineNumber(g.lineNumber)*r|0;p<t?p=t:p+t>n&&(p=n-t);let m=p-t,f=m+e;m>l+1||u!==d?(0!==c&&d&&h.fillRect(i,a,s,l-a),a=m,l=f):f>l&&(l=f),d=u,h.fillStyle=u}d&&h.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,n),h.moveTo(1,0),h.lineTo(i,0),h.stroke())}}var ir=i(78624);class ia extends X.i{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,Y.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new ir.rW(e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(75)),this._zoneManager.setPixelRatio(i.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(75)&&(this._zoneManager.setLineHeight(t.get(75)),this._render()),e.hasChanged(163)&&(this._zoneManager.setPixelRatio(t.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(let a of t){let t=a.colorId,l=a.from,h=a.to;t!==s?(e.fillRect(0,o,n,r-o),e.fillStyle=i[s=t],o=l,r=h):r>=l?r=Math.max(r,h):(e.fillRect(0,o,n,r-o),o=l,r=h)}e.fillRect(0,o,n,r-o)}}i(41949);class il extends J{constructor(e){super(e),this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){let{tabSize:i}=this._context.viewModel.model.getOptions(),n=t-e;for(;n>0;){let e=(0,Y.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(i),this.domNode.appendChild(e),this._renderedRulers.push(e),n--}return}let i=e-t;for(;i>0;){let e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){let i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}i(36693);class ih extends J{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(117);this._useShadows=t.useShadows,this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){let e=this._context.configuration.options.get(165);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){let t=this._context.configuration.options.get(117);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}i(48186);class id{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class ic{constructor(e,t){this.lineNumber=e,this.ranges=t}}function iu(e){return new id(e)}function ig(e){return new ic(e.lineNumber,e.ranges.map(iu))}class ip extends tr{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){let n=this._typicalHalfwidthCharacterWidth/4,s=null,o=null;if(i&&i.length>0&&t.length>0){let n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e<i.length;e++)i[e].lineNumber===n&&(s=i[e].ranges[0]);let r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!o&&e>=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let e=0,i=t.length;e<i;e++){let r=t[e].ranges[0],a=r.left,l=r.left+r.width,h={top:0,bottom:0},d={top:0,bottom:0};if(e>0){let i=t[e-1].ranges[0].left,s=t[e-1].ranges[0].left+t[e-1].ranges[0].width;im(a-i)<n?h.top=2:a>i&&(h.top=1),im(l-s)<n?d.top=2:i<l&&l<s&&(d.top=1)}else s&&(h.top=s.startStyle.top,d.top=s.endStyle.top);if(e+1<i){let i=t[e+1].ranges[0].left,s=t[e+1].ranges[0].left+t[e+1].ranges[0].width;im(a-i)<n?h.bottom=2:i<a&&a<s&&(h.bottom=1),im(l-s)<n?d.bottom=2:l<s&&(d.bottom=1)}else o&&(h.bottom=o.startStyle.bottom,d.bottom=o.endStyle.bottom);r.startStyle=h,r.endStyle=d}}_getVisibleRangesWithStyle(e,t,i){let n=(t.linesVisibleRangesForRange(e,!0)||[]).map(ig);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,s){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;bottom:"+t.toString()+"px;left:"+n.toString()+"px;width:"+s.toString()+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;let s=!!n[0].ranges[0].startStyle,o=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a<l;a++){let l=n[a],h=l.lineNumber,d=h-t,c=i?+(h===o):0,u=i?+(h!==o&&h===r):0,g="",p="";for(let e=0,t=l.ranges.length;e<t;e++){let t=l.ranges[e];if(s){let e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){g+=this._createSelectionPiece(c,u,ip.SELECTION_CLASS_NAME,t.left-ip.ROUNDED_PIECE_WIDTH,ip.ROUNDED_PIECE_WIDTH);let i=ip.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+ip.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+ip.SELECTION_BOTTOM_RIGHT),g+=this._createSelectionPiece(c,u,i,t.left-ip.ROUNDED_PIECE_WIDTH,ip.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){g+=this._createSelectionPiece(c,u,ip.SELECTION_CLASS_NAME,t.left+t.width,ip.ROUNDED_PIECE_WIDTH);let e=ip.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+ip.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+ip.SELECTION_BOTTOM_LEFT),g+=this._createSelectionPiece(c,u,e,t.left+t.width,ip.ROUNDED_PIECE_WIDTH)}}let i=ip.SELECTION_CLASS_NAME;if(s){let e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+ip.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+ip.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+ip.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+ip.SELECTION_BOTTOM_RIGHT)}p+=this._createSelectionPiece(c,u,i,t.left,t.width)}e[d][0]+=g,e[d][1]+=p}}prepareRender(e){let t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];let s=[];for(let n=0,o=this._selections.length;n<o;n++){let o=this._selections[n];if(o.isEmpty()){s[n]=null;continue}let r=this._getVisibleRangesWithStyle(o,e,this._previousFrameVisibleRangesWithStyle[n]);s[n]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function im(e){return e<0?-e:e}(0,tl.zy)((e,t)=>{let i=e.getColor(tU.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}),i(35809);class i_{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}(o=p||(p={}))[o.Single=0]="Single",o[o.MultiPrimary=1]="MultiPrimary",o[o.MultiSecondary=2]="MultiSecondary";class iv{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(59);this._cursorStyle=i.get(161),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=i.get(38),this._isVisible=!0,this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${tN}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),(0,L.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ei.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case p.Single:this._pluralityClass="";break;case p.MultiPrimary:this._pluralityClass="cursor-primary";break;case p.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(59);return this._cursorStyle=t.get(161),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=t.get(38),(0,L.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=eB.m(i,t-1);return[new ei.y(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="",[n,s]=this._getGraphemeAwarePosition(),o=this._context.viewLayout.getLineHeightForLineNumber(n.lineNumber),r=0===this._lineCursorHeight?o:Math.min(o,this._lineCursorHeight),a=(o-r)/2;if(this._cursorStyle===B.m9.Line||this._cursorStyle===B.m9.LineThin){let o,l=e.visibleRangeForPosition(n);if(!l||l.outsideRenderedLine)return null;let h=w.zk(this._domNode.domNode);this._cursorStyle===B.m9.Line?(o=w.vT(h,this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(t=s,i=this._getTokenClassName(n)):o=w.vT(h,1);let d=l.left,c=0;return o>=2&&d>=1&&(d-=c=1),new i_(e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta+a,d,c,o,r,t,i)}let l=e.linesVisibleRangesForRange(new en.Q(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!l||0===l.length)return null;let h=l[0];if(h.outsideRenderedLine||0===h.ranges.length)return null;let d=h.ranges[0],c=" "===s||d.width<1?this._typicalHalfwidthCharacterWidth:d.width;this._cursorStyle===B.m9.Block&&(t=s,i=this._getTokenClassName(n));let u=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,g=o;return(this._cursorStyle===B.m9.Underline||this._cursorStyle===B.m9.UnderlineThin)&&(u+=o-2,g=2),new i_(u,d.left,0,c,g,t,i)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${tN} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class ib extends J{static{this.BLINK_INTERVAL=500}constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new iv(this._context,p.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new eF.pc,this._cursorFlatBlinkInterval=new w.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t,i){let n=this._secondaryCursors.length!==t.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==i;if(this._primaryCursor.setPlurality(t.length?p.MultiPrimary:p.Single),this._primaryCursor.onCursorPositionChanged(e,n),this._updateBlinking(),this._secondaryCursors.length<t.length){let e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){let e=new iv(this._context,p.MultiSecondary);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){let e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e],n)}onCursorStateChanged(e){let t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1),e.reason);let i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){let t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(let e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return(!this._isComposingInput||this._editContextEnabled)&&this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();let e=this._getCursorBlinking(),t=0===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||5===e||(1===e?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},ib.BLINK_INTERVAL,(0,w.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},ib.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(!this._selectionIsEmpty&&(e+=" has-selection"),this._cursorStyle){case B.m9.Line:e+=" cursor-line-style";break;case B.m9.Block:e+=" cursor-block-style";break;case B.m9.Underline:e+=" cursor-underline-style";break;case B.m9.LineThin:e+=" cursor-line-thin-style";break;case B.m9.BlockOutline:e+=" cursor-block-outline-style";break;case B.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return("on"===this._cursorSmoothCaretAnimation||"explicit"===this._cursorSmoothCaretAnimation)&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0,n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,s=this._secondaryCursors.length;n<s;n++){let s=this._secondaryCursors[n].render(e);s&&(t[i++]=s)}this._renderData=t}getLastRenderData(){return this._renderData}}(0,tl.zy)((e,t)=>{for(let i of[{class:".cursor",foreground:ta.D0,background:ta.kM},{class:".cursor-primary",foreground:ta.sC,background:ta.je},{class:".cursor-secondary",foreground:ta.we,background:ta.L0}]){let n=e.getColor(i.foreground);if(n){let s=e.getColor(i.background);s||(s=n.opposite()),t.addRule(`.monaco-editor .cursors-layer ${i.class} { background-color: ${n}; border-color: ${n}; color: ${s}; }`),(0,th.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${i.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}});let iC=()=>{throw Error("Invalid change accessor")};class iw extends J{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,Y.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace(e=>{let n=Object.keys(this._zones);for(let s=0,o=n.length;s<o;s++){let o=n[s],r=this._zones[o],a=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=a.isInHiddenArea;let l=t.get(o);l&&(l.afterLineNumber!==a.afterViewLineNumber||l.height!==a.heightInPx)&&(e.changeOneWhitespace(o,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}}),i}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(75)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return e.ordinal??e.afterColumn??1e4}_computeWhitespaceProps(e){let t,i;if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};if(void 0!==e.afterColumn)t=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{let i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new ei.y(i,this._context.viewModel.model.getLineMaxColumn(i))}i=t.column===this._context.viewModel.model.getLineMaxColumn(t.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber,column:t.column+1});let n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t,e.afterColumnAffinity,!0),s=e.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!s,afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.viewModel.changeWhitespace(i=>{let n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};(function(e,t){try{e(t)}catch(e){(0,y.dz)(e)}})(e,n),n.addZone=iC,n.removeZone=iC,n.layoutZone=iC}),t}_addZone(e,t){let i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,Y.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,Y.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return!!this._zones.hasOwnProperty(e)&&!!this._zones[e].delegate.suppressMouseDown}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,y.dz)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,y.dz)(e)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,i={},n=!1;for(let e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);let s=Object.keys(this._zones);for(let t=0,n=s.length;t<n;t++){let n=s[t],o=this._zones[n],r=0,a=0,l="none";i.hasOwnProperty(n)?(r=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(r),o.domNode.setHeight(a),o.domNode.setDisplay(l),o.marginDomNode&&(o.marginDomNode.setTop(r),o.marginDomNode.setHeight(a),o.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}i(58293);var iy=i(35468);class iS extends tr{constructor(e){super(),this._context=e,this._options=new ik(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new ik(this._context.configuration);return this._options.equals(t)?e.hasChanged(165):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if("none"===this._options.renderWhitespace){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber-t+1,n=Array(i);for(let e=0;e<i;e++)n[e]=!0;this._renderResult=[];for(let t=e.viewportData.startLineNumber;t<=e.viewportData.endLineNumber;t++){let i=t-e.viewportData.startLineNumber,n=this._context.viewModel.getViewLineRenderingData(t),s=null;if("selection"===this._options.renderWhitespace)for(let e of this._selection){if(e.endLineNumber<t||e.startLineNumber>t)continue;let i=e.startLineNumber===t?e.startColumn:n.minColumn,o=e.endLineNumber===t?e.endColumn:n.maxColumn;i<o&&(s||(s=[]),s.push(new iy.L(i-1,o-1)))}this._renderResult[i]=this._applyRenderWhitespace(e,t,s,n)}}_applyRenderWhitespace(e,t,i,n){let s;if(n.hasVariableFonts||"selection"===this._options.renderWhitespace&&!i||"trailing"===this._options.renderWhitespace&&n.continuesWithWrappedLine)return"";let o=this._context.theme.getColor(ta.w4),r=this._options.renderWithSVG,a=n.content,l=-1===this._options.stopRenderingLineAfter?a.length:Math.min(this._options.stopRenderingLineAfter,a.length),h=n.continuesWithWrappedLine,d=n.minColumn-1,c="boundary"===this._options.renderWhitespace,u="trailing"===this._options.renderWhitespace,g=e.getLineHeightForLineNumber(t),p=this._options.middotWidth,m=this._options.wsmiddotWidth,f=this._options.spaceWidth,_=Math.abs(m-f)<Math.abs(p-f)?11825:183,v=this._options.canUseHalfwidthRightwardsArrow,b="",C=!1,w=eB.HG(a);-1===w?(C=!0,w=l,s=l):s=eB.lT(a);let y=0,S=i&&i[y],k=0;for(let n=d;n<l;n++){let o=a.charCodeAt(n);if(S&&S.endExclusive<=n&&(y++,S=i&&i[y]),9!==o&&32!==o||u&&!C&&n<=s)continue;if(c&&n>=w&&n<=s&&32===o){let e=n-1>=0?a.charCodeAt(n-1):0,t=n+1<l?a.charCodeAt(n+1):0;if(32!==e&&32!==t)continue}if(c&&h&&n===l-1){let e=n-1>=0?a.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&!(S&&S.start<=n&&n<S.endExclusive))continue;let d=e.visibleRangeForPosition(new ei.y(t,n+1));d&&(r?(k=Math.max(k,d.left),9===o?b+=this._renderArrow(g,f,d.left):b+=`<circle cx="${(d.left+f/2).toFixed(2)}" cy="${(g/2).toFixed(2)}" r="${(f/7).toFixed(2)}" />`):9===o?b+=`<div class="mwh" style="left:${d.left}px;height:${g}px;">${v?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:b+=`<div class="mwh" style="left:${d.left}px;height:${g}px;">${String.fromCharCode(_)}</div>`)}return r?(k=Math.round(k+f),`<svg style="bottom:0;position:absolute;width:${k}px;height:${g}px" viewBox="0 0 ${k} ${g}" xmlns="http://www.w3.org/2000/svg" fill="${o}">`+b+"</svg>"):b}_renderArrow(e,t,i){let n=e/2,s={x:0,y:t/7/2},o={x:.8*t,y:s.y},r={x:o.x-.2*o.x,y:o.y+.2*o.x},a={x:r.x+.1*o.x,y:r.y+.1*o.x},l={x:a.x+.35*o.x,y:a.y-.35*o.x},h={x:l.x,y:-l.y},d={x:a.x,y:-a.y},c={x:r.x,y:-r.y},u={x:o.x,y:-o.y},g={x:s.x,y:-s.y},p=[s,o,r,a,l,h,d,c,u,g].map(e=>`${(i+e.x).toFixed(2)} ${(n+e.y).toFixed(2)}`).join(" L ");return`<path d="M ${p}" />`}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class ik{constructor(e){const t=e.options,i=t.get(59),n=t.get(47);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(113),this.renderWithSVG=!0):(this.renderWhitespace=t.get(113),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(75),this.stopRenderingLineAfter=t.get(133)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class ix{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new en.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class iL{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class iD{constructor(e,t,i){this.configuration=e,this.theme=new iL(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var iI=i(51328),iN=i(55146),iE=i(41748),iM=i(78292),iT=i(16871),iR=i(57270),iO=i(5311),iP=i(93003);function iA(e,t){return e.isBasicASCII&&t.useMonospaceOptimizations?new iF(e):new iB(e)}class iF{constructor(e){this._content=e.content}getSegmentAtIndex(e){return this._content[e]}}class iB{constructor(e){this._segments=[];const t=e.content,i=Array.from(iP.x.Segmenter(void 0,{granularity:"grapheme"}).value.segment(t));let n=0;for(let e=0;e<t.length;e++){const t=i[n];if(!t)break;if(t.index!==e){this._segments.push(void 0);continue}n++,this._segments.push(t)}}getSegmentAtIndex(e){return this._segments[e]?.segment}}class iW extends X.i{get glyphRasterizer(){return this._glyphRasterizer.value}constructor(e,t,i,n){super(),this._context=e,this._viewGpuContext=t,this._device=i,this._glyphRasterizer=n,this._context.addEventHandler(this)}}let iH=`
|
|
186
|
+
target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?es.A.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return ec.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return ec.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return ec.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return ec.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return ec.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return ec.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return ec.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return ec.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return ec.createOverlayWidget(this.target,this._getMouseColumn(),e)}}let ef={isAfterLines:!0};function e_(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class ev{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){let t=e.target,i=ee.collect(t,this._viewHelper.viewDomNode);return!!(eu.isChildOfContentWidgets(i)||eu.isChildOfOverflowingContentWidgets(i)||eu.isChildOfOverlayWidgets(i)||eu.isChildOfOverflowingOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){let o=new eg(this._context,this._viewHelper,e),r=new em(o,t,i,n,s);try{let e=ev._createMouseTarget(o,r);if(6===e.type&&o.stickyTabStops&&null!==e.position){let t=ev._snapToSoftTabBoundary(e.position,o.viewModel),i=en.Q.fromPositions(t,t).plusRange(e.range);return r.fulfillContentText(t,i,e.detail)}return e}catch(e){return r.fulfillUnknown()}}static _createMouseTarget(e,t){if(null===t.target)return t.fulfillUnknown();let i=null;return eu.isChildOfOverflowGuard(t.targetPath)||eu.isChildOfOverflowingContentWidgets(t.targetPath)||eu.isChildOfOverflowingOverlayWidgets(t.targetPath)||(i=i||t.fulfillUnknown()),(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=i||ev._hitTestContentWidget(e,t))||ev._hitTestOverlayWidget(e,t))||ev._hitTestMinimap(e,t))||ev._hitTestScrollbarSlider(e,t))||ev._hitTestViewZone(e,t))||ev._hitTestMargin(e,t))||ev._hitTestViewCursor(e,t))||ev._hitTestTextArea(e,t))||ev._hitTestViewLines(e,t))||ev._hitTestScrollbar(e,t))||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(eu.isChildOfContentWidgets(t.targetPath)||eu.isChildOfOverflowingContentWidgets(t.targetPath)){let i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(eu.isChildOfOverlayWidgets(t.targetPath)||eu.isChildOfOverflowingOverlayWidgets(t.targetPath)){let i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){for(let i of e.lastRenderData.lastViewCursorsRenderData)if(t.target===i.domNode)return t.fulfillContentText(i.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){let i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(let o of i){if(n<o.contentLeft||n>o.contentLeft+o.width)continue;let i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){let e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return eu.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition(),s=Math.abs(t.relativePos.x),o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if((s-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth){let r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition());return o.glyphMarginLane=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber)[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,o)}return(s-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o))}return null}static _hitTestViewLines(e,t){if(!eu.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ei.y(1,1),ef);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new ei.y(i,n),ef)}if(eu.isStrictChildOfViewLines(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineLength(i),s=e.getLineWidth(i);if(0===n){let e=e_(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(new ei.y(i,1),e)}if(e.isRtl(i)){if(t.mouseContentHorizontalOffset+s<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let n=e_(t.mouseContentHorizontalOffset-s),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,n)}}else if(t.mouseContentHorizontalOffset>=s){let n=e_(t.mouseContentHorizontalOffset-s),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,n)}}else if(e.viewLinesGpu){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){let n=e.getLineWidth(i),s=e_(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new ei.y(i,1),s)}let n=e.getLineWidth(i);if(e.isRtl(i)){if(t.mouseContentHorizontalOffset+n<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let s=e_(t.mouseContentHorizontalOffset-n),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}else if(t.mouseContentHorizontalOffset>=n){let s=e_(t.mouseContentHorizontalOffset-n),o=new ei.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}let s=e.viewLinesGpu.getPositionAtCoordinate(i,t.mouseContentHorizontalOffset);if(s)return t.fulfillContentText(s,en.Q.fromPositions(s,s),{injectedText:null,mightBeForeignElement:!1})}let i=t.hitTestResult.value;return 1===i.type?ev.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(eu.isChildOfMinimap(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ei.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(eu.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){let i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ei.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(eu.isChildOfScrollableElement(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ei.y(i,n))}return null}getMouseColumn(e){let t=this._context.configuration.options,i=t.get(165),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return ev._getMouseColumn(n,t.get(59).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){let o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){let e=e_(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}let l=e.visibleRangeForPosition(o,r);if(!l)return t.fulfillUnknown(n);let h=l.left;if(1>Math.abs(t.mouseContentHorizontalOffset-h))return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});let d=[];if(d.push({offset:l.left,column:r}),r>1){let t=e.visibleRangeForPosition(o,r-1);t&&d.push({offset:t.left,column:r-1})}if(r<e.viewModel.getLineMaxColumn(o)){let t=e.visibleRangeForPosition(o,r+1);t&&d.push({offset:t.left,column:r+1})}d.sort((e,t)=>e.offset-t.offset);let c=t.pos.toClientCoordinates(w.zk(e.viewDomNode)),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right,p=null;for(let e=1;e<d.length;e++){let i=d[e-1],s=d[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=s.offset){p=new en.Q(o,i.column,o,s.column),n=Math.abs(i.offset-t.mouseContentHorizontalOffset)<Math.abs(s.offset-t.mouseContentHorizontalOffset)?new ei.y(o,i.column):new ei.y(o,s.column);break}}return t.fulfillContentText(n,p,{mightBeForeignElement:!g||!!s,injectedText:s})}static _doHitTestWithCaretRangeFromPoint(e,t){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),s=n+e.lineHeight;if(!(i===e.viewModel.getLineCount()&&t.mouseVerticalOffset>s)){let i=Math.floor((n+s)/2),o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);let r=new Z.nz(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(w.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(w.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let i,n=w.jG(e.viewDomNode);if(!(i=n?void 0===n.caretRangeFromPoint?function(e,t,i){let n=document.createRange(),s=e.elementFromPoint(t,i);if(s?.hasChildNodes()){let e;for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;let i=s.getBoundingClientRect(),o=w.zk(s),r=o.getComputedStyle(s,null).getPropertyValue("font-style"),a=o.getComputedStyle(s,null).getPropertyValue("font-variant"),l=o.getComputedStyle(s,null).getPropertyValue("font-weight"),h=o.getComputedStyle(s,null).getPropertyValue("font-size"),d=o.getComputedStyle(s,null).getPropertyValue("line-height"),c=o.getComputedStyle(s,null).getPropertyValue("font-family"),u=`${r} ${a} ${l} ${h}/${d} ${c}`,g=s.innerText,p=i.left,m=0;if(t>i.left+i.width)m=g.length;else{let i=eb.getInstance();for(let n=0;n<g.length+1;n++){if(t<(p+=e=i.getCharWidth(g.charAt(n),u)/2)){m=n;break}p+=e}}n.setStart(s.firstChild,m),n.setEnd(s.firstChild,m)}return n}(n,t.clientX,t.clientY):n.caretRangeFromPoint(t.clientX,t.clientY):e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY))||!i.startContainer)return new el;let s=i.startContainer;if(s.nodeType===s.TEXT_NODE){let t=s.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===et.G.CLASS_NAME?u.createFromDOMInfo(e,t,i.startOffset):new el(s.parentNode)}if(s.nodeType===s.ELEMENT_NODE){let t=s.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===et.G.CLASS_NAME?u.createFromDOMInfo(e,s,s.textContent.length):new el(s)}return new el}static _doHitTestWithCaretPositionFromPoint(e,t){let i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){let t=i.offsetNode.parentNode,n=t?t.parentNode:null,s=n?n.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===et.G.CLASS_NAME?u.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new el(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){let t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,s=t?t.parentNode:null,o=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(n===et.G.CLASS_NAME){let t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return u.createFromDOMInfo(e,t,0)}else if(o===et.G.CLASS_NAME)return u.createFromDOMInfo(e,i.offsetNode,0)}return new el(i.offsetNode)}static _snapToSoftTabBoundary(e,t){let i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),s=eo.s.atomicPosition(i,e.column-1,n,2);return -1!==s?new ei.y(e.lineNumber,s+1):e}static doHitTest(e,t){let i=new el;if("function"==typeof e.viewDomNode.ownerDocument.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(w.zk(e.viewDomNode)))),1===i.type){let t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);(t||!n.equals(i.position))&&(i=new eh(n,i.spanNode,t))}return i}}class eb{static{this._INSTANCE=null}static getInstance(){return eb._INSTANCE||(eb._INSTANCE=new eb),eb._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let i=e+t;if(this._cache[i])return this._cache[i];let n=this._canvas.getContext("2d");n.font=t;let s=n.measureText(e).width;return this._cache[i]=s,s}}var eC=i(26946),ew=i(27393),ey=i(8502),eS=i(28378),ek=i(10965),ex=i(69015);class eL extends k.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=this._createDragScrollingOperation(e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class eD extends k.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=w.PG(w.zk(o.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}}class eI extends eL{_createDragScrollingOperation(e,t){return new eN(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}}class eN extends eD{_getScrollSpeed(){let e=this._context.configuration.options.get(75),t=this._context.configuration.options.get(165).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e,t=this._context.configuration.options.get(75),i=this._getScrollSpeed(),n=this._tick()/1e3*i*t,s="above"===this._position.outsidePosition?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,s),this._viewHelper.renderNow();let o=this._context.viewLayout.getLinesViewportData(),r="above"===this._position.outsidePosition?o.startLineNumber:o.endLineNumber;{let t=(0,Z.wt)(this._viewHelper.viewDomNode),i=this._context.configuration.options.get(165).horizontalScrollbarHeight,n=new Z.nz(this._mouseEvent.pos.x,t.y+t.height-i-.1),s=(0,Z.i_)(this._viewHelper.viewDomNode,t,n);e=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),t,n,s,null)}e.position&&e.position.lineNumber===r||(e="above"===this._position.outsidePosition?ec.createOutsideEditor(this._position.mouseColumn,new ei.y(r,1),"above",this._position.outsideDistance):ec.createOutsideEditor(this._position.mouseColumn,new ei.y(r,this._context.viewModel.getLineMaxColumn(r)),"below",this._position.outsideDistance)),this._dispatchMouse(e,!0,2),this._animationFrameDisposable=w.PG(w.zk(e.element),()=>this._execute())}}class eE extends eL{_createDragScrollingOperation(e,t){return new eM(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}}class eM extends eD{_getScrollSpeed(){let e=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,t=this._context.configuration.options.get(165).contentWidth/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e,t=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,i=this._getScrollSpeed(),n=this._tick()/1e3*i*t*.5,s="left"===this._position.outsidePosition?-n:n;if(this._context.viewModel.viewLayout.deltaScrollNow(s,0),this._viewHelper.renderNow(),!this._position.position)return;let o=this._position.position.lineNumber;{let t=(0,Z.wt)(this._viewHelper.viewDomNode),i=this._context.configuration.options.get(165).horizontalScrollbarHeight,n=new Z.nz(this._mouseEvent.pos.x,t.y+t.height-i-.1),s=(0,Z.i_)(this._viewHelper.viewDomNode,t,n);e=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),t,n,s,null)}e="left"===this._position.outsidePosition?ec.createOutsideEditor(e.mouseColumn,new ei.y(o,e.mouseColumn),"left",this._position.outsideDistance):ec.createOutsideEditor(e.mouseColumn,new ei.y(o,e.mouseColumn),"right",this._position.outsideDistance),this._dispatchMouse(e,!0,2),this._animationFrameDisposable=w.PG(w.zk(e.element),()=>this._execute())}}class eT extends X.i{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new ev(this._context,i),this._mouseDownOperation=this._register(new eR(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(e,t)=>this._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(165).height;const n=new Z.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=w.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new Z.dO(e,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e)));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e,t)=>{s=t})),this._register(w.ko(this.viewHelper.viewDomNode,w.Bx.POINTER_UP,e=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=ex.QC.INSTANCE,t=0,i=W.D.getZoomLevel(),n=!1,s=0,o=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(84))return;let a=new eS.$(o);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(r(o)){let e=W.D.getZoomLevel(),t=a.deltaY>0?1:-1;W.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=W.D.getZoomLevel(),n=r(o),s=0),t=Date.now(),s+=a.deltaY,n&&(W.D.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())};function r(e){return E.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(w.ko(this.viewHelper.viewDomNode,w.Bx.MOUSE_WHEEL,o,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(165)){let e=this._context.configuration.options.get(165).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let i=new Z.Hh(e,t).toPageCoordinates(w.zk(this.viewHelper.viewDomNode)),n=(0,Z.wt)(this.viewHelper.viewDomNode);if(i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width)return null;let s=(0,Z.i_)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){let t=w.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find(e=>this.viewHelper.viewDomNode.contains(e)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e,t){let i=this._createMouseTarget(e,!0),n=6===i.type||7===i.type,s=2===i.type||3===i.type||4===i.type,o=3===i.type,r=this._context.configuration.options.get(125),a=8===i.type||5===i.type,l=9===i.type,h=e.leftButton||e.middleButton;E.zx&&e.leftButton&&e.ctrlKey&&(h=!1);let d=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(h&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){let n=i.detail;h&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class eR extends k.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new Z.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new eI(this._context,this._viewHelper,this._mouseTargetFactory,(e,t,i)=>this._dispatchMouse(e,t,i))),this._leftRightDragScrolling=this._register(new eE(this._context,this._viewHelper,this._mouseTargetFactory,(e,t,i)=>this._dispatchMouse(e,t,i))),this._mouseState=new eO,this._currentSelection=new ek.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13===t.type?"above"===t.outsidePosition||"below"===t.outsidePosition?(this._topBottomDragScrolling.start(t,e),this._leftRightDragScrolling.stop()):(this._leftRightDragScrolling.start(t,e),this._topBottomDragScrolling.stop()):(this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;let s=this._context.configuration.options;if(!s.get(104)&&s.get(42)&&!s.get(28)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,e=>this._onMouseDownThenMove(e),e=>{let t=this._findMousePosition(this._lastMouseEvent,!1);w.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posy<t.y){let i=t.y-e.posy,o=Math.max(n.getCurrentScrollTop()-i,0),r=eg.getZoneAtCoord(this._context,o);if(r){let e=this._helpPositionJumpOverViewZone(r);if(e)return ec.createOutsideEditor(s,e,"above",i)}let a=n.getLineNumberAtVerticalOffset(o);return ec.createOutsideEditor(s,new ei.y(a,1),"above",i)}if(e.posy>t.y+t.height){let o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=eg.getZoneAtCoord(this._context,r);if(a){let e=this._helpPositionJumpOverViewZone(a);if(e)return ec.createOutsideEditor(s,e,"below",o)}let l=n.getLineNumberAtVerticalOffset(r);return ec.createOutsideEditor(s,new ei.y(l,i.getLineMaxColumn(l)),"below",o)}let o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y),r=this._context.configuration.options.get(165),a=r.contentLeft;if(e.relativePos.x<=a){let t=a-e.relativePos.x;return ec.createOutsideEditor(s,new ei.y(o,1),"left",t)}let l=0===r.minimap.minimapLeft?r.width-r.verticalScrollbarWidth:r.minimap.minimapLeft;if(e.relativePos.x>=l){let t=e.relativePos.x-l;return ec.createOutsideEditor(s,new ei.y(o,i.getLineMaxColumn(o)),"right",t)}return null}_findMousePosition(e,t){let i=this._getPositionOutsideEditor(e);if(i)return i;let n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){let e=this._helpPositionJumpOverViewZone(n.detail);if(e)return ec.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){let t=new ei.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;if(i&&n)if(i.isBefore(t))return i;else return n;return null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class eO{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let i=new Date().getTime();i-this._lastSetMouseDownCountTime>eO.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var eP=i(9634),eA=i(23001),eF=i(50197),eB=i(32563),eW=i(23762),eH=i(69728);class eV{static{this.EMPTY=new eV("",0,0,null,void 0)}constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let i,n=e.getValue(),s=e.getSelectionStart(),o=e.getSelectionEnd();return t&&n.substring(0,s)===t.value.substring(0,t.selectionStart)&&(i=t.newlineCountBeforeSelection),new eV(n,s,o,null,i)}collapseSelection(){return this.selectionStart===this.value.length?this:new eV(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(e,t){let i=this.value===e.getValue();return t?this.selectionStart===e.getSelectionStart()&&this.selectionEnd===e.getSelectionEnd()&&i:i}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){let t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){let t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}let t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);let i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let n=Math.min((0,eB.Qp)(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min((0,eB.Vi)(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),o=(e.value.substring(n,e.value.length-s),t.value.substring(n,t.value.length-s)),r=e.selectionStart-n,a=e.selectionEnd-n;return t.selectionStart-n==t.selectionEnd-n?{text:o,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}:{text:o,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let i=Math.min((0,eB.Qp)(e.value,t.value),e.selectionEnd),n=Math.min((0,eB.Vi)(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:o,replacePrevCharCnt:r,replaceNextCharCnt:s.length-r,positionDelta:a-o.length}}static fromScreenReaderContentState(e){return new eV(e.value,e.selectionStart,e.selectionEnd,e.selection,e.newlineCountBeforeSelection)}}var ez=i(24924),eU=function(e,t){return function(i,n){t(i,n,e)}};(g||(g={})).Tap="-monaco-textarea-synthetic-tap";class ej{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){let t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let e$=class extends k.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,o){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=o,this._onFocus=this._register(new S.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new S.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new S.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new S.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new S.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new S.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new S.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new S.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new S.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new S.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new S.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new k.HE),this._asyncTriggerCut=this._register(new eF.uC(()=>this._onCut.fire(),0)),this._textAreaState=eV.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(S.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new eF.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown(e=>{let t=new eA.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)})),this._register(this._textArea.onKeyUp(e=>{let t=new eA.Z(e);this._onKeyUp.fire(t)})),this._register(this._textArea.onCompositionStart(e=>{let t=new ej;if(this._currentComposition){this._currentComposition=t;return}if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code)){t.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:e.data});return}this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})})),this._register(this._textArea.onCompositionUpdate(e=>{let t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){let t=eV.readFromTextArea(this._textArea,this._textAreaState),i=eV.deduceAndroidCompositionInput(this._textAreaState,t);this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e);return}let i=t.handleCompositionUpdate(e.data);this._textAreaState=eV.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)})),this._register(this._textArea.onCompositionEnd(e=>{let t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){let e=eV.readFromTextArea(this._textArea,this._textAreaState),t=eV.deduceAndroidCompositionInput(this._textAreaState,e);this._textAreaState=e,this._onType.fire(t),this._onCompositionEnd.fire();return}let i=t.handleCompositionUpdate(e.data);this._textAreaState=eV.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let t=eV.readFromTextArea(this._textArea,this._textAreaState),i=eV.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&(eB.pc(i.text.charCodeAt(0))||127===i.text.charCodeAt(0))||(this._textAreaState=t,(""!==i.text||0!==i.replacePrevCharCnt||0!==i.replaceNextCharCnt||0!==i.positionDelta)&&("insertFromPaste"===e.inputType?this._onPaste.fire({text:i.text,metadata:eH.bs.INSTANCE.get(i.text)}):this._onType.fire(i)))})),this._register(this._textArea.onCut(e=>{this._logService.trace("TextAreaInput#onCut",e),this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(e=>{this._logService.trace("TextAreaInput#onCopy",e),this._ensureClipboardGetsEditorSelection(e)})),this._register(this._textArea.onPaste(e=>{if(this._logService.trace("TextAreaInput#onPaste",e),this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=eH.Mz.getTextData(e.clipboardData);this._logService.trace("TextAreaInput#onPaste with id : ",i?.id," with text.length: ",t.length),t&&(i=i||eH.bs.INSTANCE.get(t),this._logService.trace("TextAreaInput#onPaste (before onPaste)"),this._onPaste.fire({text:t,metadata:i}))})),this._register(this._textArea.onFocus(()=>{let e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new eF.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return w.ko(this._textArea.ownerDocument,"selectionchange",t=>{if(c.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let i=Date.now(),n=i-e;if(e=i,n<5)return;let s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selection)return;let o=this._textArea.getValue();if(this._textAreaState.value!==o)return;let r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;let l=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(d[0],d[1],d[2]),g=new ek.L(h.lineNumber,h.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.isWrittenToTextArea(this._textArea,this._hasFocus)||this._logService.trace(`writeTextAreaState(reason: ${e})`),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){(this._accessibilityService.isScreenReaderOptimized()||"render"!==e)&&!this._currentComposition&&this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){let t,i=this._host.getDataToCopy();this._logService.getLevel()===eW.$b.Trace&&(t=(0,ez.b)());let n={version:1,id:t,isFromEmptySelection:i.isFromEmptySelection,multicursorText:i.multicursorText,mode:i.mode};eH.bs.INSTANCE.set(this._browser.isFirefox?i.text.replace(/\r\n/g,"\n"):i.text,n),e.preventDefault(),e.clipboardData&&eH.Mz.setTextData(e.clipboardData,i.text,i.html,n),this._logService.trace("TextAreaEditContextInput#_ensureClipboardGetsEditorSelection with id : ",t," with text.length: ",i.text.length)}};e$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([eU(4,V.j),eU(5,eW.rr)],e$);class eK extends k.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this._onSyntheticTap=this._register(new S.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new eP.f(this._actual,"keydown")).event,this.onKeyPress=this._register(new eP.f(this._actual,"keypress")).event,this.onKeyUp=this._register(new eP.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new eP.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new eP.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new eP.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new eP.f(this._actual,"beforeinput")).event,this.onInput=this._register(new eP.f(this._actual,"input")).event,this.onCut=this._register(new eP.f(this._actual,"cut")).event,this.onCopy=this._register(new eP.f(this._actual,"copy")).event,this.onPaste=this._register(new eP.f(this._actual,"paste")).event,this.onFocus=this._register(new eP.f(this._actual,"focus")).event,this.onBlur=this._register(new eP.f(this._actual,"blur")).event,this._register(this.onKeyDown(()=>c.onKeyDown())),this._register(this.onBeforeInput(()=>c.onBeforeInput())),this._register(this.onInput(()=>c.onInput())),this._register(this.onKeyUp(()=>c.onKeyUp())),this._register(w.ko(this._actual,g.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=w.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&w.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){let n=this._actual,s=null,o=w.jG(n);s=o?o.activeElement:w.bq();let r=w.zk(s),a=s===n,l=n.selectionStart,h=n.selectionEnd;if(a&&l===t&&h===i){D.gm&&r.parent!==r&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),D.gm&&r.parent!==r&&n.focus();return}try{let e=w.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),w.wk(n,e)}catch(e){}}}class eG extends eT{constructor(e,t,i){super(e,t,i),this._register(ew.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Tap,e=>this.onTap(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Change,e=>this.onChange(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Contextmenu,e=>this._onContextMenu(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(w.ko(this.viewHelper.linesContentDomNode,"pointerdown",e=>{let t=e.pointerType;if("mouse"===t){this._lastPointerType="mouse";return}"touch"===t?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new Z.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,e=>this._onMouseMove(e))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e,t)=>this._onMouseDown(e,t)))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let i=this._createMouseTarget(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class eq extends eT{constructor(e,t,i){super(e,t,i),this._register(ew.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Tap,e=>this.onTap(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Change,e=>this.onChange(e))),this._register(w.ko(this.viewHelper.linesContentDomNode,ew.B.Contextmenu,e=>this._onContextMenu(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new Z.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let e=document.createEvent("CustomEvent");e.initEvent(g.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class eQ extends k.jG{constructor(e,t,i){super(),(E.un||E.m0&&E.Fr)&&eC.e.pointerEvents?this.handler=this._register(new eG(e,t,i)):ey.G.TouchEvent?this.handler=this._register(new eq(e,t,i)):this.handler=this._register(new eT(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var eY=i(6515),eZ=i(47717);class eX{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){eZ.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new ei.y(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(86)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(86)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){let t=this.configuration.options,i=E.j9&&t.get(121),n=t.get(28),s=t.get(171);e.middleButton&&!i?s||this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){eZ.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){eZ.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),eZ.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),eZ.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){eZ.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){eZ.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){eZ.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){eZ.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){eZ.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){eZ.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){eZ.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){eZ.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){eZ.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var eJ=i(98194),e0=i(61971);class e1{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new y.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;let i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i)return this._rendLineNumberStart-=t-e+1,null;if(e>n)return null;let s=0,o=0;for(let r=i;r<=n;r++){let i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(s,o)}onLinesChanged(e,t){let i=e+t-1;if(0===this.getCount())return!1;let n=this.getStartLineNumber(),s=this.getEndLineNumber(),o=!1;for(let t=e;t<=i;t++)t>=n&&t<=s&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;let i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);let o=[];for(let e=0;e<i;e++)o[e]=this._lineFactory.createLine();let r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),h=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(o).concat(l),h}onTokensChanged(e){if(0===this.getCount())return!1;let t=this.getStartLineNumber(),i=this.getEndLineNumber(),n=!1;for(let s=0,o=e.length;s<o;s++){let o=e[s];if(o.toLineNumber<t||o.fromLineNumber>i)continue;let r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){let t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class e2{constructor(e,t){this._viewContext=e,this._lineFactory=t,this.domNode=this._createDomNode(),this._linesCollection=new e1(this._lineFactory)}_createDomNode(){let e=(0,Y.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(165)}onFlushed(e,t){if(t){let e=this._linesCollection.getStartLineNumber(),t=this._linesCollection.getEndLineNumber();for(let i=e;i<=t;i++)this._linesCollection.getLine(i).getDomNode()?.remove()}return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){let i=t[e].getDomNode();i?.remove()}return!0}onLinesInserted(e){let t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){let i=t[e].getDomNode();i?.remove()}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){let t=this._linesCollection._get(),i=new e5(this.domNode.domNode,this._lineFactory,e,this._viewContext),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},s=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}class e5{static{this._ttPolicy=(0,eJ.H)("editorViewLayer",{createHTML:e=>e})}constructor(e,t,i,n){this._domNode=e,this._lineFactory=t,this._viewportData=i,this._viewContext=n}render(e,t,i,n){let s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1<t||i<s.rendLineNumberStart){s.rendLineNumberStart=t,s.linesLength=i-t+1,s.lines=[];for(let e=t;e<=i;e++)s.lines[e-t]=this._lineFactory.createLine();return this._finishRendering(s,!0,n),s}if(this._renderUntouchedLines(s,Math.max(t-s.rendLineNumberStart,0),Math.min(i-s.rendLineNumberStart,s.linesLength-1),n,t),s.rendLineNumberStart>t){let e=Math.min(i,s.rendLineNumberStart-1);t<=e&&(this._insertLinesBefore(s,t,e,n,t),s.linesLength+=e-t+1)}else if(s.rendLineNumberStart<t){let e=Math.min(s.linesLength,t-s.rendLineNumberStart);e>0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1<i){let e=s.rendLineNumberStart+s.linesLength;e<=i&&(this._insertLinesAfter(s,e,i,n,t),s.linesLength+=i-e+1)}else if(s.rendLineNumberStart+s.linesLength-1>i){let e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){let o=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){let t=o+e;r[e].layoutLine(t,n[t-s],this._lineHeightForLineNumber(t))}}_insertLinesBefore(e,t,i,n,s){let o=[],r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){let t=e.lines[i].getDomNode();t?.remove()}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,s){let o=[],r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,t){let i=e.linesLength-t;for(let n=0;n<t;n++){let t=e.lines[i+n].getDomNode();t?.remove()}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){e5._ttPolicy&&(i=e5._ttPolicy.createHTML(i));let s=this._domNode.lastChild;t||!s?this._domNode.innerHTML=i:s.insertAdjacentHTML("afterend",i);let o=this._domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){let i=e.lines[t];n[t]&&(i.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){let n=document.createElement("div");e5._ttPolicy&&(t=e5._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){let s=e.lines[t];if(i[t]){let e=n.firstChild,t=s.getDomNode();t.parentNode.replaceChild(e,t),s.setDomNode(e)}}}static{this._sb=new e0.fe(1e5)}_finishRendering(e,t,i){let n=e5._sb,s=e.linesLength,o=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<s;e++){let t=o[e];if(a[e]=!1,t.getDomNode())continue;let s=e+r;t.renderLine(s,i[e],this._lineHeightForLineNumber(s),this._viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1,l=[];for(let e=0;e<s;e++){let s=o[e];if(l[e]=!1,a[e])continue;let h=e+r;s.renderLine(h,i[e],this._lineHeightForLineNumber(h),this._viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}_lineHeightForLineNumber(e){return this._viewContext.viewLayout.getLineHeightForLineNumber(e)}}class e4 extends J{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new e2(this._context,{createLine:()=>new e3(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(59);(0,L.M)(this.domNode,t),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);let t=this._context.configuration.options.get(59);return(0,L.M)(this.domNode,t),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){let t=this._dynamicOverlays.filter(e=>e.shouldRender());for(let i=0,n=t.length;i<n;i++){let n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class e3{constructor(e){this._dynamicOverlays=e,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=(0,Y.Z)(e)}onContentChanged(){}onTokensChanged(){}renderLine(e,t,i,n,s){let o="";for(let t=0,i=this._dynamicOverlays.length;t<i;t++)o+=this._dynamicOverlays[t].render(n.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,s.appendString('<div style="top:'),s.appendString(String(t)),s.appendString("px;height:"),s.appendString(String(i)),s.appendString("px;line-height:"),s.appendString(String(i)),s.appendString('px;">'),s.appendString(o),s.appendString("</div>"),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i),this._domNode.setLineHeight(i))}}class e7 extends e4{constructor(e){super(e);const t=this._context.configuration.options.get(165);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class e9 extends e4{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,L.M)(this.domNode,t.get(59))}onConfigurationChanged(e){let t=this._context.configuration.options;(0,L.M)(this.domNode,t.get(59));let i=t.get(165);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class e8{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return e8.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(5===i.type||8===i.type)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ei.y(e.afterLineNumber,1)).lineNumber}}}i(31827);class e6 extends J{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,t=this._context.configuration.options.get(165),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);let n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;for(let i of e.getDecorationsInViewport()){let n,s;if(!i.options.blockClassName)continue;let o=this.blocks[t];o||(o=this.blocks[t]=(0,Y.Z)(document.createElement("div")),this.domNode.appendChild(o)),i.options.blockIsAfterEnd?(n=e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!0)):(n=e.getVerticalOffsetForLineNumber(i.range.startLineNumber,!0),s=i.range.isEmpty()&&!i.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(i.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!0));let[r,a,l,h]=i.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+i.options.blockClassName),o.setLeft(this.contentLeft-h),o.setWidth(this.contentWidth+h+a),o.setTop(n-e.scrollTop-r),o.setHeight(s-n+r+l),t++}for(let e=t;e<this.blocks.length;e++)this.blocks[e].domNode.remove();this.blocks.length=t}}class te extends J{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,Y.Z)(document.createElement("div")),ee.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,Y.Z)(document.createElement("div")),ee.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){for(let t of Object.keys(this._widgets))this._widgets[t].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){for(let e of Object.keys(this._widgets))this._widgets[e].updateAnchorViewPosition()}addWidget(e){let t=new tt(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let e=this._widgets[t];delete this._widgets[t];let i=e.domNode.domNode;i.remove(),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){for(let t of Object.keys(this._widgets))this._widgets[t].onBeforeRender(e)}prepareRender(e){for(let t of Object.keys(this._widgets))this._widgets[t].prepareRender(e)}render(e){for(let t of Object.keys(this._widgets))this._widgets[t].render(e)}}class tt{constructor(e,t,i){this._primaryAnchor=new ti(null,null),this._secondaryAnchor=new ti(null,null),this._context=e,this._viewDomNode=t,this._actual=i;const n=this._context.configuration.options,s=n.get(165),o=n.get(4);this.domNode=(0,Y.Z)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=(this._actual.allowEditorOverflow||!1)&&o,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this._fixedOverflowWidgets=n.get(51),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(e.hasChanged(165)){let e=t.get(165);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new ti(null,null);let n=t.model.validatePosition(e);return t.coordinatesConverter.modelPositionIsVisible(n)?new ti(e,t.coordinatesConverter.convertModelPositionToViewPosition(n,i??void 0)):new ti(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){let s=e.top,o=e.top+e.height,r=n.viewportHeight-o,a=e.left;return a+t>n.scrollLeft+n.viewportWidth&&(a=n.scrollLeft+n.viewportWidth-t),a<n.scrollLeft&&(a=n.scrollLeft),{fitsAbove:s>=i,aboveTop:s-i,fitsBelow:r>=i,belowTop:o,left:a}}_layoutHorizontalSegmentInPage(e,t,i,n){let s=Math.max(15,t.left-n),o=Math.min(t.left+t.width+n,e.width-15),r=this._viewDomNode.domNode.ownerDocument.defaultView,a=t.left+i-(r?.scrollX??0);if(a+n>o){let e=a-(o-n);a-=e,i-=e}if(a<s){let e=a-s;a-=e,i-=e}return[i,a]}_layoutBoxInPage(e,t,i,n){let s=e.top-i,o=e.top+e.height,r=w.BK(this._viewDomNode.domNode),a=this._viewDomNode.domNode.ownerDocument,l=a.defaultView,h=r.top+s-(l?.scrollY??0),d=r.top+o-(l?.scrollY??0),c=w.tG(a.body),[u,g]=this._layoutHorizontalSegmentInPage(c,r,e.left-n.scrollLeft+this._contentLeft,t),p=h>=22,m=d+i<=c.height-22;return this._fixedOverflowWidgets?{fitsAbove:p,aboveTop:Math.max(h,22),fitsBelow:m,belowTop:d,left:g}:{fitsAbove:p,aboveTop:s,fitsBelow:m,belowTop:o,left:u}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new tn(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){return{primary:t(this._primaryAnchor.viewPosition,this._affinity),secondary:t(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity)};function t(t,i){if(!t)return null;let n=e.visibleRangeForPosition(t);if(!n)return null;let s=1===t.column&&3===i?0:n.left;return new ts(e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop,s,e.getLineHeightForLineNumber(t.lineNumber))}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;let n=this._context.configuration.options.get(59),s=t.left;return s=s<e.left?Math.max(s,e.left-i+n.typicalFullwidthCharacterWidth):Math.min(s,e.left+i-n.typicalFullwidthCharacterWidth),new ts(e.top,s,e.height)}_prepareRenderWidget(e){let t;if(!this._preference||0===this._preference.length)return null;let{primary:i,secondary:n}=this._getAnchorsCoordinates(e);if(!i)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=to(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeOffsetWidth=e.width,this._cachedDomNodeOffsetHeight=e.height;else{let e=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(e.width),this._cachedDomNodeOffsetHeight=Math.round(e.height)}}let s=this._reduceAnchorCoordinates(i,n,this._cachedDomNodeOffsetWidth);t=this.allowEditorOverflow?this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let e=1;e<=2;e++)for(let i of this._preference)if(1===i){if(!t)return null;if(2===e||t.fitsAbove)return{kind:"inViewport",coordinate:new tn(t.aboveTop,t.left),position:1}}else if(2===i){if(!t)return null;if(2===e||t.fitsBelow)return{kind:"inViewport",coordinate:new tn(t.belowTop,t.left),position:2}}else if(this.allowEditorOverflow)return{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new tn(s.top,s.left)),position:0};else return{kind:"inViewport",coordinate:new tn(s.top,s.left),position:0};return null}onBeforeRender(e){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),"function"==typeof this._actual.afterRender&&to(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?this.domNode.setTop(this._renderData.coordinate.top):this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&to(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}}class ti{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class tn{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class ts{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function to(e,t,...i){try{return e.call(t,...i)}catch{return null}}i(6397);class tr extends X.i{}var ta=i(92108),tl=i(5027),th=i(92740);class td extends tr{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(165);this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ek.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let e of this._selections)t.add(e.positionLineNumber);let i=Array.from(t);i.sort((e,t)=>e-t),I.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);let n=this._selections.every(e=>e.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){let s=this._renderOne(e,!1);for(let e of this._cursorLineNumbers){let o=this._context.viewModel.coordinatesConverter,r=o.convertViewPositionToModelPosition(new ei.y(e,1)).lineNumber,a=o.convertModelPositionToViewPosition(new ei.y(r,1)).lineNumber,l=o.convertModelPositionToViewPosition(new ei.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,h=Math.max(a,t),d=Math.min(l,i);for(let e=h;e<=d;e++)n[e-t]=s}}let s=this._renderOne(e,!0);for(let e of this._cursorLineNumbers)e<t||e>i||(n[e-t]=s);this._renderData=n}render(e,t){if(!this._renderData)return"";let i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class tc extends td{_renderOne(e,t){let i="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(t?" current-line-exact":"");return`<div class="${i}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class tu extends td{_renderOne(e,t){let i="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&t?" current-line-exact-margin":"");return`<div class="${i}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,tl.zy)((e,t)=>{let i=e.getColor(ta.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(ta.Mf)){let i=e.getColor(ta.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,th.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}),i(59461);class tg extends tr{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e];s.options.className&&(i[n++]=s)}i=i.sort((e,t)=>{if(e.options.zIndex<t.options.zIndex)return -1;if(e.options.zIndex>t.options.zIndex)return 1;let i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:en.Q.compareRangesUsingStarts(e.range,t.range)});let s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let e=s;e<=o;e++)r[e-s]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,o=t.length;e<o;e++){let o=t[e];if(!o.options.isWholeLine)continue;let r='<div class="cdr '+o.options.className+'" style="left:0;width:100%;"></div>',a=Math.max(o.range.startLineNumber,n),l=Math.min(o.range.endLineNumber,s);for(let e=a;e<=l;e++){let t=e-n;i[t]+=r}}}_renderNormalDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=null,o=!1,r=null,a=!1;for(let l=0,h=t.length;l<h;l++){let h=t[l];if(h.options.isWholeLine)continue;let d=h.options.className,c=!!h.options.showIfCollapsed,u=h.range;if(c&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new en.Q(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.viewModel.getLineMaxColumn(u.endLineNumber-1))),s===d&&o===c&&en.Q.areIntersectingOrTouching(r,u)){r=en.Q.plusRange(r,u);continue}null!==s&&this._renderNormalDecoration(e,r,s,a,o,n,i),s=d,o=c,r=u,a=h.options.shouldFillLineOnLineBreak??!1}null!==s&&this._renderNormalDecoration(e,r,s,a,o,n,i)}_renderNormalDecoration(e,t,i,n,s,o,r){let a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let e=0,t=a.length;e<t;e++){let t=a[e];if(t.outsideRenderedLine)continue;let l=t.lineNumber-o;if(s&&1===t.ranges.length){let e=t.ranges[0];if(e.width<this._typicalHalfwidthCharacterWidth){let i=Math.max(0,Math.round(Math.round(e.left+e.width/2)-this._typicalHalfwidthCharacterWidth/2));t.ranges[0]=new eY.Y(i,this._typicalHalfwidthCharacterWidth)}}for(let e=0,s=t.ranges.length;e<s;e++){let o=n&&t.continuesOnNextLine&&1===s,a=t.ranges[e],h='<div class="cdr '+i+'" style="left:'+String(a.left)+"px;width:"+(o?"100%;":String(a.width)+"px;")+'"></div>';r[l]+=h}}}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class tp extends J{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(117),r=s.get(83),a=s.get(49),l=s.get(120),h=s.get(158),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,tl.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage,inertialScroll:h};this.scrollbar=this._register(new ex.oO(t.domNode,d,this._context.viewLayout.getScrollable())),ee.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,Y.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(e,t,i)=>{let n={};if(t){let t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){let t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(w.ko(i.domNode,"scroll",e=>c(i.domNode,!0,!0))),this._register(w.ko(t.domNode,"scroll",e=>c(t.domNode,!0,!1))),this._register(w.ko(n.domNode,"scroll",e=>c(n.domNode,!0,!1))),this._register(w.ko(this.scrollbarDomNode.domNode,"scroll",e=>c(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(165);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(81).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(117)||e.hasChanged(83)||e.hasChanged(49)){let e=this._context.configuration.options,t=e.get(117),i=e.get(83),n=e.get(49),s=e.get(120),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,tl.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}i(29393);class tm{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}}class tf{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class t_{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class tv extends tr{_render(e,t,i){let n=[];for(let i=e;i<=t;i++)n[i-e]=new t_;if(0===i.length)return n;i.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1);let s=null,o=0;for(let r=0,a=i.length;r<a;r++){let a=i[r],l=a.className,h=a.zIndex,d=Math.max(a.startLineNumber,e)-e,c=Math.min(a.endLineNumber,t)-e;s===l?(d=Math.max(o+1,d),o=Math.max(o,c)):(s=l,o=c);for(let e=d;e<=o;e++)n[e].add(new tf(l,h,a.tooltip))}return n}}class tb extends J{constructor(e){super(e),this._widgets={},this._context=e;const t=this._context.configuration.options,i=t.get(165);this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=t.get(75),this._glyphMargin=t.get(66),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._lineHeight=t.get(75),this._glyphMargin=t.get(66),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}addWidget(e){let t=(0,Y.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:e.getPosition(),domNode:t,renderInfo:null},t.setPosition("absolute"),t.setDisplay("none"),t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){let i=this._widgets[e.getId()];return!(i.preference.lane===t.lane&&i.preference.zIndex===t.zIndex&&en.Q.equalsRange(i.preference.range,t.range))&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){let t=e.getId();if(this._widgets[t]){let e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(e,t){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let s of e.getDecorationsInViewport()){let e=s.options.glyphMarginClassName;if(!e)continue;let o=Math.max(s.range.startLineNumber,i),r=Math.min(s.range.endLineNumber,n),a=s.options.glyphMargin?.position??er.ZS.Center,l=s.options.zIndex??0;for(let i=o;i<=r;i++){let n=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(i,0)),s=this._context.viewModel.glyphLanes.getLanesAtLine(n.lineNumber).indexOf(a);t.push(new tC(i,s,l,e))}}}_collectWidgetBasedGlyphRenderRequest(e,t){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e of Object.values(this._widgets)){let s=e.preference.range,{startLineNumber:o,endLineNumber:r}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(en.Q.lift(s));if(!o||!r||r<i||o>n)continue;let a=Math.max(o,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(a,0)),h=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new tw(a,h,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((e,t)=>{if(e.lineNumber===t.lineNumber){if(e.laneIndex===t.laneIndex){if(e.zIndex===t.zIndex)return t.type===e.type?0===e.type&&0===t.type?e.className<t.className?-1:1:0:t.type-e.type;return t.zIndex-e.zIndex}return e.laneIndex-t.laneIndex}return e.lineNumber-t.lineNumber}),t}prepareRender(e){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(let e of Object.values(this._widgets))e.renderInfo=null;let t=new I.j3(this._collectSortedGlyphRenderRequests(e)),i=[];for(;t.length>0;){let e=t.peek();if(!e)break;let n=t.takeWhile(t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex);if(!n||0===n.length)break;let s=n[0];if(0===s.type){let e=[];for(let t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;(0===e.length||e[e.length-1]!==t.className)&&e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(let e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let e=this._managedDomNodes.pop();e?.domNode.remove()}return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let i of Object.values(this._widgets))if(i.renderInfo){let n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;i<this._decorationGlyphsToRender.length;i++){let n,s=this._decorationGlyphsToRender[i],o=s.lineNumber,r=e.viewportData.relativeVerticalOffset[o-e.viewportData.startLineNumber],a=this._glyphMarginLeft+s.laneIndex*this._lineHeight;i<this._managedDomNodes.length?n=this._managedDomNodes[i]:(n=(0,Y.Z)(document.createElement("div")),this._managedDomNodes.push(n),this.domNode.appendChild(n));let l=this._context.viewLayout.getLineHeightForLineNumber(o);n.setClassName("cgmr codicon "+s.combinedClassName),n.setPosition("absolute"),n.setTop(r),n.setLeft(a),n.setWidth(t),n.setHeight(l)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){let e=this._managedDomNodes.pop();e?.domNode.remove()}}}class tC{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new ty(this.lineNumber,this.laneIndex,e)}}class tw{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class ty{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}i(93477);var tS=i(24244),tk=i(40365),tx=i(89984);class tL extends tr{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(166),n=t.get(59);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(166),n=t.get(59);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();return!this._primaryPosition?.equals(t)&&(this._primaryPosition=t,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,s=this._primaryPosition,o=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),s),r=[];for(let s=t;s<=i;s++){let i=s-t,a=o[i],l="",h=e.visibleRangeForPosition(new ei.y(s,1))?.left??0;for(let t of a){let i=-1===t.column?h+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ei.y(s,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;let o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(e.visibleRangeForPosition(new ei.y(s,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`<div class="core-guide ${t.className} ${o}" style="left:${i}px;width:${r}px"></div>`}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){let n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?tx.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?tx.N6.EnabledForActive:tx.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){let n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}let{indentSize:l}=this._context.viewModel.model.getOptions(),h=[];for(let i=e;i<=t;i++){let t=[];h.push(t);let d=n?n[i-e]:[],c=new I.j3(d),u=s?s[i-e]:0;for(let e=1;e<=u;e++){let n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===d.length)&&o<=i&&i<=r&&e===a;t.push(...c.takeWhile(e=>e.visibleColumn<n)||[]);let h=c.peek();(!h||h.visibleColumn!==n||h.horizontalLine)&&t.push(new tx.TH(n,-1,`core-guide-indent lvl-${(e-1)%30}`+(s?" indent-active":""),null,-1,-1))}t.push(...c.takeWhile(e=>!0)||[])}return h}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function tD(e){if(!(e&&e.isTransparent()))return e}(0,tl.zy)((e,t)=>{let i=[{bracketColor:ta.sN,guideColor:ta.n4,guideColorActive:ta.bB},{bracketColor:ta.lQ,guideColor:ta.I2,guideColorActive:ta.WS},{bracketColor:ta.ss,guideColor:ta.Bo,guideColorActive:ta.Pe},{bracketColor:ta.l5,guideColor:ta.If,guideColorActive:ta.WD},{bracketColor:ta.sH,guideColor:ta.BD,guideColorActive:ta.P1},{bracketColor:ta.zp,guideColor:ta.IW,guideColorActive:ta.WY}],n=new tk.k,s=[{indentColor:ta.vV,indentColorActive:ta.H0},{indentColor:ta.ob,indentColorActive:ta.Am},{indentColor:ta.hz,indentColorActive:ta.tK},{indentColor:ta.ow,indentColorActive:ta.A3},{indentColor:ta.vP,indentColorActive:ta.tp},{indentColor:ta.CM,indentColorActive:ta.As}],o=i.map(t=>{let i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),o=tD(tD(n)??i?.transparent(.3)),r=tD(tD(s)??i);if(o&&r)return{guideColor:o,guideColorActive:r}}).filter(tS.O9),r=s.map(t=>{let i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=tD(i),o=tD(n);if(s&&o)return{indentColor:s,indentColorActive:o}}).filter(tS.O9);if(o.length>0){for(let e=0;e<30;e++){let i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){let i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}),i(23353);class tI extends tr{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ei.y(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(75);let t=e.get(76);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(109);let i=e.get(165);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,i=!0),(2===this._renderLineNumbers||3===this._renderLineNumbers)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(e,1));if(1!==t.column)return"";let i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){let e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0||i===this._context.viewModel.getLineCount()?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers){this._renderResult=null;return}let t=E.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(e=>!!e.options.lineNumberClassName);s.sort((e,t)=>en.Q.compareRangesUsingEnds(e.range,t.range));let o=0,r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){let n=e-i,l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(e,1)).lineNumber,h=this._getLineRenderLineNumber(e),d="";for(;o<s.length&&s[o].range.endLineNumber<e;)o++;for(let t=o;t<s.length;t++){let{range:i,options:n}=s[t];i.startLineNumber<=e&&(d+=" "+n.lineNumberClassName)}if(!h&&!d){a[n]="";continue}e===r&&0===this._context.viewModel.getLineLength(e)&&("off"===this._renderFinalNewline&&(h=""),"dimmed"===this._renderFinalNewline&&(d+=" dimmed-line-number")),l===this._activeModelLineNumber&&(d+=" active-line-number"),a[n]=`<div class="${tI.CLASS_NAME}${t}${d}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${h}</div>`}this._renderResult=a}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,tl.zy)((e,t)=>{let i=e.getColor(ta.Qt),n=e.getColor(ta.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}),i(32768);let tN="monaco-mouse-cursor-text";i(90289);class tE{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class tM{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(59);this.renderWhitespace=i.get(113),this.experimentalWhitespaceRendering=i.get(47),this.renderControlCharacters=i.get(108),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(40),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(75),this.stopRenderingLineAfter=i.get(133),this.fontLigatures=i.get(60),this.verticalScrollbarSize=i.get(117).verticalScrollbarSize,this.useGpu="on"===i.get(46)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.experimentalWhitespaceRendering===e.experimentalWhitespaceRendering&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.useGpu===e.useGpu}}class tT{constructor(){this._currentVisibleRange=new en.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class tR{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class tO{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e<i;e++){const i=t[e];o=Math.min(o,i.startLineNumber),r=Math.max(r,i.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=r}}class tP extends J{static{this.HORIZONTAL_EXTRA_PX=30}constructor(e,t,i){super(e);const n=this._context.configuration,s=this._context.configuration.options,o=s.get(59),r=s.get(166);this._lineHeight=s.get(75),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=s.get(114),this._cursorSurroundingLines=s.get(35),this._cursorSurroundingLinesStyle=s.get(36),this._canUseLayerHinting=!s.get(39),this._viewLineOptions=new tM(n,this._context.theme.type),this._linesContent=i,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new e2(this._context,{createLine:()=>new et.G(t,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,ee.write(this.domNode,8),this.domNode.setClassName(`view-lines ${tN}`),(0,L.M)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new eF.uC(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new eF.uC(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new tT,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(131).enabled,this._maxNumberStickyLines=s.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(166)&&(this._maxLineWidth=0);let t=this._context.configuration.options,i=t.get(59),n=t.get(166);return this._lineHeight=t.get(75),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(114),this._cursorSurroundingLines=t.get(35),this._cursorSurroundingLinesStyle=t.get(36),this._canUseLayerHinting=!t.get(39),this._stickyScrollEnabled=t.get(131).enabled,this._maxNumberStickyLines=t.get(131).maxLineCount,(0,L.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=new tM(this._context.configuration,this._context.theme.type);if(!this._viewLineOptions.equals(e)){this._viewLineOptions=e;let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let e=t;e<=i;e++)this._visibleLines.getVisibleLine(e).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e,this._viewLineOptions.useGpu);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new tR(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new tO(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let i=this._getViewLineDomNode(e);if(null===i)return null;let n=this._getLineNumberFor(i);if(-1===n||n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new ei.y(n,1);let s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<s||n>o)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t),a=this._context.viewModel.getLineMinColumn(n);return r<a&&(r=a),new ei.y(n,r)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===et.G.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return -1}getLineWidth(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();if(e<t||e>i)return -1;let n=new tE(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let i=e.endLineNumber,n=en.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],o=0,r=new tE(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(n.startLineNumber,1)).lineNumber);let l=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>h)continue;let d=e===n.startLineNumber?n.startColumn:1,c=e!==i,u=c?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,u,r);if(g){if(t&&e<i){let t=a;if(t!==(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ei.y(e+1,1)).lineNumber)){let e=g.ranges[g.ranges.length-1];e.width+=this._typicalHalfwidthCharacterWidth,this._context.viewModel.getTextDirection(t)===er.z4.RTL&&(e.left-=this._typicalHalfwidthCharacterWidth)}}s[o++]=new eY.BG(g.outsideRenderedLine,e,eY.Y.from(g.ranges),c)}}return(this._updateLineWidthsSlowIfDomDidLayout(r),0===o)?null:s}_visibleRangesForLineRange(e,t,i){if(this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())return null;let n=new tE(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}_lineIsRenderedRTL(e){return!(e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())&&this._visibleLines.getVisibleLine(e).isRenderedRTL()}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new eY.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){!e.didDomLayout||this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow())}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=1,s=!0;for(let o=t;o<=i;o++){let t=this._visibleLines.getVisibleLine(o);if(e&&!t.getWidthIsFast()){s=!1;continue}n=Math.max(n,t.getWidth(null))}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1,i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){let i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){let n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw Error("Not supported")}render(){throw Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||e.hasRTL||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),E.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,s,o){let r,a,l,h,d=e.top,c=e.height,u=d+c;if(s&&s.length>0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;i<n;i++){let n=s[i];e=Math.min(e,n.startLineNumber),t=Math.max(t,n.endLineNumber)}r=!1,a=this._context.viewLayout.getVerticalOffsetForLineNumber(e),l=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return -1;r=!0,a=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),l=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}let g=("mouse"===t||i)&&"default"===this._cursorSurroundingLinesStyle,p=0,m=0;if(g)i||(p=this._lineHeight);else{let e=Math.min(c/this._lineHeight/2,Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0));p=e*this._lineHeight,m=Math.max(0,e-1)*this._lineHeight}if(i||0!==o&&4!==o||(m+=this._lineHeight),a-=p,(l+=m)-a>c){if(!r)return -1;h=a}else if(5===o||6===o)if(6===o&&d<=a&&l<=u)h=d;else{let e=a-Math.max(5*this._lineHeight,.2*c);h=Math.max(l-c,e)}else h=1===o||2===o?2===o&&d<=a&&l<=u?d:Math.max(0,(a+l)/2-c/2):this._computeMinimumScrolling(d,u,a,l,3===o,4===o);return h}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(165),n=t.left,s=n+t.width-i.verticalScrollbarWidth,o=0x40000000,r=0,a=!1;if("range"===e.type){a=this._lineIsRenderedRTL(e.lineNumber);let t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(let e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(let t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;let e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(a||=this._lineIsRenderedRTL(t.startLineNumber),!e)return null;for(let t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return(e.minimalReveal||(o=Math.max(0,o-tP.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width)?null:{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r,hasRTL:a}}_computeMinimumScrolling(e,t,i,n,s,o){e|=0,t|=0,i|=0,n|=0,s=!!s,o=!!o;let r=t-e;return!(n-i<r)||s?i:o?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e}}i(27895);class tA extends tv{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(165);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e],o=s.options.linesDecorationsClassName,r=s.options.zIndex;o&&(i[n++]=new tm(s.range.startLineNumber,s.range.endLineNumber,o,s.options.linesDecorationsTooltip??null,r));let a=s.options.firstLineDecorationClassName;a&&(i[n++]=new tm(s.range.startLineNumber,s.range.startLineNumber,a,s.options.linesDecorationsTooltip??null,r))}return i}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',o=[];for(let e=t;e<=i;e++){let i=e-t,r=n[i].getDecorations(),a="";for(let e of r){let t='<div class="cldr '+e.className;null!==e.tooltip&&(t+='" title="'+e.tooltip),t+=s,a+=t}o[i]=a}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i(36527);class tF extends J{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setClassName(tF.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,Y.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(tF.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}i(96025);class tB extends tv{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e],o=s.options.marginClassName,r=s.options.zIndex;o&&(i[n++]=new tm(s.range.startLineNumber,s.range.endLineNumber,o,null,r))}return i}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=[];for(let e=t;e<=i;e++){let i=e-t,o=n[i].getDecorations(),r="";for(let e of o)r+='<div class="cmdr '+e.className+'" style=""></div>';s[i]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i(6469);var tW=i(1979);class tH{static{this.Empty=new tH(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=tH._clamp(e),this.g=tH._clamp(t),this.b=tH._clamp(i),this.a=tH._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}var tV=i(39894);class tz extends k.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.lC)(new tz)),this._INSTANCE}constructor(){super(),this._onDidChange=new S.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(tV.dG.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=tV.dG.getColorMap();if(!e){this._colors=[tH.Empty],this._backgroundIsLight=!0;return}this._colors=[tH.Empty];for(let t=1;t<e.length;t++){let i=e[t].rgba;this._colors[t]=new tH(i.r,i.g,i.b,Math.round(255*i.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var tU=i(11671);let tj=(()=>{let e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var t$=i(78355);class tK{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=tK.soften(e,.8),this.charDataLight=tK.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=(0,t$.W)(e[n]*t);return i}renderChar(e,t,i,n,s,o,r,a,l,h,d){var c,u;let g=+this.scale,p=2*this.scale,m=d?1:p;if(t+g>e.width||i+m>e.height)return void console.warn("bad render request outside image data");let f=h?this.charDataLight:this.charDataNormal,_=(c=n,u=l,(c-=32)<0||c>96?u<=2?(c+96)%96:95:c),v=4*e.width,b=r.r,C=r.g,w=r.b,y=s.r-b,S=s.g-C,k=s.b-w,x=Math.max(o,a),L=e.data,D=_*g*p,I=i*v+4*t;for(let e=0;e<m;e++){let e=I;for(let t=0;t<g;t++){let t=f[D++]/255*(o/255);L[e++]=b+y*t,L[e++]=C+S*t,L[e++]=w+k*t,L[e++]=x}I+=v}}blockRenderChar(e,t,i,n,s,o,r,a){let l=+this.scale,h=2*this.scale,d=a?1:h;if(t+l>e.width||i+d>e.height)return void console.warn("bad render request outside image data");let c=4*e.width,u=s/255*.5,g=o.r,p=o.g,m=o.b,f=n.r-g,_=n.g-p,v=n.b-m,b=g+f*u,C=p+_*u,w=m+v*u,y=Math.max(s,r),S=e.data,k=i*c+4*t;for(let e=0;e<d;e++){let e=k;for(let t=0;t<l;t++)S[e++]=b,S[e++]=C,S[e++]=w,S[e++]=y;k+=c}}}var tG=i(67418);let tq={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},tQ=e=>{let t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=tq[e[i]]<<4|15&tq[e[i+1]];return t},tY={1:(0,tG.P)(()=>tQ("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,tG.P)(()=>tQ("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class tZ{static create(e,t){let i;return this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily?this.lastCreated:(i=tY[e]?new tK(tY[e](),e):tZ.createFromSampleData(tZ.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i)}static createSampleData(e){let t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(let e of tj)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw Error("Unexpected source in MinimapCharRenderer");return new tK(tZ._downsample(e,t),t)}static _downsampleChar(e,t,i,n,s){let o=+s,r=2*s,a=n,l=0;for(let n=0;n<r;n++){let s=n/r*16,h=(n+1)/r*16;for(let n=0;n<o;n++){let r=n/o*10,d=(n+1)/o*10,c=0,u=0;for(let i=s;i<h;i++){let n=t+3840*Math.floor(i),s=1-(i-Math.floor(i));for(let t=r;t<d;t++){let i=1-(t-Math.floor(t)),o=n+4*Math.floor(t),r=i*s;u+=r,c+=e[o]*e[o+3]/255*r}}let g=c/u;l=Math.max(l,g),i[a++]=(0,t$.W)(g)}}return l}static _downsample(e,t){let i=2*t*1*t,n=96*i,s=new Uint8ClampedArray(n),o=0,r=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,r,s,o,t)),o+=i,r+=40;if(a>0){let e=255/a;for(let t=0;t<n;t++)s[t]*=e}return s}}var tX=i(35683);let tJ=E.uF?'"Segoe WPC", "Segoe UI", sans-serif':E.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif';var t0=i(56636);class t1{constructor(e,t,i){const n=e.options,s=n.get(163),o=n.get(165),r=o.minimap,a=n.get(59),l=n.get(81);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(119),this.paddingTop=n.get(96).top,this.paddingBottom=n.get(96).bottom,this.showSlider=l.showSlider,this.autohide=l.autohide,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(75),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=o.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=+this.fontScale,this.sectionHeaderFontFamily=tJ,this.sectionHeaderFontSize=l.sectionHeaderFontSize*s,this.sectionHeaderLetterSpacing=l.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=t1._getSectionHeaderColor(t,i.getColor(1)),this.charRenderer=(0,tG.P)(()=>tZ.create(this.fontScale,a.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=t1._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=t1._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let i=e.getColor(tU.ILr);return i?new tH(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(tU.K1Z);return t?tH._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){let i=e.getColor(tU.By2);return i?new tH(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class t2{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,h,d){let c,u,g=e.pixelRatio,p=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/p),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));let i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(h-s),d=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new t2(l,h,n>0,o,l*o,i,Math.floor(e.paddingTop/e.lineHeight),1,Math.min(r,d))}c=o&&i!==r?Math.floor((i-t+1)*p/g):Math.floor(s/f*p/g);let _=Math.floor(e.paddingTop/f),v=Math.floor(e.paddingBottom/f);e.scrollBeyondLastLine&&(v=Math.max(v,s/f-1)),u=v>0?(_+r+v-s/f-1)*p/g:Math.max(0,(_+r)*p/g-c);let b=(u=Math.min(e.minimapHeight-c,u))/(h-s),C=l*b;if(m>=_+r+v)return new t2(l,h,u>0,b,C,c,_,1,r);{let i,s,o=Math.max(1,Math.floor((t>1?t+_:Math.max(1,l/f))-C*g/p));o<_?(i=_-o+1,o=1):(i=0,o=Math.max(1,o-_)),d&&d.scrollHeight===h&&(d.scrollTop>l&&(o=Math.min(o,d.startLineNumber),i=Math.max(i,d.topPaddingLineCount)),d.scrollTop<l&&(o=Math.max(o,d.startLineNumber),i=Math.min(i,d.topPaddingLineCount)));let a=Math.min(r,o-i+m-1),u=(l-n)/f;return s=l>=e.paddingTop?(t-o+i+u)*p/g:l/e.paddingTop*(i+u)*p/g,new t2(l,h,!0,b,s,c,i,o,a)}}}class t5{static{this.INVALID=new t5(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class t4{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new e1({createLine:()=>t5.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;let t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){let e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class t3{constructor(e,t,i,n){this._backgroundFillData=t3._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;let e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){let n=i.r,s=i.g,o=i.b,r=i.a,a=new Uint8ClampedArray(e*t*4),l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=s,a[l+2]=o,a[l+3]=r,l+=4;return a}}class t7{static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];let{minimapLineCount:n}=B.xZ.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),s=t/n,o=s/2;if(!i||0===i.minimapLines.length){let e=[];if(e[0]=1,n>1){for(let t=0,i=n-1;t<i;t++)e[t]=Math.round(t*s+o);e[n-1]=t}return[new t7(s,e),[]]}let r=i.minimapLines,a=r.length,l=[],h=0,d=0,c=1,u=[],g=null;for(let e=0;e<n;e++){let i,p=Math.max(c,Math.round(e*s)),m=Math.max(p,Math.round((e+1)*s));for(;h<a&&r[h]<p;){if(u.length<10){let e=h+1+d;g&&"deleted"===g.type&&g._oldIndex===h-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:h,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),d--}h++}if(h<a&&r[h]<=m)i=r[h],h++;else if(i=0===e?1:e+1===n?t:Math.round(e*s+o),u.length<10){let t=h+1+d;g&&"inserted"===g.type&&g._i===e-1?g.insertToLineNumber++:(g={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},u.push(g)),d++}l[e]=i,c=i}if(u.length<10)for(;h<a;){let e=h+1+d;g&&"deleted"===g.type&&g._oldIndex===h-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:h,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),d--,h++}else u=[{type:"flush"}];return[new t7(s,l),u]}constructor(e,t){this.samplingRatio=e,this.minimapLines=t}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){let n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]<e.fromLineNumber);s--)this.minimapLines[s]<=e.toLineNumber?(this.minimapLines[s]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,s),n=Math.max(n,s)):this.minimapLines[s]-=t;return[i,n]}onLinesInserted(e){let t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class t9 extends J{constructor(e){super(e),this._sectionHeaderCache=new tX.qK(10,1.5),this.tokensColorTracker=tz.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new t1(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=t7.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new t8(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){let e=new t1(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(!this._samplingState)return this._actual.onLinesChanged(e.fromLineNumber,e.count);{let t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return!!t&&this._actual.onLinesChanged(t[0],t[1]-t[0]+1)}}onLinesDeleted(e){if(!this._samplingState)return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber);{let[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i-t+1),this._shouldCheckSampling=!0,!0}}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged(e)}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(!this._samplingState)return this._actual.onTokensChanged(e.ranges);{let t=[];for(let i of e.ranges){let e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));let n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,i]=t7.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,o=t-e+1;s<o;s++)i[s]?n[s]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+s-1]):n[s]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState)for(let e of(this._minimapSelections=[],this._selections)){let[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new ek.L(t,e.startColumn,i,e.endColumn))}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){return this._getMinimapDecorationsInViewport(e,t).filter(e=>!e.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(e,t){let i=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return e=Math.floor(Math.max(1,e-i)),this._getMinimapDecorationsInViewport(e,t).filter(e=>!!e.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){let n=this._samplingState.minimapLines[e-1],s=this._samplingState.minimapLines[t-1];i=new en.Q(n,1,s,this._context.viewModel.getLineMaxColumn(s))}else i=new en.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));let n=this._context.viewModel.getMinimapDecorationsInRange(i);if(this._samplingState){let e=[];for(let t of n){if(!t.options.minimap)continue;let i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),s=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new t0.vo(new en.Q(n,i.startColumn,s,i.endColumn),t.options))}return e}return n}getSectionHeaderText(e,t){let i=e.options.minimap?.sectionHeaderText;if(!i)return null;let n=this._sectionHeaderCache.get(i);if(n)return n;let s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new en.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class t8 extends k.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(tU.yr0),this._domNode=(0,Y.Z)(document.createElement("div")),ee.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,Y.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,Y.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,Y.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,Y.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,Y.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new eF.uC(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register(w.un(this._domNode.domNode,w.Bx.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register(w.un(this._domNode.domNode,w.Bx.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=w.un(this._domNode.domNode,w.Bx.POINTER_DOWN,e=>{e.preventDefault();let t="mouse"===e.pointerType,i=0===e.button;if(0!==this._model.options.renderMinimap&&this._lastRenderData){if("proportional"!==this._model.options.size){if(i&&this._lastRenderData){let t=w.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}if(i||!t){let t=this._model.options.minimapLineHeight,i=Math.floor(this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;i=Math.min(i,this._model.getLineCount()),this._model.revealLineNumber(i)}}}),this._sliderPointerMoveMonitor=new tW._,this._sliderPointerDownListener=w.un(this._slider.domNode,w.Bx.POINTER_DOWN,e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ew.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=w.ko(this._domNode.domNode,ew.B.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=w.ko(this._domNode.domNode,ew.B.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=w.un(this._domNode.domNode,ew.B.End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){this._isMouseOverMinimap?this._hideSoon():this._domNode.toggleClassName("active",!1)}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;let n=e.pageX;this._slider.toggleClassName("active",!0);let s=(e,s)=>{let o=w.BK(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));E.uF&&r>140?this._model.setScrollTop(i.scrollTop):this._model.setScrollTop(i.getDesiredScrollTopFromDelta(e-t))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>s(e.pageY,e.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),"mouseover"===this._model.options.autohide?e.push("minimap-autohide-mouseover"):"scroll"===this._model.options.autohide&&e.push("minimap-autohide-scroll"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return!this._buffers&&this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new t3(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(e){return"scroll"===this._model.options.autohide&&(e.scrollTopChanged||e.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(tU.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let t=t2.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(en.Q.compareRangesUsingStarts);let i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0));let{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);let h=new t6(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,h,e,o),this._renderDecorationsLineHighlights(l,i,h,e,o);let d=new t6(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(let a of t){let t=n.intersectWithViewport(a);if(!t)continue;let[l,h]=t;for(let e=l;e<=h;e++)i.set(e,!0);let d=n.getYForLineNumber(l,s),c=n.getYForLineNumber(h,s);r>=d||(r>o&&e.fillRect(B.xq,o,e.canvas.width,r-o),o=d),r=c}r>o&&e.fillRect(B.xq,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){let o=new Map;for(let r=t.length-1;r>=0;r--){let a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;let h=n.intersectWithViewport(a.range);if(!h)continue;let[d,c]=h,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=c;t++){if(i.has(t))continue;i.set(t,!0);let o=n.getYForLineNumber(d,s);e.fillRect(B.xq,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let l of t){let t=n.intersectWithViewport(l);if(!t)continue;let[h,d]=t;for(let t=h;t<=d;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(let l of t){let t=l.options.minimap;if(!t)continue;let h=n.intersectWithViewport(l.range);if(!h)continue;let[d,c]=h,u=t.getColor(this._theme.value);if(!(!u||u.isTransparent()))for(let h=d;h<=c;h++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,u,n,h,s,s,o,r,a);continue;case 2:{let t=n.getYForLineNumber(h,s);this.renderDecoration(e,u,2,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,h,d){let c=s.getYForLineNumber(o,a);if(c+r<0||c>this._model.options.canvasInnerHeight)return;let{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,m=g===o?i.endColumn:this._model.getLineMaxColumn(o),f=this.getXOffsetForPosition(t,o,p,l,h,d),_=this.getXOffsetForPosition(t,o,m,l,h,d);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return B.xq;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){let i=this._model.getLineContent(t);r=[B.xq];let a=B.xq;for(let e=1;e<i.length+1;e++){let t=i.charCodeAt(e-1),l=a+(9===t?n*s:eB.ne(t)?2*s:s);if(l>=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1<r.length?r[i-1]:o}renderDecoration(e,t,i,n,s,o){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,s,o)}_renderSectionHeaders(e){let t=this._model.options.minimapLineHeight,i=this._model.options.sectionHeaderFontSize,n=this._model.options.sectionHeaderLetterSpacing,s=1.5*i,{canvasInnerWidth:o}=this._model.options,r=this._model.options.backgroundColor,a=`rgb(${r.r} ${r.g} ${r.b} / .7)`,l=this._model.options.sectionHeaderFontColor,h=`rgb(${l.r} ${l.g} ${l.b})`,d=this._decorationsCanvas.domNode.getContext("2d");d.letterSpacing=n+"px",d.font="500 "+i+"px "+this._model.options.sectionHeaderFontFamily,d.strokeStyle=h,d.lineWidth=.4;let c=this._model.getSectionHeaderDecorationsInViewport(e.startLineNumber,e.endLineNumber);c.sort((e,t)=>e.range.startLineNumber-t.range.startLineNumber);let u=t8._fitSectionHeader.bind(null,d,o-B.xq);for(let n of c){let r=e.getYForLineNumber(n.range.startLineNumber,t)+i,l=r-i,c=l+2,g=this._model.getSectionHeaderText(n,u);t8._renderSectionLabel(d,g,n.options.minimap?.sectionHeaderStyle===2,a,h,o,l,s,r,c)}}static _fitSectionHeader(e,t,i){if(!i)return i;let n=e.measureText(i).width,s=e.measureText("…").width;if(n<=t||n<=s)return i;let o=i.length,r=Math.floor((t-s)/(n/i.length))-1,a=Math.ceil(r/2);for(;a>0&&/\s/.test(i[a-1]);)--a;return i.substring(0,a)+"…"+i.substring(o-(r-a))}static _renderSectionLabel(e,t,i,n,s,o,r,a,l,h){t&&(e.fillStyle=n,e.fillRect(0,r,o,a),e.fillStyle=s,e.fillText(t,B.xq,l)),i&&(e.beginPath(),e.moveTo(0,h),e.lineTo(o,h),e.closePath(),e.stroke())}renderLines(e){let t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){let t=this._lastRenderData._get();return new t4(e,t.imageData,t.lines)}let s=this._getBuffer();if(!s)return null;let[o,r,a]=t8._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),h=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,c=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,C=n>b?Math.floor((n-b)/2):0,w=c.a/255,y=new tH(Math.round((c.r-d.r)*w+d.r),Math.round((c.g-d.g)*w+d.g),Math.round((c.b-d.b)*w+d.b),255),S=e.topPaddingLineCount*n,k=[];for(let e=0,o=i-t+1;e<o;e++)a[e]&&t8._renderLine(s,y,c.a,p,m,v,g,u,f,S,C,h,l[e],_,n),k[e]=new t5(S),S+=n;let x=-1===o?0:o,L=-1===r?s.height:r;return this._canvas.domNode.getContext("2d").putImageData(s,0,0,0,x,s.width,L-x),new t4(e,s,k)}static _renderUntouchedLines(e,t,i,n,s,o){let r=[];if(!o){for(let e=0,t=n-i+1;e<t;e++)r[e]=!0;return[-1,-1,r]}let a=o._get(),l=a.imageData.data,h=a.rendLineNumberStart,d=a.lines,c=d.length,u=e.width,g=e.data,p=(n-i+1)*s*u*4,m=-1,f=-1,_=-1,v=-1,b=-1,C=-1,w=t*s;for(let e=i;e<=n;e++){let t=e-i,n=e-h,o=n>=0&&n<c?d[n].dy:-1;if(-1===o){r[t]=!0,w+=s;continue}let a=o*u*4,y=(o+s)*u*4,S=w*u*4,k=(w+s)*u*4;v===a&&C===S?v=y:(-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),_=a,v=y,b=S),C=k,r[t]=!1,w+=s}return -1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),[-1===m?-1:m/(4*u),-1===f?-1:f/(4*u),r]}static _renderLine(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){let m=u.content,f=u.tokens,_=e.width-o,v=1===p,b=B.xq,C=0,w=0;for(let u=0,p=f.getCount();u<p;u++){let p=f.getEndOffset(u),y=f.getForeground(u),S=r.getColor(y);for(;C<p;C++){if(b>_)return;let r=m.charCodeAt(C);if(9===r){let e=c-(C+w)%c;w+=e-1,b+=e*o}else if(32===r)b+=o;else{let c=eB.ne(r)?2:1;for(let u=0;u<c;u++)if(2===s?l.blockRenderChar(e,b,h+d,S,a,t,i,v):l.renderChar(e,b,h+d,r,S,a,t,i,g,n,v),(b+=o)>_)return}}}}}class t6{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}i(72273);class ie extends J{constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,Y.Z)(document.createElement("div")),ee.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,Y.Z)(document.createElement("div")),ee.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}_widgetCanOverflow(e){let t=this._context.configuration.options.get(4);return(e.allowEditorOverflow||!1)&&t}addWidget(e){let t=(0,Y.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._widgetCanOverflow(e)?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOridinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0,t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){let n=t[i],s=this._widgets[n],o=s.widget.getMinContentWidthInPx?.();void 0!==o&&(e=Math.max(e,o))}this._context.viewLayout.setOverlayWidgetsMinWidth(e)}_renderWidget(e,t){let i=e.domNode;if(null===e.preference)return void i.setTop("");let n=2*this._verticalScrollbarWidth+this._minimapWidth;if(0===e.preference||1===e.preference){if(1===e.preference){let e=i.domNode.clientHeight;i.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight)}else i.setTop(0);void 0!==e.stack?(i.setTop(t[e.preference]),t[e.preference]+=i.domNode.clientWidth):i.setRight(n)}else if(2===e.preference)i.domNode.style.right="50%",void 0!==e.stack?(i.setTop(t[2]),t[2]+=i.domNode.clientHeight):i.setTop(0);else{let{top:t,left:n}=e.preference;if(this._context.configuration.options.get(51)&&this._widgetCanOverflow(e.widget)){let e=this._viewDomNodeRect;i.setTop(t+e.top),i.setLeft(n+e.left),i.setPosition("fixed")}else i.setTop(t),i.setLeft(n),i.setPosition("absolute")}}prepareRender(e){this._viewDomNodeRect=w.BK(this._viewDomNode.domNode)}render(e){this._domNode.setWidth(this._editorWidth);let t=Object.keys(this._widgets),i=Array.from({length:3},()=>0);t.sort((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0));for(let e=0,n=t.length;e<n;e++){let n=t[e];this._renderWidget(this._widgets[n],i)}}}var it=i(30430),ii=i(10007);class is{constructor(e,t){const i=e.options;this.lineHeight=i.get(75),this.pixelRatio=i.get(163),this.overviewRulerLanes=i.get(95),this.renderBorder=i.get(94);const n=t.getColor(ta.x9);this.borderColor=n?n.toString():null,this.hideCursor=i.get(68);const s=t.getColor(ta.D0);this.cursorColorSingle=s?s.transparent(.7).toString():null;const o=t.getColor(ta.sC);this.cursorColorPrimary=o?o.transparent(.7).toString():null;const r=t.getColor(ta.we);this.cursorColorSecondary=r?r.transparent(.7).toString():null,this.themeType=t.type;const a=i.get(81),l=a.enabled,h=a.side,d=t.getColor(ta.Xr),c=tV.dG.getDefaultBackground();d?this.backgroundColor=d:l&&"right"===h?this.backgroundColor=c:this.backgroundColor=null;const u=i.get(165).overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[g,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=g,this.w=p}_initLanes(e,t,i){let n=t-e;if(i>=3){let t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2!==i)return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]];{let t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&it.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class io extends J{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,Y.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=tV.dG.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new ei.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new is(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++){let n=this._settings.cursorColorSingle;i>1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort((e,t)=>ei.y.compare(e.position,t.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){let e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes){this._domNode.setBackgroundColor(e?it.Q1.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}let t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(ii.Uv.compareByRenderingProps),1!==this._actualShouldRender||ii.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,I.aI)(this._renderedCursorPositions,this._cursorPositions,(e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color)||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,h=this._domNode.domNode.getContext("2d");e?(e.isOpaque()||h.clearRect(0,0,i,n),h.fillStyle=it.Q1.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):h.clearRect(0,0,i,n);let d=this._settings.x,c=this._settings.w;for(let e of t){let t=e.color,i=e.data;h.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;e<t;e++){let t=i[3*e],m=i[3*e+1],f=i[3*e+2],_=o.getVerticalOffsetForLineNumber(m)*r|0,v=(o.getVerticalOffsetForLineNumber(f)+s)*r|0;if(v-_<a){let e=(_+v)/2|0;e<l?e=l:e+l>n&&(e=n-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&h.fillRect(d[u],g,c[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}h.fillRect(d[u],g,c[u],p-g)}if(!this._settings.hideCursor){let e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7],a=-100,l=-100,d=null;for(let c=0,u=this._cursorPositions.length;c<u;c++){let u=this._cursorPositions[c].color;if(!u)continue;let g=this._cursorPositions[c].position,p=o.getVerticalOffsetForLineNumber(g.lineNumber)*r|0;p<t?p=t:p+t>n&&(p=n-t);let m=p-t,f=m+e;m>l+1||u!==d?(0!==c&&d&&h.fillRect(i,a,s,l-a),a=m,l=f):f>l&&(l=f),d=u,h.fillStyle=u}d&&h.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,n),h.moveTo(1,0),h.lineTo(i,0),h.stroke())}}var ir=i(78624);class ia extends X.i{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,Y.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new ir.rW(e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(75)),this._zoneManager.setPixelRatio(i.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(75)&&(this._zoneManager.setLineHeight(t.get(75)),this._render()),e.hasChanged(163)&&(this._zoneManager.setPixelRatio(t.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(let a of t){let t=a.colorId,l=a.from,h=a.to;t!==s?(e.fillRect(0,o,n,r-o),e.fillStyle=i[s=t],o=l,r=h):r>=l?r=Math.max(r,h):(e.fillRect(0,o,n,r-o),o=l,r=h)}e.fillRect(0,o,n,r-o)}}i(41949);class il extends J{constructor(e){super(e),this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){let{tabSize:i}=this._context.viewModel.model.getOptions(),n=t-e;for(;n>0;){let e=(0,Y.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(i),this.domNode.appendChild(e),this._renderedRulers.push(e),n--}return}let i=e-t;for(;i>0;){let e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){let i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}i(36693);class ih extends J{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(117);this._useShadows=t.useShadows,this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){let e=this._context.configuration.options.get(165);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){let t=this._context.configuration.options.get(117);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}i(48186);class id{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class ic{constructor(e,t){this.lineNumber=e,this.ranges=t}}function iu(e){return new id(e)}function ig(e){return new ic(e.lineNumber,e.ranges.map(iu))}class ip extends tr{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){let n=this._typicalHalfwidthCharacterWidth/4,s=null,o=null;if(i&&i.length>0&&t.length>0){let n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e<i.length;e++)i[e].lineNumber===n&&(s=i[e].ranges[0]);let r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!o&&e>=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let e=0,i=t.length;e<i;e++){let r=t[e].ranges[0],a=r.left,l=r.left+r.width,h={top:0,bottom:0},d={top:0,bottom:0};if(e>0){let i=t[e-1].ranges[0].left,s=t[e-1].ranges[0].left+t[e-1].ranges[0].width;im(a-i)<n?h.top=2:a>i&&(h.top=1),im(l-s)<n?d.top=2:i<l&&l<s&&(d.top=1)}else s&&(h.top=s.startStyle.top,d.top=s.endStyle.top);if(e+1<i){let i=t[e+1].ranges[0].left,s=t[e+1].ranges[0].left+t[e+1].ranges[0].width;im(a-i)<n?h.bottom=2:i<a&&a<s&&(h.bottom=1),im(l-s)<n?d.bottom=2:l<s&&(d.bottom=1)}else o&&(h.bottom=o.startStyle.bottom,d.bottom=o.endStyle.bottom);r.startStyle=h,r.endStyle=d}}_getVisibleRangesWithStyle(e,t,i){let n=(t.linesVisibleRangesForRange(e,!0)||[]).map(ig);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,s){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;bottom:"+t.toString()+"px;left:"+n.toString()+"px;width:"+s.toString()+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;let s=!!n[0].ranges[0].startStyle,o=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a<l;a++){let l=n[a],h=l.lineNumber,d=h-t,c=i?+(h===o):0,u=i?+(h!==o&&h===r):0,g="",p="";for(let e=0,t=l.ranges.length;e<t;e++){let t=l.ranges[e];if(s){let e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){g+=this._createSelectionPiece(c,u,ip.SELECTION_CLASS_NAME,t.left-ip.ROUNDED_PIECE_WIDTH,ip.ROUNDED_PIECE_WIDTH);let i=ip.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+ip.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+ip.SELECTION_BOTTOM_RIGHT),g+=this._createSelectionPiece(c,u,i,t.left-ip.ROUNDED_PIECE_WIDTH,ip.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){g+=this._createSelectionPiece(c,u,ip.SELECTION_CLASS_NAME,t.left+t.width,ip.ROUNDED_PIECE_WIDTH);let e=ip.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+ip.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+ip.SELECTION_BOTTOM_LEFT),g+=this._createSelectionPiece(c,u,e,t.left+t.width,ip.ROUNDED_PIECE_WIDTH)}}let i=ip.SELECTION_CLASS_NAME;if(s){let e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+ip.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+ip.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+ip.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+ip.SELECTION_BOTTOM_RIGHT)}p+=this._createSelectionPiece(c,u,i,t.left,t.width)}e[d][0]+=g,e[d][1]+=p}}prepareRender(e){let t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];let s=[];for(let n=0,o=this._selections.length;n<o;n++){let o=this._selections[n];if(o.isEmpty()){s[n]=null;continue}let r=this._getVisibleRangesWithStyle(o,e,this._previousFrameVisibleRangesWithStyle[n]);s[n]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function im(e){return e<0?-e:e}(0,tl.zy)((e,t)=>{let i=e.getColor(tU.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}),i(58190);class i_{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}(o=p||(p={}))[o.Single=0]="Single",o[o.MultiPrimary=1]="MultiPrimary",o[o.MultiSecondary=2]="MultiSecondary";class iv{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(59);this._cursorStyle=i.get(161),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=i.get(38),this._isVisible=!0,this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${tN}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),(0,L.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ei.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case p.Single:this._pluralityClass="";break;case p.MultiPrimary:this._pluralityClass="cursor-primary";break;case p.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(59);return this._cursorStyle=t.get(161),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=t.get(38),(0,L.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=eB.m(i,t-1);return[new ei.y(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="",[n,s]=this._getGraphemeAwarePosition(),o=this._context.viewLayout.getLineHeightForLineNumber(n.lineNumber),r=0===this._lineCursorHeight?o:Math.min(o,this._lineCursorHeight),a=(o-r)/2;if(this._cursorStyle===B.m9.Line||this._cursorStyle===B.m9.LineThin){let o,l=e.visibleRangeForPosition(n);if(!l||l.outsideRenderedLine)return null;let h=w.zk(this._domNode.domNode);this._cursorStyle===B.m9.Line?(o=w.vT(h,this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(t=s,i=this._getTokenClassName(n)):o=w.vT(h,1);let d=l.left,c=0;return o>=2&&d>=1&&(d-=c=1),new i_(e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta+a,d,c,o,r,t,i)}let l=e.linesVisibleRangesForRange(new en.Q(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!l||0===l.length)return null;let h=l[0];if(h.outsideRenderedLine||0===h.ranges.length)return null;let d=h.ranges[0],c=" "===s||d.width<1?this._typicalHalfwidthCharacterWidth:d.width;this._cursorStyle===B.m9.Block&&(t=s,i=this._getTokenClassName(n));let u=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,g=o;return(this._cursorStyle===B.m9.Underline||this._cursorStyle===B.m9.UnderlineThin)&&(u+=o-2,g=2),new i_(u,d.left,0,c,g,t,i)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${tN} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class ib extends J{static{this.BLINK_INTERVAL=500}constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new iv(this._context,p.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,Y.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new eF.pc,this._cursorFlatBlinkInterval=new w.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t,i){let n=this._secondaryCursors.length!==t.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==i;if(this._primaryCursor.setPlurality(t.length?p.MultiPrimary:p.Single),this._primaryCursor.onCursorPositionChanged(e,n),this._updateBlinking(),this._secondaryCursors.length<t.length){let e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){let e=new iv(this._context,p.MultiSecondary);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){let e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e],n)}onCursorStateChanged(e){let t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1),e.reason);let i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){let t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(let e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return(!this._isComposingInput||this._editContextEnabled)&&this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();let e=this._getCursorBlinking(),t=0===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||5===e||(1===e?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},ib.BLINK_INTERVAL,(0,w.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},ib.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(!this._selectionIsEmpty&&(e+=" has-selection"),this._cursorStyle){case B.m9.Line:e+=" cursor-line-style";break;case B.m9.Block:e+=" cursor-block-style";break;case B.m9.Underline:e+=" cursor-underline-style";break;case B.m9.LineThin:e+=" cursor-line-thin-style";break;case B.m9.BlockOutline:e+=" cursor-block-outline-style";break;case B.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return("on"===this._cursorSmoothCaretAnimation||"explicit"===this._cursorSmoothCaretAnimation)&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0,n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,s=this._secondaryCursors.length;n<s;n++){let s=this._secondaryCursors[n].render(e);s&&(t[i++]=s)}this._renderData=t}getLastRenderData(){return this._renderData}}(0,tl.zy)((e,t)=>{for(let i of[{class:".cursor",foreground:ta.D0,background:ta.kM},{class:".cursor-primary",foreground:ta.sC,background:ta.je},{class:".cursor-secondary",foreground:ta.we,background:ta.L0}]){let n=e.getColor(i.foreground);if(n){let s=e.getColor(i.background);s||(s=n.opposite()),t.addRule(`.monaco-editor .cursors-layer ${i.class} { background-color: ${n}; border-color: ${n}; color: ${s}; }`),(0,th.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${i.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}});let iC=()=>{throw Error("Invalid change accessor")};class iw extends J{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,Y.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,Y.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace(e=>{let n=Object.keys(this._zones);for(let s=0,o=n.length;s<o;s++){let o=n[s],r=this._zones[o],a=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=a.isInHiddenArea;let l=t.get(o);l&&(l.afterLineNumber!==a.afterViewLineNumber||l.height!==a.heightInPx)&&(e.changeOneWhitespace(o,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}}),i}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(75)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return e.ordinal??e.afterColumn??1e4}_computeWhitespaceProps(e){let t,i;if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};if(void 0!==e.afterColumn)t=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{let i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new ei.y(i,this._context.viewModel.model.getLineMaxColumn(i))}i=t.column===this._context.viewModel.model.getLineMaxColumn(t.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber,column:t.column+1});let n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t,e.afterColumnAffinity,!0),s=e.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!s,afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.viewModel.changeWhitespace(i=>{let n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};(function(e,t){try{e(t)}catch(e){(0,y.dz)(e)}})(e,n),n.addZone=iC,n.removeZone=iC,n.layoutZone=iC}),t}_addZone(e,t){let i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,Y.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,Y.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return!!this._zones.hasOwnProperty(e)&&!!this._zones[e].delegate.suppressMouseDown}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,y.dz)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,y.dz)(e)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,i={},n=!1;for(let e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);let s=Object.keys(this._zones);for(let t=0,n=s.length;t<n;t++){let n=s[t],o=this._zones[n],r=0,a=0,l="none";i.hasOwnProperty(n)?(r=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(r),o.domNode.setHeight(a),o.domNode.setDisplay(l),o.marginDomNode&&(o.marginDomNode.setTop(r),o.marginDomNode.setHeight(a),o.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}i(58293);var iy=i(35468);class iS extends tr{constructor(e){super(),this._context=e,this._options=new ik(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new ik(this._context.configuration);return this._options.equals(t)?e.hasChanged(165):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if("none"===this._options.renderWhitespace){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber-t+1,n=Array(i);for(let e=0;e<i;e++)n[e]=!0;this._renderResult=[];for(let t=e.viewportData.startLineNumber;t<=e.viewportData.endLineNumber;t++){let i=t-e.viewportData.startLineNumber,n=this._context.viewModel.getViewLineRenderingData(t),s=null;if("selection"===this._options.renderWhitespace)for(let e of this._selection){if(e.endLineNumber<t||e.startLineNumber>t)continue;let i=e.startLineNumber===t?e.startColumn:n.minColumn,o=e.endLineNumber===t?e.endColumn:n.maxColumn;i<o&&(s||(s=[]),s.push(new iy.L(i-1,o-1)))}this._renderResult[i]=this._applyRenderWhitespace(e,t,s,n)}}_applyRenderWhitespace(e,t,i,n){let s;if(n.hasVariableFonts||"selection"===this._options.renderWhitespace&&!i||"trailing"===this._options.renderWhitespace&&n.continuesWithWrappedLine)return"";let o=this._context.theme.getColor(ta.w4),r=this._options.renderWithSVG,a=n.content,l=-1===this._options.stopRenderingLineAfter?a.length:Math.min(this._options.stopRenderingLineAfter,a.length),h=n.continuesWithWrappedLine,d=n.minColumn-1,c="boundary"===this._options.renderWhitespace,u="trailing"===this._options.renderWhitespace,g=e.getLineHeightForLineNumber(t),p=this._options.middotWidth,m=this._options.wsmiddotWidth,f=this._options.spaceWidth,_=Math.abs(m-f)<Math.abs(p-f)?11825:183,v=this._options.canUseHalfwidthRightwardsArrow,b="",C=!1,w=eB.HG(a);-1===w?(C=!0,w=l,s=l):s=eB.lT(a);let y=0,S=i&&i[y],k=0;for(let n=d;n<l;n++){let o=a.charCodeAt(n);if(S&&S.endExclusive<=n&&(y++,S=i&&i[y]),9!==o&&32!==o||u&&!C&&n<=s)continue;if(c&&n>=w&&n<=s&&32===o){let e=n-1>=0?a.charCodeAt(n-1):0,t=n+1<l?a.charCodeAt(n+1):0;if(32!==e&&32!==t)continue}if(c&&h&&n===l-1){let e=n-1>=0?a.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&!(S&&S.start<=n&&n<S.endExclusive))continue;let d=e.visibleRangeForPosition(new ei.y(t,n+1));d&&(r?(k=Math.max(k,d.left),9===o?b+=this._renderArrow(g,f,d.left):b+=`<circle cx="${(d.left+f/2).toFixed(2)}" cy="${(g/2).toFixed(2)}" r="${(f/7).toFixed(2)}" />`):9===o?b+=`<div class="mwh" style="left:${d.left}px;height:${g}px;">${v?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:b+=`<div class="mwh" style="left:${d.left}px;height:${g}px;">${String.fromCharCode(_)}</div>`)}return r?(k=Math.round(k+f),`<svg style="bottom:0;position:absolute;width:${k}px;height:${g}px" viewBox="0 0 ${k} ${g}" xmlns="http://www.w3.org/2000/svg" fill="${o}">`+b+"</svg>"):b}_renderArrow(e,t,i){let n=e/2,s={x:0,y:t/7/2},o={x:.8*t,y:s.y},r={x:o.x-.2*o.x,y:o.y+.2*o.x},a={x:r.x+.1*o.x,y:r.y+.1*o.x},l={x:a.x+.35*o.x,y:a.y-.35*o.x},h={x:l.x,y:-l.y},d={x:a.x,y:-a.y},c={x:r.x,y:-r.y},u={x:o.x,y:-o.y},g={x:s.x,y:-s.y},p=[s,o,r,a,l,h,d,c,u,g].map(e=>`${(i+e.x).toFixed(2)} ${(n+e.y).toFixed(2)}`).join(" L ");return`<path d="M ${p}" />`}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class ik{constructor(e){const t=e.options,i=t.get(59),n=t.get(47);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(113),this.renderWithSVG=!0):(this.renderWhitespace=t.get(113),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(75),this.stopRenderingLineAfter=t.get(133)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class ix{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new en.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class iL{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class iD{constructor(e,t,i){this.configuration=e,this.theme=new iL(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var iI=i(51328),iN=i(55146),iE=i(41748),iM=i(78292),iT=i(16871),iR=i(57270),iO=i(5311),iP=i(93003);function iA(e,t){return e.isBasicASCII&&t.useMonospaceOptimizations?new iF(e):new iB(e)}class iF{constructor(e){this._content=e.content}getSegmentAtIndex(e){return this._content[e]}}class iB{constructor(e){this._segments=[];const t=e.content,i=Array.from(iP.x.Segmenter(void 0,{granularity:"grapheme"}).value.segment(t));let n=0;for(let e=0;e<t.length;e++){const t=i[n];if(!t)break;if(t.index!==e){this._segments.push(void 0);continue}n++,this._segments.push(t)}}getSegmentAtIndex(e){return this._segments[e]?.segment}}class iW extends X.i{get glyphRasterizer(){return this._glyphRasterizer.value}constructor(e,t,i,n){super(),this._context=e,this._viewGpuContext=t,this._device=i,this._glyphRasterizer=n,this._context.addEventHandler(this)}}let iH=`
|
|
187
187
|
struct GlyphInfo {
|
|
188
188
|
position: vec2f,
|
|
189
189
|
size: vec2f,
|