@codeyam/codeyam-cli 0.1.7 → 0.1.9
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/analyzer-template/.build-info.json +8 -8
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +9 -9
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +14 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +27 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +78 -2
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +19 -7
- package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +65 -28
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +83 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +23 -4
- package/analyzer-template/packages/aws/package.json +2 -2
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +93 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +94 -143
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +25 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +76 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +76 -90
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/ui-components/package.json +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +136 -43
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +17 -0
- package/analyzer-template/project/writeScenarioComponents.ts +36 -7
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +115 -34
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +12 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +29 -7
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +208 -11
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
- package/codeyam-cli/src/cli.js +2 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +45 -0
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +17 -7
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +14 -2
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +3215 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +107 -45
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/data/techStacks.js +77 -0
- package/codeyam-cli/src/data/techStacks.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +144 -0
- package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js +127 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +855 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +304 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +542 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +520 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +217 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +339 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +221 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +855 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +213 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1742 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +101 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +227 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +300 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +50 -4
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
- package/codeyam-cli/src/utils/analyzer.js +9 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/analyzerFinalization.js +96 -0
- package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
- package/codeyam-cli/src/utils/backgroundServer.js +104 -12
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/database.js +37 -2
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
- package/codeyam-cli/src/utils/devServerState.js +71 -0
- package/codeyam-cli/src/utils/devServerState.js.map +1 -0
- package/codeyam-cli/src/utils/editorApi.js +73 -0
- package/codeyam-cli/src/utils/editorApi.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +176 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorCapture.js +102 -0
- package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +197 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js +44 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +225 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js +113 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +135 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +132 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +332 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js +173 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js +349 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +158 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +55 -13
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
- package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +70 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/scenarioCoverage.js +75 -0
- package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/scenariosManifest.js +159 -0
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +57 -2
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +82 -11
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +8 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/slugUtils.js +25 -0
- package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
- package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
- package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/webappDetection.js +35 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +40 -0
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +567 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js +65 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +41 -27
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
- package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
- package/codeyam-cli/src/webserver/backgroundServer.js +108 -18
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-CtmbP4Gl.js → CopyButton-BPXZwM4t.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-DlMph_Hm.js → EntityItem-BcgbViKV.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-B-0PjGOU.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-DN9eiJAO.js → EntityTypeIcon-CQIG2qda.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-rE_fI2h2.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CnatsCw2.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-CSP6DZrh.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-CMK8Q7yk.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-TCV_HBjy.js → ReportIssueModal-BzHcG7SE.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CG2uh31y.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-CU_TDYd8.js → ScenarioViewer-Bd-hxofb.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-D7IoaWUW.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{_index-B8z7mjR-.js → _index-DLxKhri3.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-DZu78RI1.js → activity.(_tab)-BcY3q6nt.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-Duc5hnl7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
- package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-Dm5RS9il.js → agent-transcripts-Bni3iiUj.js} +5 -5
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-Bp5FLkd4.js → book-open-BYOypzCa.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-DQJA9f4o.js → chevron-down-C_Pmso5S.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-7VptmeIr.js → chunk-JZWAC4HX-C4pqxYJB.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-B6C4LY9o.js → circle-check-BVMi9VA5.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{copy-6nzYCu0G.js → copy-n2FB0_Sw.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CC6AbExI.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BsDh6TSF.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-PBc_6L9R.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-4FzHlcNn.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-C6PQhwY5.js → entity._sha._-BsDXNp45.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-BgAqUtTZ.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-Bmshgrij.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C7ysA4Jq.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CU6EUArK.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-EWpfFU4X.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-CrxAoWIL.js → files-BZrlFE1F.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-B8vTTNy2.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-7-1FmlHo.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-DuYcwYp_.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/{labs-CPPVOSWB.js → labs-Zk7ryIM1.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BnDcD54R.js → loader-circle-DaAZ_H2w.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/manifest-65850841.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-9gnxSZlb.js +101 -0
- package/codeyam-cli/src/webserver/build/client/assets/{pause-DhQX2g22.js → pause-f5-1lKBt.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/root-BwX8YgFb.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DborVoKD.js → search-Di64LWVb.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{settings-BWunYSXt.js → settings-0OrEMU6J.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-BtrtCYJg.js → simulations-DWT-CvLy.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-Bs4NC-VZ.js → terminal-Br7MOqts.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DTf3Jojp.js → triangle-alert-BLdiCuG-.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BE43Hjti.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-BsQb6rFd.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-BOur3mUv.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-DEEQf4pi.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/init-CkWmyFY2.js +10 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BHi-9O8W.js +439 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/devServer.js +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +877 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +230 -0
- package/codeyam-cli/src/webserver/server.js +258 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +726 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
- package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
- package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
- package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
- package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
- package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
- package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
- package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
- package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
- package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +147 -0
- package/codeyam-cli/templates/editor-step-hook.py +236 -0
- package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
- package/codeyam-cli/templates/expo-react-native/README.md +41 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app.json +18 -0
- package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
- package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
- package/codeyam-cli/templates/expo-react-native/global.css +3 -0
- package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
- package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
- package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
- package/codeyam-cli/templates/expo-react-native/package.json +38 -0
- package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
- package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +24 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +64 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +39 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +40 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +92 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/SUPABASE_SETUP.md +104 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +148 -0
- package/codeyam-cli/templates/{codeyam-memory.md → skills/codeyam-memory/SKILL.md} +215 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
- package/package.json +17 -10
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -2
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +21 -0
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/generateEntityScenarioData.js +57 -2
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +0 -11
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +13 -4
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/index.js +4 -2
- package/packages/analyze/src/lib/asts/index.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +8 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +54 -27
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +65 -0
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +18 -4
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +5 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +76 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadEntities.js +0 -6
- package/packages/database/src/lib/loadEntities.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +76 -90
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/types/src/enums/ProjectFramework.js +2 -0
- package/packages/types/src/enums/ProjectFramework.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C1rIyZdV.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-D-QUFOwe.js +0 -21
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DmzSmblj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DVTcUnur.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-BVgNO76F.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/git-BldHtKeW.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/globals-CLmFdUae.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-717e346a.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-0wMU4KXe.js +0 -93
- package/codeyam-cli/src/webserver/build/client/assets/root-DqfSDjyQ.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-D_bDZyDU.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-DZp6rrQD.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-B8jmgmn2.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-9OU4lmvL.js +0 -285
- package/scripts/finalize-analyzer.cjs +0 -13
- /package/codeyam-cli/templates/{codeyam-diagnose.md → commands/codeyam-diagnose.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-debug.md → skills/codeyam-debug/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-setup.md → skills/codeyam-setup/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-sim.md → skills/codeyam-sim/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-test.md → skills/codeyam-test/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-verify.md → skills/codeyam-verify/SKILL.md} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function De(se,ge){for(var te=0;te<ge.length;te++){const J=ge[te];if(typeof J!="string"&&!Array.isArray(J)){for(const N in J)if(N!=="default"&&!(N in se)){const ie=Object.getOwnPropertyDescriptor(J,N);ie&&Object.defineProperty(se,N,ie.get?ie:{enumerable:!0,get:()=>J[N]})}}}return Object.freeze(Object.defineProperty(se,Symbol.toStringTag,{value:"Module"}))}var Ce={exports:{}},be;function Te(){return be||(be=1,(function(se,ge){(function(te,J){se.exports=J()})(self,(()=>(()=>{var te={903:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const d=h(274),o=h(627),r=h(237),l=h(860),p=h(374),C=h(296),i=h(345),t=h(859),f=h(399),_=h(855);class n extends t.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var s;return(s=this._charAtlas)==null?void 0:s.pages[0].canvas}constructor(s,c,g,a,x,w,m,L,b,y){super(),this._terminal=s,this._container=c,this._alpha=x,this._themeService=w,this._bufferService=m,this._optionsService=L,this._decorationService=b,this._coreBrowserService=y,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,C.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new t.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new i.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new d.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${g}-layer`),this._canvas.style.zIndex=a.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((D=>{this._refreshCharAtlas(D),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,t.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,p.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(s,c){}handleSelectionChanged(s,c,g=!1){this._selectionModel.update(this._terminal._core,s,c,g)}_setTransparency(s){if(s===this._alpha)return;const c=this._canvas;this._alpha=s,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,c),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(s){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,o.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,s,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,i.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let c=0;c<this._charAtlas.pages.length;c++)this._bitmapGenerator[c]=new v(this._charAtlas.pages[c].canvas)}}resize(s){this._deviceCellWidth=s.device.cell.width,this._deviceCellHeight=s.device.cell.height,this._deviceCharWidth=s.device.char.width,this._deviceCharHeight=s.device.char.height,this._deviceCharLeft=s.device.char.left,this._deviceCharTop=s.device.char.top,this._canvas.width=s.device.canvas.width,this._canvas.height=s.device.canvas.height,this._canvas.style.width=`${s.css.canvas.width}px`,this._canvas.style.height=`${s.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var s;(s=this._charAtlas)==null||s.clearTexture()}_fillCells(s,c,g,a){this._ctx.fillRect(s*this._deviceCellWidth,c*this._deviceCellHeight,g*this._deviceCellWidth,a*this._deviceCellHeight)}_fillMiddleLineAtCells(s,c,g=1){const a=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(s*this._deviceCellWidth,(c+1)*this._deviceCellHeight-a-this._coreBrowserService.dpr,g*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(s,c,g=1,a=0){this._ctx.fillRect(s*this._deviceCellWidth,(c+1)*this._deviceCellHeight+a-this._coreBrowserService.dpr-1,g*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(s,c,g=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const a=this._coreBrowserService.dpr;this._ctx.lineWidth=a;for(let x=0;x<g;x++){const w=(s+x)*this._deviceCellWidth,m=(s+x+.5)*this._deviceCellWidth,L=(s+x+1)*this._deviceCellWidth,b=(c+1)*this._deviceCellHeight-a-1,y=b-a,D=b+a;this._ctx.moveTo(w,b),this._ctx.bezierCurveTo(w,y,m,y,m,b),this._ctx.bezierCurveTo(m,D,L,D,L,b)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(s,c,g=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const a=this._coreBrowserService.dpr;this._ctx.lineWidth=a,this._ctx.setLineDash([2*a,a]);const x=s*this._deviceCellWidth,w=(c+1)*this._deviceCellHeight-a-1;this._ctx.moveTo(x,w);for(let m=0;m<g;m++){const L=(s+g+m)*this._deviceCellWidth;this._ctx.lineTo(L,w)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(s,c,g=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const a=this._coreBrowserService.dpr;this._ctx.lineWidth=a,this._ctx.setLineDash([4*a,3*a]);const x=s*this._deviceCellWidth,w=(s+g)*this._deviceCellWidth,m=(c+1)*this._deviceCellHeight-a-1;this._ctx.moveTo(x,m),this._ctx.lineTo(w,m),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(s,c,g){this._ctx.fillRect(s*this._deviceCellWidth,c*this._deviceCellHeight,this._coreBrowserService.dpr*g,this._deviceCellHeight)}_strokeRectAtCell(s,c,g,a){const x=this._coreBrowserService.dpr;this._ctx.lineWidth=x,this._ctx.strokeRect(s*this._deviceCellWidth+x/2,c*this._deviceCellHeight+x/2,g*this._deviceCellWidth-x,a*this._deviceCellHeight-x)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(s,c,g,a){this._alpha?this._ctx.clearRect(s*this._deviceCellWidth,c*this._deviceCellHeight,g*this._deviceCellWidth,a*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(s*this._deviceCellWidth,c*this._deviceCellHeight,g*this._deviceCellWidth,a*this._deviceCellHeight))}_fillCharTrueColor(s,c,g){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=r.TEXT_BASELINE,this._clipRow(g);let a=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(a=(0,l.tryDrawCustomChar)(this._ctx,s.getChars(),c*this._deviceCellWidth,g*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),a||this._ctx.fillText(s.getChars(),c*this._deviceCellWidth+this._deviceCharLeft,g*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(s,c,g){var b,y,D,S;const a=s.getChars(),x=s.getCode(),w=s.getWidth();if(this._cellColorResolver.resolve(s,c,this._bufferService.buffer.ydisp+g,this._deviceCellWidth),!this._charAtlas)return;let m;if(m=a&&a.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(a,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(s.getCode()||_.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!m.size.x||!m.size.y)return;this._ctx.save(),this._clipRow(g),this._bitmapGenerator[m.texturePage]&&this._charAtlas.pages[m.texturePage].canvas!==this._bitmapGenerator[m.texturePage].canvas&&((y=(b=this._bitmapGenerator[m.texturePage])==null?void 0:b.bitmap)==null||y.close(),delete this._bitmapGenerator[m.texturePage]),this._charAtlas.pages[m.texturePage].version!==((D=this._bitmapGenerator[m.texturePage])==null?void 0:D.version)&&(this._bitmapGenerator[m.texturePage]||(this._bitmapGenerator[m.texturePage]=new v(this._charAtlas.pages[m.texturePage].canvas)),this._bitmapGenerator[m.texturePage].refresh(),this._bitmapGenerator[m.texturePage].version=this._charAtlas.pages[m.texturePage].version);let L=m.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,p.allowRescaling)(x,w,m.size.x,this._deviceCellWidth)&&(L=this._deviceCellWidth-1),this._ctx.drawImage(((S=this._bitmapGenerator[m.texturePage])==null?void 0:S.bitmap)||this._charAtlas.pages[m.texturePage].canvas,m.texturePosition.x,m.texturePosition.y,m.size.x,m.size.y,c*this._deviceCellWidth+this._deviceCharLeft-m.offset.x,g*this._deviceCellHeight+this._deviceCharTop-m.offset.y,L,m.size.y),this._ctx.restore()}_clipRow(s){this._ctx.beginPath(),this._ctx.rect(0,s*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(s,c){return`${c?"italic":""} ${s?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}e.BaseRenderLayer=n;class v{get bitmap(){return this._bitmap}constructor(s){this.canvas=s,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var s;(s=this._bitmap)==null||s.close(),this._bitmap=void 0,f.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var s;this._state===0&&((s=this._bitmap)==null||s.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((c=>{this._state===2?this.refresh():this._bitmap=c,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasRenderer=void 0;const d=h(627),o=h(56),r=h(374),l=h(345),p=h(859),C=h(873),i=h(43),t=h(630),f=h(744);class _ extends p.Disposable{constructor(v,u,s,c,g,a,x,w,m,L,b){super(),this._terminal=v,this._screenElement=u,this._bufferService=c,this._charSizeService=g,this._optionsService=a,this._coreBrowserService=m,this._themeService=b,this._observerDisposable=this.register(new p.MutableDisposable),this._onRequestRedraw=this.register(new l.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new l.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new l.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const y=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new f.TextRenderLayer(this._terminal,this._screenElement,0,y,this._bufferService,this._optionsService,x,L,this._coreBrowserService,b),new t.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,L,this._optionsService,b),new i.LinkRenderLayer(this._terminal,this._screenElement,2,s,this._bufferService,this._optionsService,L,this._coreBrowserService,b),new C.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,w,this._coreBrowserService,L,b)];for(const D of this._renderLayers)(0,l.forwardEvent)(D.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,r.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,o.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((D,S)=>this._setCanvasDevicePixelDimensions(D,S))),this.register(this._coreBrowserService.onWindowChange((D=>{this._observerDisposable.value=(0,o.observeDevicePixelDimensions)(this._renderLayers[0].canvas,D,((S,M)=>this._setCanvasDevicePixelDimensions(S,M)))}))),this.register((0,p.toDisposable)((()=>{for(const D of this._renderLayers)D.dispose();(0,d.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(v,u){this._updateDimensions();for(const s of this._renderLayers)s.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((v=>v.handleBlur()))}handleFocus(){this._runOperation((v=>v.handleFocus()))}handleSelectionChanged(v,u,s=!1){this._runOperation((c=>c.handleSelectionChanged(v,u,s))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((v=>v.handleCursorMove()))}clear(){this._runOperation((v=>v.reset()))}_runOperation(v){for(const u of this._renderLayers)v(u)}renderRows(v,u){for(const s of this._renderLayers)s.handleGridChanged(v,u)}clearTextureAtlas(){for(const v of this._renderLayers)v.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const v=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*v),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*v),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/v),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/v),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(v,u){this.dimensions.device.canvas.height=u,this.dimensions.device.canvas.width=v;for(const s of this._renderLayers)s.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}e.CanvasRenderer=_},873:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;const d=h(457),o=h(859),r=h(399),l=h(782),p=h(903);class C extends p.BaseRenderLayer{constructor(t,f,_,n,v,u,s,c,g,a){super(t,f,"cursor",_,!0,a,v,u,g,c),this._onRequestRedraw=n,this._coreService=s,this._cursorBlinkStateManager=this.register(new o.MutableDisposable),this._cell=new l.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(u.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(t){super.resize(t),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var t;this._clearCursor(),(t=this._cursorBlinkStateManager.value)==null||t.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var t;(t=this._cursorBlinkStateManager.value)==null||t.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var t;(t=this._cursorBlinkStateManager.value)==null||t.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var t;(t=this._cursorBlinkStateManager.value)==null||t.restartBlinkAnimation()}handleGridChanged(t,f){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(t){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const f=this._bufferService.buffer.ybase+this._bufferService.buffer.y,_=f-this._bufferService.buffer.ydisp;if(_<0||_>=this._bufferService.rows)return void this._clearCursor();const n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(f).loadCell(n,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const v=this._optionsService.rawOptions.cursorStyle,u=this._optionsService.rawOptions.cursorInactiveStyle;return u&&u!=="none"&&this._cursorRenderers[u](n,_,this._cell),this._ctx.restore(),this._state.x=n,this._state.y=_,this._state.isFocused=!1,this._state.style=v,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===n&&this._state.y===_&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](n,_,this._cell),this._ctx.restore(),this._state.x=n,this._state.y=_,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(r.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(t,f,_){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(t,f,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(t,f,_){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(t,f,_.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(_,t,f),this._ctx.restore()}_renderUnderlineCursor(t,f,_){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(t,f),this._ctx.restore()}_renderOutlineCursor(t,f,_){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(t,f,_.getWidth(),1),this._ctx.restore()}}e.CursorRenderLayer=C},574:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GridCache=void 0,e.GridCache=class{constructor(){this.cache=[]}resize(h,d){for(let o=0;o<h;o++){this.cache.length<=o&&this.cache.push([]);for(let r=this.cache[o].length;r<d;r++)this.cache[o].push(void 0);this.cache[o].length=d}this.cache.length=h}clear(){for(let h=0;h<this.cache.length;h++)for(let d=0;d<this.cache[h].length;d++)this.cache[h][d]=void 0}}},43:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const d=h(197),o=h(237),r=h(903);class l extends r.BaseRenderLayer{constructor(C,i,t,f,_,n,v,u,s){super(C,i,"link",t,!0,s,_,n,v,u),this.register(f.onShowLinkUnderline((c=>this._handleShowLinkUnderline(c)))),this.register(f.onHideLinkUnderline((c=>this._handleHideLinkUnderline(c))))}resize(C){super.resize(C),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const C=this._state.y2-this._state.y1-1;C>0&&this._clearCells(0,this._state.y1+1,this._state.cols,C),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(C){if(C.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg&&(0,d.is256Color)(C.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[C.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,C.y1===C.y2)this._fillBottomLineAtCells(C.x1,C.y1,C.x2-C.x1);else{this._fillBottomLineAtCells(C.x1,C.y1,C.cols-C.x1);for(let i=C.y1+1;i<C.y2;i++)this._fillBottomLineAtCells(0,i,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}e.LinkRenderLayer=l},630:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRenderLayer=void 0;const d=h(903);class o extends d.BaseRenderLayer{constructor(l,p,C,i,t,f,_,n){super(l,p,"selection",C,!0,n,i,_,f,t),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(l){super.resize(l),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(l,p,C){super.handleSelectionChanged(l,p,C),this._redrawSelection(l,p,C)}_redrawSelection(l,p,C){if(!this._didStateChange(l,p,C,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!l||!p)return void this._clearState();const i=l[1]-this._bufferService.buffer.ydisp,t=p[1]-this._bufferService.buffer.ydisp,f=Math.max(i,0),_=Math.min(t,this._bufferService.rows-1);if(f>=this._bufferService.rows||_<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,C){const n=l[0],v=p[0]-n,u=_-f+1;this._fillCells(n,f,v,u)}else{const n=i===f?l[0]:0,v=f===t?p[0]:this._bufferService.cols;this._fillCells(n,f,v-n,1);const u=Math.max(_-f-1,0);if(this._fillCells(0,f+1,this._bufferService.cols,u),f!==_){const s=t===_?p[0]:this._bufferService.cols;this._fillCells(0,_,s,1)}}this._state.start=[l[0],l[1]],this._state.end=[p[0],p[1]],this._state.columnSelectMode=C,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(l,p,C,i){return!this._areCoordinatesEqual(l,this._state.start)||!this._areCoordinatesEqual(p,this._state.end)||C!==this._state.columnSelectMode||i!==this._state.ydisp}_areCoordinatesEqual(l,p){return!(!l||!p)&&l[0]===p[0]&&l[1]===p[1]}}e.SelectionRenderLayer=o},744:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextRenderLayer=void 0;const d=h(577),o=h(147),r=h(782),l=h(855),p=h(903),C=h(574);class i extends p.BaseRenderLayer{constructor(f,_,n,v,u,s,c,g,a,x){super(f,_,"text",n,v,x,u,s,g,a),this._characterJoinerService=c,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new r.CellData,this._state=new C.GridCache,this.register(s.onSpecificOptionChange("allowTransparency",(w=>this._setTransparency(w))))}resize(f){super.resize(f);const _=this._getFont(!1,!1);this._characterWidth===f.device.char.width&&this._characterFont===_||(this._characterWidth=f.device.char.width,this._characterFont=_,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(f,_,n){for(let v=f;v<=_;v++){const u=v+this._bufferService.buffer.ydisp,s=this._bufferService.buffer.lines.get(u),c=this._characterJoinerService.getJoinedCharacters(u);for(let g=0;g<this._bufferService.cols;g++){s.loadCell(g,this._workCell);let a=this._workCell,x=!1,w=g;if(a.getWidth()!==0){if(c.length>0&&g===c[0][0]){x=!0;const m=c.shift();a=new d.JoinedCellData(this._workCell,s.translateToString(!0,m[0],m[1]),m[1]-m[0]),w=m[1]-1}!x&&this._isOverlapping(a)&&w<s.length-1&&s.getCodePoint(w+1)===l.NULL_CELL_CODE&&(a.content&=-12582913,a.content|=8388608),n(a,g,v),g=w}}}}_drawBackground(f,_){const n=this._ctx,v=this._bufferService.cols;let u=0,s=0,c=null;n.save(),this._forEachCell(f,_,((g,a,x)=>{let w=null;g.isInverse()?w=g.isFgDefault()?this._themeService.colors.foreground.css:g.isFgRGB()?`rgb(${o.AttributeData.toColorRGB(g.getFgColor()).join(",")})`:this._themeService.colors.ansi[g.getFgColor()].css:g.isBgRGB()?w=`rgb(${o.AttributeData.toColorRGB(g.getBgColor()).join(",")})`:g.isBgPalette()&&(w=this._themeService.colors.ansi[g.getBgColor()].css);let m=!1;this._decorationService.forEachDecorationAtCell(a,this._bufferService.buffer.ydisp+x,void 0,(L=>{L.options.layer!=="top"&&m||(L.backgroundColorRGB&&(w=L.backgroundColorRGB.css),m=L.options.layer==="top")})),c===null&&(u=a,s=x),x!==s?(n.fillStyle=c||"",this._fillCells(u,s,v-u,1),u=a,s=x):c!==w&&(n.fillStyle=c||"",this._fillCells(u,s,a-u,1),u=a,s=x),c=w})),c!==null&&(n.fillStyle=c,this._fillCells(u,s,v-u,1)),n.restore()}_drawForeground(f,_){this._forEachCell(f,_,((n,v,u)=>this._drawChars(n,v,u)))}handleGridChanged(f,_){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,f,this._bufferService.cols,_-f+1),this._drawBackground(f,_),this._drawForeground(f,_))}_isOverlapping(f){if(f.getWidth()!==1||f.getCode()<256)return!1;const _=f.getChars();if(this._characterOverlapCache.hasOwnProperty(_))return this._characterOverlapCache[_];this._ctx.save(),this._ctx.font=this._characterFont;const n=Math.floor(this._ctx.measureText(_).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[_]=n,n}}e.TextRenderLayer=i},274:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellColorResolver=void 0;const d=h(855),o=h(160),r=h(374);let l,p=0,C=0,i=!1,t=!1,f=!1,_=0;e.CellColorResolver=class{constructor(n,v,u,s,c,g){this._terminal=n,this._optionService=v,this._selectionRenderModel=u,this._decorationService=s,this._coreBrowserService=c,this._themeService=g,this.result={fg:0,bg:0,ext:0}}resolve(n,v,u,s){if(this.result.bg=n.bg,this.result.fg=n.fg,this.result.ext=268435456&n.bg?n.extended.ext:0,C=0,p=0,t=!1,i=!1,f=!1,l=this._themeService.colors,_=0,n.getCode()!==d.NULL_CELL_CODE&&n.extended.underlineStyle===4){const c=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));_=v*s%(2*Math.round(c))}if(this._decorationService.forEachDecorationAtCell(v,u,"bottom",(c=>{c.backgroundColorRGB&&(C=c.backgroundColorRGB.rgba>>8&16777215,t=!0),c.foregroundColorRGB&&(p=c.foregroundColorRGB.rgba>>8&16777215,i=!0)})),f=this._selectionRenderModel.isCellSelected(this._terminal,v,u),f){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}C=o.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(t=!0,l.selectionForeground&&(p=l.selectionForeground.rgba>>8&16777215,i=!0),(0,r.treatGlyphAsBackgroundColor)(n.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)p=(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:p=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:p=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:p=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:p=(16777215&this.result.fg)<<8|255;break;default:p=this._themeService.colors.foreground.rgba}p=o.rgba.blend(p,4294967040&(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}i=!0}}this._decorationService.forEachDecorationAtCell(v,u,"top",(c=>{c.backgroundColorRGB&&(C=c.backgroundColorRGB.rgba>>8&16777215,t=!0),c.foregroundColorRGB&&(p=c.foregroundColorRGB.rgba>>8&16777215,i=!0)})),t&&(C=f?-16777216&n.bg&-134217729|C|50331648:-16777216&n.bg|C|50331648),i&&(p=-16777216&n.fg&-67108865|p|50331648),67108864&this.result.fg&&(t&&!i&&(p=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&l.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,i=!0),!t&&i&&(C=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&l.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,t=!0)),l=void 0,this.result.bg=t?C:this.result.bg,this.result.fg=i?p:this.result.fg,this.result.ext&=536870911,this.result.ext|=_<<29&3758096384}}},627:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireTextureAtlas=void 0;const d=h(509),o=h(197),r=[];e.acquireTextureAtlas=function(l,p,C,i,t,f,_,n){const v=(0,o.generateConfig)(i,t,f,_,p,C,n);for(let c=0;c<r.length;c++){const g=r[c],a=g.ownedBy.indexOf(l);if(a>=0){if((0,o.configEquals)(g.config,v))return g.atlas;g.ownedBy.length===1?(g.atlas.dispose(),r.splice(c,1)):g.ownedBy.splice(a,1);break}}for(let c=0;c<r.length;c++){const g=r[c];if((0,o.configEquals)(g.config,v))return g.ownedBy.push(l),g.atlas}const u=l._core,s={atlas:new d.TextureAtlas(document,v,u.unicodeService),config:v,ownedBy:[l]};return r.push(s),s.atlas},e.removeTerminalFromCache=function(l){for(let p=0;p<r.length;p++){const C=r[p].ownedBy.indexOf(l);if(C!==-1){r[p].ownedBy.length===1?(r[p].atlas.dispose(),r.splice(p,1)):r[p].ownedBy.splice(C,1);break}}}},197:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const d=h(160);e.generateConfig=function(o,r,l,p,C,i,t){const f={foreground:i.foreground,background:i.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:i.ansi.slice(),contrastCache:i.contrastCache,halfContrastCache:i.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:t,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:o,deviceCellHeight:r,deviceCharWidth:l,deviceCharHeight:p,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:f}},e.configEquals=function(o,r){for(let l=0;l<o.colors.ansi.length;l++)if(o.colors.ansi[l].rgba!==r.colors.ansi[l].rgba)return!1;return o.devicePixelRatio===r.devicePixelRatio&&o.customGlyphs===r.customGlyphs&&o.lineHeight===r.lineHeight&&o.letterSpacing===r.letterSpacing&&o.fontFamily===r.fontFamily&&o.fontSize===r.fontSize&&o.fontWeight===r.fontWeight&&o.fontWeightBold===r.fontWeightBold&&o.allowTransparency===r.allowTransparency&&o.deviceCharWidth===r.deviceCharWidth&&o.deviceCharHeight===r.deviceCharHeight&&o.drawBoldTextInBrightColors===r.drawBoldTextInBrightColors&&o.minimumContrastRatio===r.minimumContrastRatio&&o.colors.foreground.rgba===r.colors.foreground.rgba&&o.colors.background.rgba===r.colors.background.rgba},e.is256Color=function(o){return(50331648&o)==16777216||(50331648&o)==33554432}},237:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const d=h(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorBlinkStateManager=void 0,e.CursorBlinkStateManager=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(h=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,d>0)return void this._restartInterval(d)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(d)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),h)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const d=h(374);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const o={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╒":{1:(i,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(i,t)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`},"╔":{1:(i,t)=>`M1,${.5-t} L${.5-i},${.5-t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"╕":{1:(i,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(i,t)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`},"╗":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5+i},${.5-t} L${.5+i},1`},"╘":{1:(i,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(i,t)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╚":{1:(i,t)=>`M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0 M1,${.5+t} L${.5-i},${.5+t} L${.5-i},0`},"╛":{1:(i,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(i,t)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`},"╝":{1:(i,t)=>`M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M0,${.5+t} L${.5+i},${.5+t} L${.5+i},0`},"╞":{1:(i,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`},"╠":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╡":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(i,t)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╣":{1:(i,t)=>`M${.5+i},0 L${.5+i},1 M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0`},"╤":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`},"╦":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"╧":{1:(i,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╩":{1:(i,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╪":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╬":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.tryDrawCustomChar=function(i,t,f,_,n,v,u,s){const c=e.blockElementDefinitions[t];if(c)return(function(w,m,L,b,y,D){for(let S=0;S<m.length;S++){const M=m[S],T=y/8,A=D/8;w.fillRect(L+M.x*T,b+M.y*A,M.w*T,M.h*A)}})(i,c,f,_,n,v),!0;const g=o[t];if(g)return(function(w,m,L,b,y,D){let S=r.get(m);S||(S=new Map,r.set(m,S));const M=w.fillStyle;if(typeof M!="string")throw new Error(`Unexpected fillStyle type "${M}"`);let T=S.get(M);if(!T){const A=m[0].length,H=m.length,z=w.canvas.ownerDocument.createElement("canvas");z.width=A,z.height=H;const U=(0,d.throwIfFalsy)(z.getContext("2d")),I=new ImageData(A,H);let Z,Q,Y,V;if(M.startsWith("#"))Z=parseInt(M.slice(1,3),16),Q=parseInt(M.slice(3,5),16),Y=parseInt(M.slice(5,7),16),V=M.length>7&&parseInt(M.slice(7,9),16)||1;else{if(!M.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${M}" when drawing pattern glyph`);[Z,Q,Y,V]=M.substring(5,M.length-1).split(",").map((q=>parseFloat(q)))}for(let q=0;q<H;q++)for(let K=0;K<A;K++)I.data[4*(q*A+K)]=Z,I.data[4*(q*A+K)+1]=Q,I.data[4*(q*A+K)+2]=Y,I.data[4*(q*A+K)+3]=m[q][K]*(255*V);U.putImageData(I,0,0),T=(0,d.throwIfFalsy)(w.createPattern(z,null)),S.set(M,T)}w.fillStyle=T,w.fillRect(L,b,y,D)})(i,g,f,_,n,v),!0;const a=e.boxDrawingDefinitions[t];if(a)return(function(w,m,L,b,y,D,S){w.strokeStyle=w.fillStyle;for(const[M,T]of Object.entries(m)){let A;w.beginPath(),w.lineWidth=S*Number.parseInt(M),A=typeof T=="function"?T(.15,.15/D*y):T;for(const H of A.split(" ")){const z=H[0],U=p[z];if(!U){console.error(`Could not find drawing instructions for "${z}"`);continue}const I=H.substring(1).split(",");I[0]&&I[1]&&U(w,C(I,y,D,L,b,!0,S))}w.stroke(),w.closePath()}})(i,a,f,_,n,v,s),!0;const x=e.powerlineDefinitions[t];return!!x&&((function(w,m,L,b,y,D,S,M){const T=new Path2D;T.rect(L,b,y,D),w.clip(T),w.beginPath();const A=S/12;w.lineWidth=M*A;for(const H of m.d.split(" ")){const z=H[0],U=p[z];if(!U){console.error(`Could not find drawing instructions for "${z}"`);continue}const I=H.substring(1).split(",");I[0]&&I[1]&&U(w,C(I,y,D,L,b,!1,M,(m.leftPadding??0)*(A/2),(m.rightPadding??0)*(A/2)))}m.type===1?(w.strokeStyle=w.fillStyle,w.stroke()):w.fill(),w.closePath()})(i,x,f,_,n,v,u,s),!0)};const r=new Map;function l(i,t,f=0){return Math.max(Math.min(i,t),f)}const p={C:(i,t)=>i.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(i,t)=>i.lineTo(t[0],t[1]),M:(i,t)=>i.moveTo(t[0],t[1])};function C(i,t,f,_,n,v,u,s=0,c=0){const g=i.map((a=>parseFloat(a)||parseInt(a)));if(g.length<2)throw new Error("Too few arguments for instruction");for(let a=0;a<g.length;a+=2)g[a]*=t-s*u-c*u,v&&g[a]!==0&&(g[a]=l(Math.round(g[a]+.5)-.5,t,0)),g[a]+=_+s*u;for(let a=1;a<g.length;a+=2)g[a]*=f,v&&g[a]!==0&&(g[a]=l(Math.round(g[a]+.5)-.5,f,0)),g[a]+=n;return g}},56:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const d=h(859);e.observeDevicePixelDimensions=function(o,r,l){let p=new r.ResizeObserver((C=>{const i=C.find((_=>_.target===o));if(!i)return;if(!("devicePixelContentBoxSize"in i))return p==null||p.disconnect(),void(p=void 0);const t=i.devicePixelContentBoxSize[0].inlineSize,f=i.devicePixelContentBoxSize[0].blockSize;t>0&&f>0&&l(t,f)}));try{p.observe(o,{box:["device-pixel-content-box"]})}catch{p.disconnect(),p=void 0}return(0,d.toDisposable)((()=>p==null?void 0:p.disconnect()))}},374:(k,e)=>{function h(o){return 57508<=o&&o<=57558}function d(o){return o>=128512&&o<=128591||o>=127744&&o<=128511||o>=128640&&o<=128767||o>=9728&&o<=9983||o>=9984&&o<=10175||o>=65024&&o<=65039||o>=129280&&o<=129535||o>=127462&&o<=127487}Object.defineProperty(e,"__esModule",{value:!0}),e.computeNextVariantOffset=e.createRenderDimensions=e.treatGlyphAsBackgroundColor=e.allowRescaling=e.isEmoji=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(o){if(!o)throw new Error("value must not be falsy");return o},e.isPowerlineGlyph=h,e.isRestrictedPowerlineGlyph=function(o){return 57520<=o&&o<=57527},e.isEmoji=d,e.allowRescaling=function(o,r,l,p){return r===1&&l>Math.ceil(1.5*p)&&o!==void 0&&o>255&&!d(o)&&!h(o)&&!(function(C){return 57344<=C&&C<=63743})(o)},e.treatGlyphAsBackgroundColor=function(o){return h(o)||(function(r){return 9472<=r&&r<=9631})(o)},e.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},e.computeNextVariantOffset=function(o,r,l=0){return(o-(2*Math.round(r)-l))%(2*Math.round(r))}},296:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(o,r,l,p=!1){if(this.selectionStart=r,this.selectionEnd=l,!r||!l||r[0]===l[0]&&r[1]===l[1])return void this.clear();const C=o.buffers.active.ydisp,i=r[1]-C,t=l[1]-C,f=Math.max(i,0),_=Math.min(t,o.rows-1);f>=o.rows||_<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=p,this.viewportStartRow=i,this.viewportEndRow=t,this.viewportCappedStartRow=f,this.viewportCappedEndRow=_,this.startCol=r[0],this.endCol=l[0])}isCellSelected(o,r,l){return!!this.hasSelection&&(l-=o.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?r>=this.startCol&&l>=this.viewportCappedStartRow&&r<this.endCol&&l<=this.viewportCappedEndRow:r<this.startCol&&l>=this.viewportCappedStartRow&&r>=this.endCol&&l<=this.viewportCappedEndRow:l>this.viewportStartRow&&l<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&l===this.viewportStartRow&&r>=this.startCol&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&l===this.viewportEndRow&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&l===this.viewportStartRow&&r>=this.startCol)}}e.createSelectionRenderModel=function(){return new h}},509:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextureAtlas=void 0;const d=h(237),o=h(860),r=h(374),l=h(160),p=h(345),C=h(485),i=h(385),t=h(147),f=h(855),_={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let n;class v{get pages(){return this._pages}constructor(a,x,w){this._document=a,this._config=x,this._unicodeService=w,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new t.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new p.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new p.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=c(a,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,r.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const a of this.pages)a.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const a=new i.IdleTaskQueue;for(let x=33;x<126;x++)a.enqueue((()=>{if(!this._cacheMap.get(x,f.DEFAULT_COLOR,f.DEFAULT_COLOR,f.DEFAULT_EXT)){const w=this._drawToCache(x,f.DEFAULT_COLOR,f.DEFAULT_COLOR,f.DEFAULT_EXT);this._cacheMap.set(x,f.DEFAULT_COLOR,f.DEFAULT_COLOR,f.DEFAULT_EXT,w)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const a of this._pages)a.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(v.maxAtlasPages&&this._pages.length>=Math.max(4,v.maxAtlasPages)){const x=this._pages.filter((S=>2*S.canvas.width<=(v.maxTextureSize||4096))).sort(((S,M)=>M.canvas.width!==S.canvas.width?M.canvas.width-S.canvas.width:M.percentageUsed-S.percentageUsed));let w=-1,m=0;for(let S=0;S<x.length;S++)if(x[S].canvas.width!==m)w=S,m=x[S].canvas.width;else if(S-w==3)break;const L=x.slice(w,w+4),b=L.map((S=>S.glyphs[0].texturePage)).sort(((S,M)=>S>M?1:-1)),y=this.pages.length-L.length,D=this._mergePages(L,y);D.version++;for(let S=b.length-1;S>=0;S--)this._deletePage(b[S]);this.pages.push(D),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(D.canvas)}const a=new u(this._document,this._textureSize);return this._pages.push(a),this._activePages.push(a),this._onAddTextureAtlasCanvas.fire(a.canvas),a}_mergePages(a,x){const w=2*a[0].canvas.width,m=new u(this._document,w,a);for(const[L,b]of a.entries()){const y=L*b.canvas.width%w,D=Math.floor(L/2)*b.canvas.height;m.ctx.drawImage(b.canvas,y,D);for(const M of b.glyphs)M.texturePage=x,M.sizeClipSpace.x=M.size.x/w,M.sizeClipSpace.y=M.size.y/w,M.texturePosition.x+=y,M.texturePosition.y+=D,M.texturePositionClipSpace.x=M.texturePosition.x/w,M.texturePositionClipSpace.y=M.texturePosition.y/w;this._onRemoveTextureAtlasCanvas.fire(b.canvas);const S=this._activePages.indexOf(b);S!==-1&&this._activePages.splice(S,1)}return m}_deletePage(a){this._pages.splice(a,1);for(let x=a;x<this._pages.length;x++){const w=this._pages[x];for(const m of w.glyphs)m.texturePage--;w.version++}}getRasterizedGlyphCombinedChar(a,x,w,m,L){return this._getFromCacheMap(this._cacheMapCombined,a,x,w,m,L)}getRasterizedGlyph(a,x,w,m,L){return this._getFromCacheMap(this._cacheMap,a,x,w,m,L)}_getFromCacheMap(a,x,w,m,L,b=!1){return n=a.get(x,w,m,L),n||(n=this._drawToCache(x,w,m,L,b),a.set(x,w,m,L,n)),n}_getColorFromAnsiIndex(a){if(a>=this._config.colors.ansi.length)throw new Error("No color found for idx "+a);return this._config.colors.ansi[a]}_getBackgroundColor(a,x,w,m){if(this._config.allowTransparency)return l.NULL_COLOR;let L;switch(a){case 16777216:case 33554432:L=this._getColorFromAnsiIndex(x);break;case 50331648:const b=t.AttributeData.toColorRGB(x);L=l.channels.toColor(b[0],b[1],b[2]);break;default:L=w?l.color.opaque(this._config.colors.foreground):this._config.colors.background}return L}_getForegroundColor(a,x,w,m,L,b,y,D,S,M){const T=this._getMinimumContrastColor(a,x,w,m,L,b,y,S,D,M);if(T)return T;let A;switch(L){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&S&&b<8&&(b+=8),A=this._getColorFromAnsiIndex(b);break;case 50331648:const H=t.AttributeData.toColorRGB(b);A=l.channels.toColor(H[0],H[1],H[2]);break;default:A=y?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(A=l.color.opaque(A)),D&&(A=l.color.multiplyOpacity(A,d.DIM_OPACITY)),A}_resolveBackgroundRgba(a,x,w){switch(a){case 16777216:case 33554432:return this._getColorFromAnsiIndex(x).rgba;case 50331648:return x<<8;default:return w?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(a,x,w,m){switch(a){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&m&&x<8&&(x+=8),this._getColorFromAnsiIndex(x).rgba;case 50331648:return x<<8;default:return w?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(a,x,w,m,L,b,y,D,S,M){if(this._config.minimumContrastRatio===1||M)return;const T=this._getContrastCache(S),A=T.getColor(a,m);if(A!==void 0)return A||void 0;const H=this._resolveBackgroundRgba(x,w,y),z=this._resolveForegroundRgba(L,b,y,D),U=l.rgba.ensureContrastRatio(H,z,this._config.minimumContrastRatio/(S?2:1));if(!U)return void T.setColor(a,m,null);const I=l.channels.toColor(U>>24&255,U>>16&255,U>>8&255);return T.setColor(a,m,I),I}_getContrastCache(a){return a?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(a,x,w,m,L=!1){const b=typeof a=="number"?String.fromCharCode(a):a,y=Math.min(this._config.deviceCellWidth*Math.max(b.length,2)+4,this._textureSize);this._tmpCanvas.width<y&&(this._tmpCanvas.width=y);const D=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<D&&(this._tmpCanvas.height=D),this._tmpCtx.save(),this._workAttributeData.fg=w,this._workAttributeData.bg=x,this._workAttributeData.extended.ext=m,this._workAttributeData.isInvisible())return _;const S=!!this._workAttributeData.isBold(),M=!!this._workAttributeData.isInverse(),T=!!this._workAttributeData.isDim(),A=!!this._workAttributeData.isItalic(),H=!!this._workAttributeData.isUnderline(),z=!!this._workAttributeData.isStrikethrough(),U=!!this._workAttributeData.isOverline();let I=this._workAttributeData.getFgColor(),Z=this._workAttributeData.getFgColorMode(),Q=this._workAttributeData.getBgColor(),Y=this._workAttributeData.getBgColorMode();if(M){const R=I;I=Q,Q=R;const O=Z;Z=Y,Y=O}const V=this._getBackgroundColor(Y,Q,M,T);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=V.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const q=S?this._config.fontWeightBold:this._config.fontWeight,K=A?"italic":"";this._tmpCtx.font=`${K} ${q} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const Se=b.length===1&&(0,r.isPowerlineGlyph)(b.charCodeAt(0)),pe=b.length===1&&(0,r.isRestrictedPowerlineGlyph)(b.charCodeAt(0)),he=this._getForegroundColor(x,Y,Q,w,Z,I,M,T,S,(0,r.treatGlyphAsBackgroundColor)(b.charCodeAt(0)));this._tmpCtx.fillStyle=he.css;const P=pe?0:4;let le=!1;this._config.customGlyphs!==!1&&(le=(0,o.tryDrawCustomChar)(this._tmpCtx,b,P,P,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let re,oe=!Se;if(re=typeof a=="number"?this._unicodeService.wcwidth(a):this._unicodeService.getStringCellWidth(a),H){this._tmpCtx.save();const R=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),O=R%2==1?.5:0;if(this._tmpCtx.lineWidth=R,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())oe=!1,this._tmpCtx.strokeStyle=`rgb(${t.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{oe=!1;let X=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&X<8&&(X+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(X).css}this._tmpCtx.beginPath();const j=P,W=Math.ceil(P+this._config.deviceCharHeight)-O-(L?2*R:0),ne=W+R,ae=W+2*R;let ee=this._workAttributeData.getUnderlineVariantOffset();for(let X=0;X<re;X++){this._tmpCtx.save();const F=j+X*this._config.deviceCellWidth,G=j+(X+1)*this._config.deviceCellWidth,fe=F+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(F,W),this._tmpCtx.lineTo(G,W),this._tmpCtx.moveTo(F,ae),this._tmpCtx.lineTo(G,ae);break;case 3:const de=R<=1?ae:Math.ceil(P+this._config.deviceCharHeight-R/2)-O,_e=R<=1?W:Math.ceil(P+this._config.deviceCharHeight+R/2)-O,xe=new Path2D;xe.rect(F,W,this._config.deviceCellWidth,ae-W),this._tmpCtx.clip(xe),this._tmpCtx.moveTo(F-this._config.deviceCellWidth/2,ne),this._tmpCtx.bezierCurveTo(F-this._config.deviceCellWidth/2,_e,F,_e,F,ne),this._tmpCtx.bezierCurveTo(F,de,fe,de,fe,ne),this._tmpCtx.bezierCurveTo(fe,_e,G,_e,G,ne),this._tmpCtx.bezierCurveTo(G,de,G+this._config.deviceCellWidth/2,de,G+this._config.deviceCellWidth/2,ne);break;case 4:const ue=ee===0?0:ee>=R?2*R-ee:R-ee;ee>=R||ue===0?(this._tmpCtx.setLineDash([Math.round(R),Math.round(R)]),this._tmpCtx.moveTo(F+ue,W),this._tmpCtx.lineTo(G,W)):(this._tmpCtx.setLineDash([Math.round(R),Math.round(R)]),this._tmpCtx.moveTo(F,W),this._tmpCtx.lineTo(F+ue,W),this._tmpCtx.moveTo(F+ue+R,W),this._tmpCtx.lineTo(G,W)),ee=(0,r.computeNextVariantOffset)(G-F,R,ee);break;case 5:const ye=.6,Re=.3,ve=G-F,we=Math.floor(ye*ve),Le=Math.floor(Re*ve),Ae=ve-we-Le;this._tmpCtx.setLineDash([we,Le,Ae]),this._tmpCtx.moveTo(F,W),this._tmpCtx.lineTo(G,W);break;default:this._tmpCtx.moveTo(F,W),this._tmpCtx.lineTo(G,W)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!le&&this._config.fontSize>=12&&!this._config.allowTransparency&&b!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const X=this._tmpCtx.measureText(b);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in X&&X.actualBoundingBoxDescent>0){this._tmpCtx.save();const F=new Path2D;F.rect(j,W-Math.ceil(R/2),this._config.deviceCellWidth*re,ae-W+Math.ceil(R/2)),this._tmpCtx.clip(F),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=V.css,this._tmpCtx.strokeText(b,P,P+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(U){const R=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),O=R%2==1?.5:0;this._tmpCtx.lineWidth=R,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+O),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*re,P+O),this._tmpCtx.stroke()}if(le||this._tmpCtx.fillText(b,P,P+this._config.deviceCharHeight),b==="_"&&!this._config.allowTransparency){let R=s(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),V,he,oe);if(R)for(let O=1;O<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=V.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(b,P,P+this._config.deviceCharHeight-O),R=s(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),V,he,oe),R);O++);}if(z){const R=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),O=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=R,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+Math.floor(this._config.deviceCharHeight/2)-O),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*re,P+Math.floor(this._config.deviceCharHeight/2)-O),this._tmpCtx.stroke()}this._tmpCtx.restore();const ce=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let me;if(me=this._config.allowTransparency?(function(R){for(let O=0;O<R.data.length;O+=4)if(R.data[O+3]>0)return!1;return!0})(ce):s(ce,V,he,oe),me)return _;const $=this._findGlyphBoundingBox(ce,this._workBoundingBox,y,pe,le,P);let E,B;for(;;){if(this._activePages.length===0){const R=this._createNewPage();E=R,B=R.currentRow,B.height=$.size.y;break}E=this._activePages[this._activePages.length-1],B=E.currentRow;for(const R of this._activePages)$.size.y<=R.currentRow.height&&(E=R,B=R.currentRow);for(let R=this._activePages.length-1;R>=0;R--)for(const O of this._activePages[R].fixedRows)O.height<=B.height&&$.size.y<=O.height&&(E=this._activePages[R],B=O);if(B.y+$.size.y>=E.canvas.height||B.height>$.size.y+2){let R=!1;if(E.currentRow.y+E.currentRow.height+$.size.y>=E.canvas.height){let O;for(const j of this._activePages)if(j.currentRow.y+j.currentRow.height+$.size.y<j.canvas.height){O=j;break}if(O)E=O;else if(v.maxAtlasPages&&this._pages.length>=v.maxAtlasPages&&B.y+$.size.y<=E.canvas.height&&B.height>=$.size.y&&B.x+$.size.x<=E.canvas.width)R=!0;else{const j=this._createNewPage();E=j,B=j.currentRow,B.height=$.size.y,R=!0}}R||(E.currentRow.height>0&&E.fixedRows.push(E.currentRow),B={x:0,y:E.currentRow.y+E.currentRow.height,height:$.size.y},E.fixedRows.push(B),E.currentRow={x:0,y:B.y+B.height,height:0})}if(B.x+$.size.x<=E.canvas.width)break;B===E.currentRow?(B.x=0,B.y+=B.height,B.height=0):E.fixedRows.splice(E.fixedRows.indexOf(B),1)}return $.texturePage=this._pages.indexOf(E),$.texturePosition.x=B.x,$.texturePosition.y=B.y,$.texturePositionClipSpace.x=B.x/E.canvas.width,$.texturePositionClipSpace.y=B.y/E.canvas.height,$.sizeClipSpace.x/=E.canvas.width,$.sizeClipSpace.y/=E.canvas.height,B.height=Math.max(B.height,$.size.y),B.x+=$.size.x,E.ctx.putImageData(ce,$.texturePosition.x-this._workBoundingBox.left,$.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,$.size.x,$.size.y),E.addGlyph($),E.version++,$}_findGlyphBoundingBox(a,x,w,m,L,b){x.top=0;const y=m?this._config.deviceCellHeight:this._tmpCanvas.height,D=m?this._config.deviceCellWidth:w;let S=!1;for(let M=0;M<y;M++){for(let T=0;T<D;T++){const A=M*this._tmpCanvas.width*4+4*T+3;if(a.data[A]!==0){x.top=M,S=!0;break}}if(S)break}x.left=0,S=!1;for(let M=0;M<b+D;M++){for(let T=0;T<y;T++){const A=T*this._tmpCanvas.width*4+4*M+3;if(a.data[A]!==0){x.left=M,S=!0;break}}if(S)break}x.right=D,S=!1;for(let M=b+D-1;M>=b;M--){for(let T=0;T<y;T++){const A=T*this._tmpCanvas.width*4+4*M+3;if(a.data[A]!==0){x.right=M,S=!0;break}}if(S)break}x.bottom=y,S=!1;for(let M=y-1;M>=0;M--){for(let T=0;T<D;T++){const A=M*this._tmpCanvas.width*4+4*T+3;if(a.data[A]!==0){x.bottom=M,S=!0;break}}if(S)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:x.right-x.left+1,y:x.bottom-x.top+1},sizeClipSpace:{x:x.right-x.left+1,y:x.bottom-x.top+1},offset:{x:-x.left+b+(m||L?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-x.top+b+(m||L?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}e.TextureAtlas=v;class u{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(a){this._glyphs.push(a),this._usedPixels+=a.size.x*a.size.y}constructor(a,x,w){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],w)for(const m of w)this._glyphs.push(...m.glyphs),this._usedPixels+=m._usedPixels;this.canvas=c(a,x,x),this.ctx=(0,r.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function s(g,a,x,w){const m=a.rgba>>>24,L=a.rgba>>>16&255,b=a.rgba>>>8&255,y=x.rgba>>>24,D=x.rgba>>>16&255,S=x.rgba>>>8&255,M=Math.floor((Math.abs(m-y)+Math.abs(L-D)+Math.abs(b-S))/12);let T=!0;for(let A=0;A<g.data.length;A+=4)g.data[A]===m&&g.data[A+1]===L&&g.data[A+2]===b||w&&Math.abs(g.data[A]-m)+Math.abs(g.data[A+1]-L)+Math.abs(g.data[A+2]-b)<M?g.data[A+3]=0:T=!1;return T}function c(g,a,x){const w=g.createElement("canvas");return w.width=a,w.height=x,w}},577:function(k,e,h){var d=this&&this.__decorate||function(f,_,n,v){var u,s=arguments.length,c=s<3?_:v===null?v=Object.getOwnPropertyDescriptor(_,n):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(f,_,n,v);else for(var g=f.length-1;g>=0;g--)(u=f[g])&&(c=(s<3?u(c):s>3?u(_,n,c):u(_,n))||c);return s>3&&c&&Object.defineProperty(_,n,c),c},o=this&&this.__param||function(f,_){return function(n,v){_(n,v,f)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterJoinerService=e.JoinedCellData=void 0;const r=h(147),l=h(855),p=h(782),C=h(97);class i extends r.AttributeData{constructor(_,n,v){super(),this.content=0,this.combinedData="",this.fg=_.fg,this.bg=_.bg,this.combinedData=n,this._width=v}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(_){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.JoinedCellData=i;let t=e.CharacterJoinerService=class Me{constructor(_){this._bufferService=_,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new p.CellData}register(_){const n={id:this._nextCharacterJoinerId++,handler:_};return this._characterJoiners.push(n),n.id}deregister(_){for(let n=0;n<this._characterJoiners.length;n++)if(this._characterJoiners[n].id===_)return this._characterJoiners.splice(n,1),!0;return!1}getJoinedCharacters(_){if(this._characterJoiners.length===0)return[];const n=this._bufferService.buffer.lines.get(_);if(!n||n.length===0)return[];const v=[],u=n.translateToString(!0);let s=0,c=0,g=0,a=n.getFg(0),x=n.getBg(0);for(let w=0;w<n.getTrimmedLength();w++)if(n.loadCell(w,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==a||this._workCell.bg!==x){if(w-s>1){const m=this._getJoinedRanges(u,g,c,n,s);for(let L=0;L<m.length;L++)v.push(m[L])}s=w,g=c,a=this._workCell.fg,x=this._workCell.bg}c+=this._workCell.getChars().length||l.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-s>1){const w=this._getJoinedRanges(u,g,c,n,s);for(let m=0;m<w.length;m++)v.push(w[m])}return v}_getJoinedRanges(_,n,v,u,s){const c=_.substring(n,v);let g=[];try{g=this._characterJoiners[0].handler(c)}catch(a){console.error(a)}for(let a=1;a<this._characterJoiners.length;a++)try{const x=this._characterJoiners[a].handler(c);for(let w=0;w<x.length;w++)Me._mergeRanges(g,x[w])}catch(x){console.error(x)}return this._stringRangesToCellRanges(g,u,s),g}_stringRangesToCellRanges(_,n,v){let u=0,s=!1,c=0,g=_[u];if(g){for(let a=v;a<this._bufferService.cols;a++){const x=n.getWidth(a),w=n.getString(a).length||l.WHITESPACE_CELL_CHAR.length;if(x!==0){if(!s&&g[0]<=c&&(g[0]=a,s=!0),g[1]<=c){if(g[1]=a,g=_[++u],!g)break;g[0]<=c?(g[0]=a,s=!0):s=!1}c+=w}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(_,n){let v=!1;for(let u=0;u<_.length;u++){const s=_[u];if(v){if(n[1]<=s[0])return _[u-1][1]=n[1],_;if(n[1]<=s[1])return _[u-1][1]=Math.max(n[1],s[1]),_.splice(u,1),_;_.splice(u,1),u--}else{if(n[1]<=s[0])return _.splice(u,0,n),_;if(n[1]<=s[1])return s[0]=Math.min(n[0],s[0]),_;n[0]<s[1]&&(s[0]=Math.min(n[0],s[0]),v=!0)}}return v?_[_.length-1][1]=n[1]:_.push(n),_}};e.CharacterJoinerService=t=d([o(0,C.IBufferService)],t)},160:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=e.NULL_COLOR=void 0;let h=0,d=0,o=0,r=0;var l,p,C,i,t;function f(n){const v=n.toString(16);return v.length<2?"0"+v:v}function _(n,v){return n<v?(v+.05)/(n+.05):(n+.05)/(v+.05)}e.NULL_COLOR={css:"#00000000",rgba:0},(function(n){n.toCss=function(v,u,s,c){return c!==void 0?`#${f(v)}${f(u)}${f(s)}${f(c)}`:`#${f(v)}${f(u)}${f(s)}`},n.toRgba=function(v,u,s,c=255){return(v<<24|u<<16|s<<8|c)>>>0},n.toColor=function(v,u,s,c){return{css:n.toCss(v,u,s,c),rgba:n.toRgba(v,u,s,c)}}})(l||(e.channels=l={})),(function(n){function v(u,s){return r=Math.round(255*s),[h,d,o]=t.toChannels(u.rgba),{css:l.toCss(h,d,o,r),rgba:l.toRgba(h,d,o,r)}}n.blend=function(u,s){if(r=(255&s.rgba)/255,r===1)return{css:s.css,rgba:s.rgba};const c=s.rgba>>24&255,g=s.rgba>>16&255,a=s.rgba>>8&255,x=u.rgba>>24&255,w=u.rgba>>16&255,m=u.rgba>>8&255;return h=x+Math.round((c-x)*r),d=w+Math.round((g-w)*r),o=m+Math.round((a-m)*r),{css:l.toCss(h,d,o),rgba:l.toRgba(h,d,o)}},n.isOpaque=function(u){return(255&u.rgba)==255},n.ensureContrastRatio=function(u,s,c){const g=t.ensureContrastRatio(u.rgba,s.rgba,c);if(g)return l.toColor(g>>24&255,g>>16&255,g>>8&255)},n.opaque=function(u){const s=(255|u.rgba)>>>0;return[h,d,o]=t.toChannels(s),{css:l.toCss(h,d,o),rgba:s}},n.opacity=v,n.multiplyOpacity=function(u,s){return r=255&u.rgba,v(u,r*s/255)},n.toColorRGB=function(u){return[u.rgba>>24&255,u.rgba>>16&255,u.rgba>>8&255]}})(p||(e.color=p={})),(function(n){let v,u;try{const s=document.createElement("canvas");s.width=1,s.height=1;const c=s.getContext("2d",{willReadFrequently:!0});c&&(v=c,v.globalCompositeOperation="copy",u=v.createLinearGradient(0,0,1,1))}catch{}n.toColor=function(s){if(s.match(/#[\da-f]{3,8}/i))switch(s.length){case 4:return h=parseInt(s.slice(1,2).repeat(2),16),d=parseInt(s.slice(2,3).repeat(2),16),o=parseInt(s.slice(3,4).repeat(2),16),l.toColor(h,d,o);case 5:return h=parseInt(s.slice(1,2).repeat(2),16),d=parseInt(s.slice(2,3).repeat(2),16),o=parseInt(s.slice(3,4).repeat(2),16),r=parseInt(s.slice(4,5).repeat(2),16),l.toColor(h,d,o,r);case 7:return{css:s,rgba:(parseInt(s.slice(1),16)<<8|255)>>>0};case 9:return{css:s,rgba:parseInt(s.slice(1),16)>>>0}}const c=s.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(c)return h=parseInt(c[1]),d=parseInt(c[2]),o=parseInt(c[3]),r=Math.round(255*(c[5]===void 0?1:parseFloat(c[5]))),l.toColor(h,d,o,r);if(!v||!u)throw new Error("css.toColor: Unsupported css format");if(v.fillStyle=u,v.fillStyle=s,typeof v.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(v.fillRect(0,0,1,1),[h,d,o,r]=v.getImageData(0,0,1,1).data,r!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:l.toRgba(h,d,o,r),css:s}}})(C||(e.css=C={})),(function(n){function v(u,s,c){const g=u/255,a=s/255,x=c/255;return .2126*(g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4))+.7152*(a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))+.0722*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))}n.relativeLuminance=function(u){return v(u>>16&255,u>>8&255,255&u)},n.relativeLuminance2=v})(i||(e.rgb=i={})),(function(n){function v(s,c,g){const a=s>>24&255,x=s>>16&255,w=s>>8&255;let m=c>>24&255,L=c>>16&255,b=c>>8&255,y=_(i.relativeLuminance2(m,L,b),i.relativeLuminance2(a,x,w));for(;y<g&&(m>0||L>0||b>0);)m-=Math.max(0,Math.ceil(.1*m)),L-=Math.max(0,Math.ceil(.1*L)),b-=Math.max(0,Math.ceil(.1*b)),y=_(i.relativeLuminance2(m,L,b),i.relativeLuminance2(a,x,w));return(m<<24|L<<16|b<<8|255)>>>0}function u(s,c,g){const a=s>>24&255,x=s>>16&255,w=s>>8&255;let m=c>>24&255,L=c>>16&255,b=c>>8&255,y=_(i.relativeLuminance2(m,L,b),i.relativeLuminance2(a,x,w));for(;y<g&&(m<255||L<255||b<255);)m=Math.min(255,m+Math.ceil(.1*(255-m))),L=Math.min(255,L+Math.ceil(.1*(255-L))),b=Math.min(255,b+Math.ceil(.1*(255-b))),y=_(i.relativeLuminance2(m,L,b),i.relativeLuminance2(a,x,w));return(m<<24|L<<16|b<<8|255)>>>0}n.blend=function(s,c){if(r=(255&c)/255,r===1)return c;const g=c>>24&255,a=c>>16&255,x=c>>8&255,w=s>>24&255,m=s>>16&255,L=s>>8&255;return h=w+Math.round((g-w)*r),d=m+Math.round((a-m)*r),o=L+Math.round((x-L)*r),l.toRgba(h,d,o)},n.ensureContrastRatio=function(s,c,g){const a=i.relativeLuminance(s>>8),x=i.relativeLuminance(c>>8);if(_(a,x)<g){if(x<a){const L=v(s,c,g),b=_(a,i.relativeLuminance(L>>8));if(b<g){const y=u(s,c,g);return b>_(a,i.relativeLuminance(y>>8))?L:y}return L}const w=u(s,c,g),m=_(a,i.relativeLuminance(w>>8));if(m<g){const L=v(s,c,g);return m>_(a,i.relativeLuminance(L>>8))?w:L}return w}},n.reduceLuminance=v,n.increaseLuminance=u,n.toChannels=function(s){return[s>>24&255,s>>16&255,s>>8&255,255&s]}})(t||(e.rgba=t={})),e.toPaddedHex=f,e.contrastRatio=_},345:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.runAndSubscribe=e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const o=[];for(let r=0;r<this._listeners.length;r++)o.push(this._listeners[r]);for(let r=0;r<o.length;r++)o[r].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},e.forwardEvent=function(h,d){return h((o=>d.fire(o)))},e.runAndSubscribe=function(h,d){return d(void 0),h((o=>d(o)))}},859:(k,e)=>{function h(d){for(const o of d)o.dispose();d.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.MutableDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const o=this._disposables.indexOf(d);o!==-1&&this._disposables.splice(o,1)}},e.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var o;this._isDisposed||d===this._value||((o=this._value)==null||o.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},e.toDisposable=function(d){return{dispose:d}},e.disposeArray=h,e.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},485:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(o,r,l){this._data[o]||(this._data[o]={}),this._data[o][r]=l}get(o,r){return this._data[o]?this._data[o][r]:void 0}clear(){this._data={}}}e.TwoKeyMap=h,e.FourKeyMap=class{constructor(){this._data=new h}set(d,o,r,l,p){this._data.get(d,o)||this._data.set(d,o,new h),this._data.get(d,o).set(r,l,p)}get(d,o,r,l){var p;return(p=this._data.get(d,o))==null?void 0:p.get(r,l)}clear(){this._data.clear()}}},399:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChromeOS=e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.getSafariVersion=e.isSafari=e.isLegacyEdge=e.isFirefox=e.isNode=void 0,e.isNode=typeof process<"u"&&"title"in process;const h=e.isNode?"node":navigator.userAgent,d=e.isNode?"node":navigator.platform;e.isFirefox=h.includes("Firefox"),e.isLegacyEdge=h.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(h),e.getSafariVersion=function(){if(!e.isSafari)return 0;const o=h.match(/Version\/(\d+)/);return o===null||o.length<2?0:parseInt(o[1])},e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),e.isIpad=d==="iPad",e.isIphone=d==="iPhone",e.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),e.isLinux=d.indexOf("Linux")>=0,e.isChromeOS=/\bCrOS\b/.test(h)},385:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DebouncedIdleTask=e.IdleTaskQueue=e.PriorityTaskQueue=void 0;const d=h(399);class o{constructor(){this._tasks=[],this._i=0}enqueue(p){this._tasks.push(p),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(p){this._idleCallback=void 0;let C=0,i=0,t=p.timeRemaining(),f=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),i=Math.max(C,i),f=p.timeRemaining(),1.5*i>f)return t-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(t-C))}ms`),void this._start();t=f}this.clear()}}class r extends o{_requestCallback(p){return setTimeout((()=>p(this._createDeadline(16))))}_cancelCallback(p){clearTimeout(p)}_createDeadline(p){const C=Date.now()+p;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}e.PriorityTaskQueue=r,e.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends o{_requestCallback(l){return requestIdleCallback(l)}_cancelCallback(l){cancelIdleCallback(l)}}:r,e.DebouncedIdleTask=class{constructor(){this._queue=new e.IdleTaskQueue}set(l){this._queue.clear(),this._queue.enqueue(l)}flush(){this._queue.flush()}}},147:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(r){return[r>>>16&255,r>>>8&255,255&r]}static fromColorRGB(r){return(255&r[0])<<16|(255&r[1])<<8|255&r[2]}clone(){const r=new h;return r.fg=this.fg,r.bg=this.bg,r.extended=this.extended.clone(),r}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}e.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(r){this._ext=r}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(r){this._ext&=-469762049,this._ext|=r<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(r){this._ext&=-67108864,this._ext|=67108863&r}get urlId(){return this._urlId}set urlId(r){this._urlId=r}get underlineVariantOffset(){const r=(3758096384&this._ext)>>29;return r<0?4294967288^r:r}set underlineVariantOffset(r){this._ext&=536870911,this._ext|=r<<29&3758096384}constructor(r=0,l=0){this._ext=0,this._urlId=0,this._ext=r,this._urlId=l}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}e.ExtendedAttrs=d},782:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const d=h(133),o=h(855),r=h(147);class l extends r.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new r.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const i=new l;return i.setFromCharData(C),i}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[o.CHAR_DATA_ATTR_INDEX],this.bg=0;let i=!1;if(C[o.CHAR_DATA_CHAR_INDEX].length>2)i=!0;else if(C[o.CHAR_DATA_CHAR_INDEX].length===2){const t=C[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const f=C[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=f&&f<=57343?this.content=1024*(t-55296)+f-56320+65536|C[o.CHAR_DATA_WIDTH_INDEX]<<22:i=!0}else i=!0}else this.content=C[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[o.CHAR_DATA_WIDTH_INDEX]<<22;i&&(this.combinedData=C[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[o.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=l},855:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=0,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},e.utf32ToString=function(h,d=0,o=h.length){let r="";for(let l=d;l<o;++l){let p=h[l];p>65535?(p-=65536,r+=String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):r+=String.fromCharCode(p)}return r},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const o=h.length;if(!o)return 0;let r=0,l=0;if(this._interim){const p=h.charCodeAt(l++);56320<=p&&p<=57343?d[r++]=1024*(this._interim-55296)+p-56320+65536:(d[r++]=this._interim,d[r++]=p),this._interim=0}for(let p=l;p<o;++p){const C=h.charCodeAt(p);if(55296<=C&&C<=56319){if(++p>=o)return this._interim=C,r;const i=h.charCodeAt(p);56320<=i&&i<=57343?d[r++]=1024*(C-55296)+i-56320+65536:(d[r++]=C,d[r++]=i)}else C!==65279&&(d[r++]=C)}return r}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const o=h.length;if(!o)return 0;let r,l,p,C,i=0,t=0,f=0;if(this.interim[0]){let v=!1,u=this.interim[0];u&=(224&u)==192?31:(240&u)==224?15:7;let s,c=0;for(;(s=63&this.interim[++c])&&c<4;)u<<=6,u|=s;const g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,a=g-c;for(;f<a;){if(f>=o)return 0;if(s=h[f++],(192&s)!=128){f--,v=!0;break}this.interim[c++]=s,u<<=6,u|=63&s}v||(g===2?u<128?f--:d[i++]=u:g===3?u<2048||u>=55296&&u<=57343||u===65279||(d[i++]=u):u<65536||u>1114111||(d[i++]=u)),this.interim.fill(0)}const _=o-4;let n=f;for(;n<o;){for(;!(!(n<_)||128&(r=h[n])||128&(l=h[n+1])||128&(p=h[n+2])||128&(C=h[n+3]));)d[i++]=r,d[i++]=l,d[i++]=p,d[i++]=C,n+=4;if(r=h[n++],r<128)d[i++]=r;else if((224&r)==192){if(n>=o)return this.interim[0]=r,i;if(l=h[n++],(192&l)!=128){n--;continue}if(t=(31&r)<<6|63&l,t<128){n--;continue}d[i++]=t}else if((240&r)==224){if(n>=o)return this.interim[0]=r,i;if(l=h[n++],(192&l)!=128){n--;continue}if(n>=o)return this.interim[0]=r,this.interim[1]=l,i;if(p=h[n++],(192&p)!=128){n--;continue}if(t=(15&r)<<12|(63&l)<<6|63&p,t<2048||t>=55296&&t<=57343||t===65279)continue;d[i++]=t}else if((248&r)==240){if(n>=o)return this.interim[0]=r,i;if(l=h[n++],(192&l)!=128){n--;continue}if(n>=o)return this.interim[0]=r,this.interim[1]=l,i;if(p=h[n++],(192&p)!=128){n--;continue}if(n>=o)return this.interim[0]=r,this.interim[1]=l,this.interim[2]=p,i;if(C=h[n++],(192&C)!=128){n--;continue}if(t=(7&r)<<18|(63&l)<<12|(63&p)<<6|63&C,t<65536||t>1114111)continue;d[i++]=t}}return i}}},776:function(k,e,h){var d=this&&this.__decorate||function(t,f,_,n){var v,u=arguments.length,s=u<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,_):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,f,_,n);else for(var c=t.length-1;c>=0;c--)(v=t[c])&&(s=(u<3?v(s):u>3?v(f,_,s):v(f,_))||s);return u>3&&s&&Object.defineProperty(f,_,s),s},o=this&&this.__param||function(t,f){return function(_,n){f(_,n,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.traceCall=e.setTraceLogger=e.LogService=void 0;const r=h(859),l=h(97),p={trace:l.LogLevelEnum.TRACE,debug:l.LogLevelEnum.DEBUG,info:l.LogLevelEnum.INFO,warn:l.LogLevelEnum.WARN,error:l.LogLevelEnum.ERROR,off:l.LogLevelEnum.OFF};let C,i=e.LogService=class extends r.Disposable{get logLevel(){return this._logLevel}constructor(t){super(),this._optionsService=t,this._logLevel=l.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=p[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let f=0;f<t.length;f++)typeof t[f]=="function"&&(t[f]=t[f]())}_log(t,f,_){this._evalLazyOptionalParams(_),t.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+f,..._)}trace(t,...f){var _;this._logLevel<=l.LogLevelEnum.TRACE&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.trace.bind(this._optionsService.options.logger))??console.log,t,f)}debug(t,...f){var _;this._logLevel<=l.LogLevelEnum.DEBUG&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.debug.bind(this._optionsService.options.logger))??console.log,t,f)}info(t,...f){var _;this._logLevel<=l.LogLevelEnum.INFO&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.info.bind(this._optionsService.options.logger))??console.info,t,f)}warn(t,...f){var _;this._logLevel<=l.LogLevelEnum.WARN&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.warn.bind(this._optionsService.options.logger))??console.warn,t,f)}error(t,...f){var _;this._logLevel<=l.LogLevelEnum.ERROR&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.error.bind(this._optionsService.options.logger))??console.error,t,f)}};e.LogService=i=d([o(0,l.IOptionsService)],i),e.setTraceLogger=function(t){C=t},e.traceCall=function(t,f,_){if(typeof _.value!="function")throw new Error("not supported");const n=_.value;_.value=function(...v){if(C.logLevel!==l.LogLevelEnum.TRACE)return n.apply(this,v);C.trace(`GlyphRenderer#${n.name}(${v.map((s=>JSON.stringify(s))).join(", ")})`);const u=n.apply(this,v);return C.trace(`GlyphRenderer#${n.name} return`,u),u}}},726:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0;const h="di$target",d="di$dependencies";e.serviceRegistry=new Map,e.getServiceDependencies=function(o){return o[d]||[]},e.createDecorator=function(o){if(e.serviceRegistry.has(o))return e.serviceRegistry.get(o);const r=function(l,p,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(i,t,f){t[h]===t?t[d].push({id:i,index:f}):(t[d]=[{id:i,index:f}],t[h]=t)})(r,l,C)};return r.toString=()=>o,e.serviceRegistry.set(o,r),r}},97:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationService=e.IUnicodeService=e.IOscLinkService=e.IOptionsService=e.ILogService=e.LogLevelEnum=e.IInstantiationService=e.ICharsetService=e.ICoreService=e.ICoreMouseService=e.IBufferService=void 0;const d=h(726);var o;e.IBufferService=(0,d.createDecorator)("BufferService"),e.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),e.ICoreService=(0,d.createDecorator)("CoreService"),e.ICharsetService=(0,d.createDecorator)("CharsetService"),e.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(r){r[r.TRACE=0]="TRACE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.OFF=5]="OFF"})(o||(e.LogLevelEnum=o={})),e.ILogService=(0,d.createDecorator)("LogService"),e.IOptionsService=(0,d.createDecorator)("OptionsService"),e.IOscLinkService=(0,d.createDecorator)("OscLinkService"),e.IUnicodeService=(0,d.createDecorator)("UnicodeService"),e.IDecorationService=(0,d.createDecorator)("DecorationService")}},J={};function N(k){var e=J[k];if(e!==void 0)return e.exports;var h=J[k]={exports:{}};return te[k].call(h.exports,h,h.exports,N),h.exports}var ie={};return(()=>{var k=ie;Object.defineProperty(k,"__esModule",{value:!0}),k.CanvasAddon=void 0;const e=N(345),h=N(859),d=N(776),o=N(949);class r extends h.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new e.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new e.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var p;return(p=this._renderer)==null?void 0:p.textureAtlas}activate(p){const C=p._core;if(!p.element)return void this.register(C.onWillOpen((()=>this.activate(p))));this._terminal=p;const i=C.coreService,t=C.optionsService,f=C.screenElement,_=C.linkifier,n=C,v=n._bufferService,u=n._renderService,s=n._characterJoinerService,c=n._charSizeService,g=n._coreBrowserService,a=n._decorationService,x=n._logService,w=n._themeService;(0,d.setTraceLogger)(x),this._renderer=new o.CanvasRenderer(p,f,_,v,c,t,s,i,g,a,w),this.register((0,e.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,e.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),u.setRenderer(this._renderer),u.handleResize(v.cols,v.rows),this.register((0,h.toDisposable)((()=>{var m;u.setRenderer(this._terminal._core._createRenderer()),u.handleResize(p.cols,p.rows),(m=this._renderer)==null||m.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var p;(p=this._renderer)==null||p.clearTextureAtlas()}}k.CanvasAddon=r})(),ie})()))})(Ce)),Ce.exports}var ke=Te();const Ee=De({__proto__:null},[ke]);export{Ee as a};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
3
|
+
* @license MIT
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
6
|
+
* @license MIT
|
|
7
|
+
*
|
|
8
|
+
* Originally forked from (with the author's permission):
|
|
9
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
10
|
+
* http://bellard.org/jslinux/
|
|
11
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
12
|
+
*/var c=2,d=1,_=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let i=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(i._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var l;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let i=this._terminal.options.scrollback===0?0:((l=this._terminal.options.overviewRuler)==null?void 0:l.width)||14,s=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(s.getPropertyValue("height")),a=Math.max(0,parseInt(s.getPropertyValue("width"))),t=window.getComputedStyle(this._terminal.element),r={top:parseInt(t.getPropertyValue("padding-top")),bottom:parseInt(t.getPropertyValue("padding-bottom")),right:parseInt(t.getPropertyValue("padding-right")),left:parseInt(t.getPropertyValue("padding-left"))},n=r.top+r.bottom,h=r.right+r.left,m=o-n,p=a-h-i;return{cols:Math.max(c,Math.floor(p/e.css.cell.width)),rows:Math.max(d,Math.floor(m/e.css.cell.height))}}};export{_ as FitAddon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as O}from"./chunk-JZWAC4HX-C4pqxYJB.js";function j(b,k){for(var _=0;_<k.length;_++){const l=k[_];if(typeof l!="string"&&!Array.isArray(l)){for(const u in l)if(u!=="default"&&!(u in b)){const L=Object.getOwnPropertyDescriptor(l,u);L&&Object.defineProperty(b,u,L.get?L:{enumerable:!0,get:()=>l[u]})}}}return Object.freeze(Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}},$;function A(){return $||($=1,(function(b,k){(function(_,l){b.exports=l()})(self,(()=>(()=>{var _={6:(p,d)=>{function h(n){try{const e=new URL(n),t=e.password&&e.username?`${e.protocol}//${e.username}:${e.password}@${e.host}`:e.username?`${e.protocol}//${e.username}@${e.host}`:`${e.protocol}//${e.host}`;return n.toLocaleLowerCase().startsWith(t.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(d,"__esModule",{value:!0}),d.LinkComputer=d.WebLinkProvider=void 0,d.WebLinkProvider=class{constructor(n,e,t,r={}){this._terminal=n,this._regex=e,this._handler=t,this._options=r}provideLinks(n,e){const t=f.computeLink(n,this._regex,this._terminal,this._handler);e(this._addCallbacks(t))}_addCallbacks(n){return n.map((e=>(e.leave=this._options.leave,e.hover=(t,r)=>{if(this._options.hover){const{range:c}=e;this._options.hover(t,r,c)}},e)))}};class f{static computeLink(e,t,r,c){const g=new RegExp(t.source,(t.flags||"")+"g"),[o,s]=f._getWindowedLineStrings(e-1,r),i=o.join("");let a;const x=[];for(;a=g.exec(i);){const v=a[0];if(!h(v))continue;const[m,W]=f._mapStrIdx(r,s,0,a.index),[y,P]=f._mapStrIdx(r,m,W,v.length);if(m===-1||W===-1||y===-1||P===-1)continue;const S={start:{x:W+1,y:m+1},end:{x:P,y:y+1}};x.push({range:S,text:v,activate:c})}return x}static _getWindowedLineStrings(e,t){let r,c=e,g=e,o=0,s="";const i=[];if(r=t.buffer.active.getLine(e)){const a=r.translateToString(!0);if(r.isWrapped&&a[0]!==" "){for(o=0;(r=t.buffer.active.getLine(--c))&&o<2048&&(s=r.translateToString(!0),o+=s.length,i.push(s),r.isWrapped&&s.indexOf(" ")===-1););i.reverse()}for(i.push(a),o=0;(r=t.buffer.active.getLine(++g))&&r.isWrapped&&o<2048&&(s=r.translateToString(!0),o+=s.length,i.push(s),s.indexOf(" ")===-1););}return[i,c]}static _mapStrIdx(e,t,r,c){const g=e.buffer.active,o=g.getNullCell();let s=r;for(;c;){const i=g.getLine(t);if(!i)return[-1,-1];for(let a=s;a<i.length;++a){i.getCell(a,o);const x=o.getChars();if(o.getWidth()&&(c-=x.length||1,a===i.length-1&&x==="")){const v=g.getLine(t+1);v&&v.isWrapped&&(v.getCell(0,o),o.getWidth()===2&&(c+=1))}if(c<0)return[t,a]}t++,s=0}return[t,s]}}d.LinkComputer=f}},l={};function u(p){var d=l[p];if(d!==void 0)return d.exports;var h=l[p]={exports:{}};return _[p](h,h.exports,u),h.exports}var L={};return(()=>{var p=L;Object.defineProperty(p,"__esModule",{value:!0}),p.WebLinksAddon=void 0;const d=u(6),h=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(n,e){const t=window.open();if(t){try{t.opener=null}catch{}t.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}p.WebLinksAddon=class{constructor(n=f,e={}){this._handler=n,this._options=e}activate(n){this._terminal=n;const e=this._options,t=e.urlRegex||h;this._linkProvider=this._terminal.registerLinkProvider(new d.WebLinkProvider(this._terminal,t,this._handler,e))}dispose(){var n;(n=this._linkProvider)==null||n.dispose()}}})(),L})()))})(w)),w.exports}var C=A();const T=O(C),E=j({__proto__:null,default:T},[C]);export{E as a};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function Ee(ne,ve){for(var re=0;re<ve.length;re++){const Q=ve[re];if(typeof Q!="string"&&!Array.isArray(Q)){for(const V in Q)if(V!=="default"&&!(V in ne)){const oe=Object.getOwnPropertyDescriptor(Q,V);oe&&Object.defineProperty(ne,V,oe.get?oe:{enumerable:!0,get:()=>Q[V]})}}}return Object.freeze(Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"}))}var me={exports:{}},Me;function Se(){return Me||(Me=1,(function(ne,ve){(function(re,Q){ne.exports=Q()})(self,(()=>(()=>{var re={965:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;const l=c(374),o=c(509),r=c(855),_=c(859),m=c(381),d=11,i=d*Float32Array.BYTES_PER_ELEMENT;let t,g=0,w=0,L=0;class M extends _.Disposable{constructor(a,C,u,h){super(),this._terminal=a,this._gl=C,this._dimensions=u,this._optionsService=h,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const s=this._gl;o.TextureAtlas.maxAtlasPages===void 0&&(o.TextureAtlas.maxAtlasPages=Math.min(32,(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),o.TextureAtlas.maxTextureSize=(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=(0,l.throwIfFalsy)((0,m.createProgram)(s,`#version 300 es
|
|
2
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
3
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
4
|
+
layout (location = 2) in vec2 a_offset;
|
|
5
|
+
layout (location = 3) in vec2 a_size;
|
|
6
|
+
layout (location = 4) in float a_texpage;
|
|
7
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
8
|
+
layout (location = 6) in vec2 a_texsize;
|
|
9
|
+
|
|
10
|
+
uniform mat4 u_projection;
|
|
11
|
+
uniform vec2 u_resolution;
|
|
12
|
+
|
|
13
|
+
out vec2 v_texcoord;
|
|
14
|
+
flat out int v_texpage;
|
|
15
|
+
|
|
16
|
+
void main() {
|
|
17
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
18
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
19
|
+
v_texpage = int(a_texpage);
|
|
20
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
21
|
+
}`,(function(y){let R="";for(let b=1;b<y;b++)R+=` else if (v_texpage == ${b}) { outColor = texture(u_texture[${b}], v_texcoord); }`;return`#version 300 es
|
|
22
|
+
precision lowp float;
|
|
23
|
+
|
|
24
|
+
in vec2 v_texcoord;
|
|
25
|
+
flat in int v_texpage;
|
|
26
|
+
|
|
27
|
+
uniform sampler2D u_texture[${y}];
|
|
28
|
+
|
|
29
|
+
out vec4 outColor;
|
|
30
|
+
|
|
31
|
+
void main() {
|
|
32
|
+
if (v_texpage == 0) {
|
|
33
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
34
|
+
} ${R}
|
|
35
|
+
}`})(o.TextureAtlas.maxAtlasPages))),this.register((0,_.toDisposable)((()=>s.deleteProgram(this._program)))),this._projectionLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);const v=new Float32Array([0,0,1,0,0,1,1,1]),n=s.createBuffer();this.register((0,_.toDisposable)((()=>s.deleteBuffer(n)))),s.bindBuffer(s.ARRAY_BUFFER,n),s.bufferData(s.ARRAY_BUFFER,v,s.STATIC_DRAW),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const p=new Uint8Array([0,1,2,3]),f=s.createBuffer();this.register((0,_.toDisposable)((()=>s.deleteBuffer(f)))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,f),s.bufferData(s.ELEMENT_ARRAY_BUFFER,p,s.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(s.createBuffer()),this.register((0,_.toDisposable)((()=>s.deleteBuffer(this._attributesBuffer)))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,2,s.FLOAT,!1,i,0),s.vertexAttribDivisor(2,1),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,s.FLOAT,!1,i,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(3,1),s.enableVertexAttribArray(4),s.vertexAttribPointer(4,1,s.FLOAT,!1,i,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(4,1),s.enableVertexAttribArray(5),s.vertexAttribPointer(5,2,s.FLOAT,!1,i,5*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(5,1),s.enableVertexAttribArray(6),s.vertexAttribPointer(6,2,s.FLOAT,!1,i,7*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(6,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,i,9*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.useProgram(this._program);const A=new Int32Array(o.TextureAtlas.maxAtlasPages);for(let y=0;y<o.TextureAtlas.maxAtlasPages;y++)A[y]=y;s.uniform1iv(this._textureLocation,A),s.uniformMatrix4fv(this._projectionLocation,!1,m.PROJECTION_MATRIX),this._atlasTextures=[];for(let y=0;y<o.TextureAtlas.maxAtlasPages;y++){const R=new m.GLTexture((0,l.throwIfFalsy)(s.createTexture()));this.register((0,_.toDisposable)((()=>s.deleteTexture(R.texture)))),s.activeTexture(s.TEXTURE0+y),s.bindTexture(s.TEXTURE_2D,R.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[y]=R}s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(a,C,u,h,s,v,n,p,f){this._updateCell(this._vertices.attributes,a,C,u,h,s,v,n,p,f)}_updateCell(a,C,u,h,s,v,n,p,f,A){g=(u*this._terminal.cols+C)*d,h!==r.NULL_CELL_CODE&&h!==void 0?this._atlas&&(t=p&&p.length>1?this._atlas.getRasterizedGlyphCombinedChar(p,s,v,n,!1):this._atlas.getRasterizedGlyph(h,s,v,n,!1),w=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),s!==A&&t.offset.x>w?(L=t.offset.x-w,a[g]=-(t.offset.x-L)+this._dimensions.device.char.left,a[g+1]=-t.offset.y+this._dimensions.device.char.top,a[g+2]=(t.size.x-L)/this._dimensions.device.canvas.width,a[g+3]=t.size.y/this._dimensions.device.canvas.height,a[g+4]=t.texturePage,a[g+5]=t.texturePositionClipSpace.x+L/this._atlas.pages[t.texturePage].canvas.width,a[g+6]=t.texturePositionClipSpace.y,a[g+7]=t.sizeClipSpace.x-L/this._atlas.pages[t.texturePage].canvas.width,a[g+8]=t.sizeClipSpace.y):(a[g]=-t.offset.x+this._dimensions.device.char.left,a[g+1]=-t.offset.y+this._dimensions.device.char.top,a[g+2]=t.size.x/this._dimensions.device.canvas.width,a[g+3]=t.size.y/this._dimensions.device.canvas.height,a[g+4]=t.texturePage,a[g+5]=t.texturePositionClipSpace.x,a[g+6]=t.texturePositionClipSpace.y,a[g+7]=t.sizeClipSpace.x,a[g+8]=t.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,l.allowRescaling)(h,f,t.size.x,this._dimensions.device.cell.width)&&(a[g+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):a.fill(0,g,g+d-1-2)}clear(){const a=this._terminal,C=a.cols*a.rows*d;this._vertices.count!==C?this._vertices.attributes=new Float32Array(C):this._vertices.attributes.fill(0);let u=0;for(;u<this._vertices.attributesBuffers.length;u++)this._vertices.count!==C?this._vertices.attributesBuffers[u]=new Float32Array(C):this._vertices.attributesBuffers[u].fill(0);this._vertices.count=C,u=0;for(let h=0;h<a.rows;h++)for(let s=0;s<a.cols;s++)this._vertices.attributes[u+9]=s/a.cols,this._vertices.attributes[u+10]=h/a.rows,u+=d}handleResize(){const a=this._gl;a.useProgram(this._program),a.viewport(0,0,a.canvas.width,a.canvas.height),a.uniform2f(this._resolutionLocation,a.canvas.width,a.canvas.height),this.clear()}render(a){if(!this._atlas)return;const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const u=this._vertices.attributesBuffers[this._activeBuffer];let h=0;for(let s=0;s<a.lineLengths.length;s++){const v=s*this._terminal.cols*d,n=this._vertices.attributes.subarray(v,v+a.lineLengths[s]*d);u.set(n,h),h+=n.length}C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,u.subarray(0,h),C.STREAM_DRAW);for(let s=0;s<this._atlas.pages.length;s++)this._atlas.pages[s].version!==this._atlasTextures[s].version&&this._bindAtlasPageTexture(C,this._atlas,s);C.drawElementsInstanced(C.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,h/d)}setAtlas(a){this._atlas=a;for(const C of this._atlasTextures)C.version=-1}_bindAtlasPageTexture(a,C,u){a.activeTexture(a.TEXTURE0+u),a.bindTexture(a.TEXTURE_2D,this._atlasTextures[u].texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,C.pages[u].canvas),a.generateMipmap(a.TEXTURE_2D),this._atlasTextures[u].version=C.pages[u].version}setDimensions(a){this._dimensions=a}}e.GlyphRenderer=M},742:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleRenderer=void 0;const l=c(374),o=c(859),r=c(310),_=c(381),m=8*Float32Array.BYTES_PER_ELEMENT;class d{constructor(){this.attributes=new Float32Array(160),this.count=0}}let i=0,t=0,g=0,w=0,L=0,M=0,x=0;class a extends o.Disposable{constructor(u,h,s,v){super(),this._terminal=u,this._gl=h,this._dimensions=s,this._themeService=v,this._vertices=new d,this._verticesCursor=new d;const n=this._gl;this._program=(0,l.throwIfFalsy)((0,_.createProgram)(n,`#version 300 es
|
|
36
|
+
layout (location = 0) in vec2 a_position;
|
|
37
|
+
layout (location = 1) in vec2 a_size;
|
|
38
|
+
layout (location = 2) in vec4 a_color;
|
|
39
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
40
|
+
|
|
41
|
+
uniform mat4 u_projection;
|
|
42
|
+
|
|
43
|
+
out vec4 v_color;
|
|
44
|
+
|
|
45
|
+
void main() {
|
|
46
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
47
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
48
|
+
v_color = a_color;
|
|
49
|
+
}`,`#version 300 es
|
|
50
|
+
precision lowp float;
|
|
51
|
+
|
|
52
|
+
in vec4 v_color;
|
|
53
|
+
|
|
54
|
+
out vec4 outColor;
|
|
55
|
+
|
|
56
|
+
void main() {
|
|
57
|
+
outColor = v_color;
|
|
58
|
+
}`)),this.register((0,o.toDisposable)((()=>n.deleteProgram(this._program)))),this._projectionLocation=(0,l.throwIfFalsy)(n.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);const p=new Float32Array([0,0,1,0,0,1,1,1]),f=n.createBuffer();this.register((0,o.toDisposable)((()=>n.deleteBuffer(f)))),n.bindBuffer(n.ARRAY_BUFFER,f),n.bufferData(n.ARRAY_BUFFER,p,n.STATIC_DRAW),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const A=new Uint8Array([0,1,2,3]),y=n.createBuffer();this.register((0,o.toDisposable)((()=>n.deleteBuffer(y)))),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,y),n.bufferData(n.ELEMENT_ARRAY_BUFFER,A,n.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(n.createBuffer()),this.register((0,o.toDisposable)((()=>n.deleteBuffer(this._attributesBuffer)))),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,m,0),n.vertexAttribDivisor(0,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,m,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,4,n.FLOAT,!1,m,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(2,1),this._updateCachedColors(v.colors),this.register(this._themeService.onChangeColors((R=>{this._updateCachedColors(R),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(u){const h=this._gl;h.useProgram(this._program),h.bindVertexArray(this._vertexArrayObject),h.uniformMatrix4fv(this._projectionLocation,!1,_.PROJECTION_MATRIX),h.bindBuffer(h.ARRAY_BUFFER,this._attributesBuffer),h.bufferData(h.ARRAY_BUFFER,u.attributes,h.DYNAMIC_DRAW),h.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,h.UNSIGNED_BYTE,0,u.count)}handleResize(){this._updateViewportRectangle()}setDimensions(u){this._dimensions=u}_updateCachedColors(u){this._bgFloat=this._colorToFloat32Array(u.background),this._cursorFloat=this._colorToFloat32Array(u.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(u){const h=this._terminal,s=this._vertices;let v,n,p,f,A,y,R,b,S,E,O,B=1;for(v=0;v<h.rows;v++){for(p=-1,f=0,A=0,y=!1,n=0;n<h.cols;n++)R=(v*h.cols+n)*r.RENDER_MODEL_INDICIES_PER_CELL,b=u.cells[R+r.RENDER_MODEL_BG_OFFSET],S=u.cells[R+r.RENDER_MODEL_FG_OFFSET],E=!!(67108864&S),(b!==f||S!==A&&(y||E))&&((f!==0||y&&A!==0)&&(O=8*B++,this._updateRectangle(s,O,A,f,p,n,v)),p=n,f=b,A=S,y=E);(f!==0||y&&A!==0)&&(O=8*B++,this._updateRectangle(s,O,A,f,p,h.cols,v))}s.count=B}updateCursor(u){const h=this._verticesCursor,s=u.cursor;if(!s||s.style==="block")return void(h.count=0);let v,n=0;s.style!=="bar"&&s.style!=="outline"||(v=8*n++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.style==="bar"?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),s.style!=="underline"&&s.style!=="outline"||(v=8*n++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),s.style==="outline"&&(v=8*n++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),v=8*n++,this._addRectangleFloat(h.attributes,v,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),h.count=n}_updateRectangle(u,h,s,v,n,p,f){if(67108864&s)switch(50331648&s){case 16777216:case 33554432:i=this._themeService.colors.ansi[255&s].rgba;break;case 50331648:i=(16777215&s)<<8;break;default:i=this._themeService.colors.foreground.rgba}else switch(50331648&v){case 16777216:case 33554432:i=this._themeService.colors.ansi[255&v].rgba;break;case 50331648:i=(16777215&v)<<8;break;default:i=this._themeService.colors.background.rgba}u.attributes.length<h+4&&(u.attributes=(0,_.expandFloat32Array)(u.attributes,this._terminal.rows*this._terminal.cols*8)),t=n*this._dimensions.device.cell.width,g=f*this._dimensions.device.cell.height,w=(i>>24&255)/255,L=(i>>16&255)/255,M=(i>>8&255)/255,x=1,this._addRectangle(u.attributes,h,t,g,(p-n)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,w,L,M,x)}_addRectangle(u,h,s,v,n,p,f,A,y,R){u[h]=s/this._dimensions.device.canvas.width,u[h+1]=v/this._dimensions.device.canvas.height,u[h+2]=n/this._dimensions.device.canvas.width,u[h+3]=p/this._dimensions.device.canvas.height,u[h+4]=f,u[h+5]=A,u[h+6]=y,u[h+7]=R}_addRectangleFloat(u,h,s,v,n,p,f){u[h]=s/this._dimensions.device.canvas.width,u[h+1]=v/this._dimensions.device.canvas.height,u[h+2]=n/this._dimensions.device.canvas.width,u[h+3]=p/this._dimensions.device.canvas.height,u[h+4]=f[0],u[h+5]=f[1],u[h+6]=f[2],u[h+7]=f[3]}_colorToFloat32Array(u){return new Float32Array([(u.rgba>>24&255)/255,(u.rgba>>16&255)/255,(u.rgba>>8&255)/255,(255&u.rgba)/255])}}e.RectangleRenderer=a},310:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RenderModel=e.COMBINED_CHAR_BIT_MASK=e.RENDER_MODEL_EXT_OFFSET=e.RENDER_MODEL_FG_OFFSET=e.RENDER_MODEL_BG_OFFSET=e.RENDER_MODEL_INDICIES_PER_CELL=void 0;const l=c(296);e.RENDER_MODEL_INDICIES_PER_CELL=4,e.RENDER_MODEL_BG_OFFSET=1,e.RENDER_MODEL_FG_OFFSET=2,e.RENDER_MODEL_EXT_OFFSET=3,e.COMBINED_CHAR_BIT_MASK=2147483648,e.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,l.createSelectionRenderModel)()}resize(o,r){const _=o*r*e.RENDER_MODEL_INDICIES_PER_CELL;_!==this.cells.length&&(this.cells=new Uint32Array(_),this.lineLengths=new Uint32Array(r))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JoinedCellData=e.WebglRenderer=void 0;const l=c(820),o=c(274),r=c(627),_=c(457),m=c(56),d=c(374),i=c(345),t=c(859),g=c(147),w=c(782),L=c(855),M=c(965),x=c(742),a=c(310),C=c(733);class u extends t.Disposable{constructor(n,p,f,A,y,R,b,S,E){super(),this._terminal=n,this._characterJoinerService=p,this._charSizeService=f,this._coreBrowserService=A,this._coreService=y,this._decorationService=R,this._optionsService=b,this._themeService=S,this._cursorBlinkStateManager=new t.MutableDisposable,this._charAtlasDisposable=this.register(new t.MutableDisposable),this._observerDisposable=this.register(new t.MutableDisposable),this._model=new a.RenderModel,this._workCell=new w.CellData,this._workCell2=new w.CellData,this._rectangleRenderer=this.register(new t.MutableDisposable),this._glyphRenderer=this.register(new t.MutableDisposable),this._onChangeTextureAtlas=this.register(new i.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new i.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new i.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new i.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new i.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new o.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new C.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,b,this._themeService)],this.dimensions=(0,d.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(b.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const O={antialias:!1,depth:!1,preserveDrawingBuffer:E};if(this._gl=this._canvas.getContext("webgl2",O),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextlost",(B=>{console.log("webglcontextlost event received"),B.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(B)}),3e3)}))),this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextrestored",(B=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,r.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,m.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((B,W)=>this._setCanvasDevicePixelDimensions(B,W))),this.register(this._coreBrowserService.onWindowChange((B=>{this._observerDisposable.value=(0,m.observeDevicePixelDimensions)(this._canvas,B,((W,I)=>this._setCanvasDevicePixelDimensions(W,I)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,t.toDisposable)((()=>{var B;for(const W of this._renderLayers)W.dispose();(B=this._canvas.parentElement)==null||B.removeChild(this._canvas),(0,r.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var n;return(n=this._charAtlas)==null?void 0:n.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(n,p){var f,A,y,R;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const b of this._renderLayers)b.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(f=this._rectangleRenderer.value)==null||f.setDimensions(this.dimensions),(A=this._rectangleRenderer.value)==null||A.handleResize(),(y=this._glyphRenderer.value)==null||y.setDimensions(this.dimensions),(R=this._glyphRenderer.value)==null||R.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var n;for(const p of this._renderLayers)p.handleBlur(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.pause(),this._requestRedrawViewport()}handleFocus(){var n;for(const p of this._renderLayers)p.handleFocus(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.resume(),this._requestRedrawViewport()}handleSelectionChanged(n,p,f){for(const A of this._renderLayers)A.handleSelectionChanged(this._terminal,n,p,f);this._model.selection.update(this._core,n,p,f),this._requestRedrawViewport()}handleCursorMove(){var n;for(const p of this._renderLayers)p.handleCursorMove(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new M.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var p;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const n=(0,r.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==n&&(this._onChangeTextureAtlas.fire(n.pages[0].canvas),this._charAtlasDisposable.value=(0,t.getDisposeArrayDisposable)([(0,i.forwardEvent)(n.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,i.forwardEvent)(n.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=n,this._charAtlas.warmUp(),(p=this._glyphRenderer.value)==null||p.setAtlas(this._charAtlas)}_clearModel(n){var p;this._model.clear(),n&&((p=this._glyphRenderer.value)==null||p.clear())}clearTextureAtlas(){var n;(n=this._charAtlas)==null||n.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var n;this._clearModel(!0);for(const p of this._renderLayers)p.reset(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(n){return-1}deregisterCharacterJoiner(n){return!1}renderRows(n,p){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const f of this._renderLayers)f.handleGridChanged(this._terminal,n,p);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(n,p),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new _.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(n,p){const f=this._core;let A,y,R,b,S,E,O,B,W,I,Z,q,k,j,z=this._workCell;n=s(n,f.rows-1,0),p=s(p,f.rows-1,0);const Y=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,fe=Y-f.buffer.ydisp,ee=Math.min(this._terminal.buffer.active.cursorX,f.cols-1);let te=-1;const U=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ie=!1;for(y=n;y<=p;y++)for(R=y+f.buffer.ydisp,b=f.buffer.lines.get(R),this._model.lineLengths[y]=0,S=this._characterJoinerService.getJoinedCharacters(R),k=0;k<f.cols;k++)if(A=this._cellColorResolver.result.bg,b.loadCell(k,z),k===0&&(A=this._cellColorResolver.result.bg),E=!1,O=k,S.length>0&&k===S[0][0]&&(E=!0,B=S.shift(),z=new h(z,b.translateToString(!0,B[0],B[1]),B[1]-B[0]),O=B[1]-1),W=z.getChars(),I=z.getCode(),q=(y*f.cols+k)*a.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(z,k,R,this.dimensions.device.cell.width),U&&R===Y&&(k===ee&&(this._model.cursor={x:ee,y:fe,width:z.getWidth(),style:this._coreBrowserService.isFocused?f.options.cursorStyle||"block":f.options.cursorInactiveStyle,cursorWidth:f.options.cursorWidth,dpr:this._devicePixelRatio},te=ee+z.getWidth()-1),k>=ee&&k<=te&&(this._coreBrowserService.isFocused&&(f.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&f.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),I!==L.NULL_CELL_CODE&&(this._model.lineLengths[y]=k+1),(this._model.cells[q]!==I||this._model.cells[q+a.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[q+a.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[q+a.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ie=!0,W.length>1&&(I|=a.COMBINED_CHAR_BIT_MASK),this._model.cells[q]=I,this._model.cells[q+a.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[q+a.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[q+a.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Z=z.getWidth(),this._glyphRenderer.value.updateCell(k,y,I,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,W,Z,A),E))for(z=this._workCell,k++;k<O;k++)j=(y*f.cols+k)*a.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(k,y,L.NULL_CELL_CODE,0,0,0,L.NULL_CELL_CHAR,0,0),this._model.cells[j]=L.NULL_CELL_CODE,this._model.cells[j+a.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[j+a.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[j+a.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ie&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(n,p){this._canvas.width===n&&this._canvas.height===p||(this._canvas.width=n,this._canvas.height=p,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const n=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:n,end:n})}}e.WebglRenderer=u;class h extends g.AttributeData{constructor(n,p,f){super(),this.content=0,this.combinedData="",this.fg=n.fg,this.bg=n.bg,this.combinedData=p,this._width=f}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(n){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function s(v,n,p=0){return Math.max(Math.min(v,n),p)}e.JoinedCellData=h},381:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GLTexture=e.expandFloat32Array=e.createShader=e.createProgram=e.PROJECTION_MATRIX=void 0;const l=c(374);function o(r,_,m){const d=(0,l.throwIfFalsy)(r.createShader(_));if(r.shaderSource(d,m),r.compileShader(d),r.getShaderParameter(d,r.COMPILE_STATUS))return d;console.error(r.getShaderInfoLog(d)),r.deleteShader(d)}e.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),e.createProgram=function(r,_,m){const d=(0,l.throwIfFalsy)(r.createProgram());if(r.attachShader(d,(0,l.throwIfFalsy)(o(r,r.VERTEX_SHADER,_))),r.attachShader(d,(0,l.throwIfFalsy)(o(r,r.FRAGMENT_SHADER,m))),r.linkProgram(d),r.getProgramParameter(d,r.LINK_STATUS))return d;console.error(r.getProgramInfoLog(d)),r.deleteProgram(d)},e.createShader=o,e.expandFloat32Array=function(r,_){const m=Math.min(2*r.length,_),d=new Float32Array(m);for(let i=0;i<r.length;i++)d[i]=r[i];return d},e.GLTexture=class{constructor(r){this.texture=r,this.version=-1}}},592:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const l=c(627),o=c(237),r=c(374),_=c(859);class m extends _.Disposable{constructor(i,t,g,w,L,M,x,a){super(),this._container=t,this._alpha=L,this._coreBrowserService=M,this._optionsService=x,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${g}-layer`),this._canvas.style.zIndex=w.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((C=>{this._refreshCharAtlas(i,C),this.reset(i)}))),this.register((0,_.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,r.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(i){}handleFocus(i){}handleCursorMove(i){}handleGridChanged(i,t,g){}handleSelectionChanged(i,t,g,w=!1){}_setTransparency(i,t){if(t===this._alpha)return;const g=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(i,this._themeService.colors),this.handleGridChanged(i,0,i.rows-1)}_refreshCharAtlas(i,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,l.acquireTextureAtlas)(i,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(i,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(i,this._themeService.colors)}_fillBottomLineAtCells(i,t,g=1){this._ctx.fillRect(i*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,g*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(i,t,g,w){this._alpha?this._ctx.clearRect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,w*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,w*this._deviceCellHeight))}_fillCharTrueColor(i,t,g,w){this._ctx.font=this._getFont(i,!1,!1),this._ctx.textBaseline=o.TEXT_BASELINE,this._clipCell(g,w,t.getWidth()),this._ctx.fillText(t.getChars(),g*this._deviceCellWidth+this._deviceCharLeft,w*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(i,t,g){this._ctx.beginPath(),this._ctx.rect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(i,t,g){return`${g?"italic":""} ${t?i.options.fontWeightBold:i.options.fontWeight} ${i.options.fontSize*this._coreBrowserService.dpr}px ${i.options.fontFamily}`}}e.BaseRenderLayer=m},733:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const l=c(197),o=c(237),r=c(592);class _ extends r.BaseRenderLayer{constructor(d,i,t,g,w,L,M){super(t,d,"link",i,!0,w,L,M),this.register(g.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(g.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(d,i){super.resize(d,i),this._state=void 0}reset(d){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const d=this._state.y2-this._state.y1-1;d>0&&this._clearCells(0,this._state.y1+1,this._state.cols,d),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(d){if(d.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:d.fg!==void 0&&(0,l.is256Color)(d.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[d.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,d.y1===d.y2)this._fillBottomLineAtCells(d.x1,d.y1,d.x2-d.x1);else{this._fillBottomLineAtCells(d.x1,d.y1,d.cols-d.x1);for(let i=d.y1+1;i<d.y2;i++)this._fillBottomLineAtCells(0,i,d.cols);this._fillBottomLineAtCells(0,d.y2,d.x2)}this._state=d}_handleHideLinkUnderline(d){this._clearCurrentLink()}}e.LinkRenderLayer=_},820:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(c,l,o,r){c.addEventListener(l,o,r);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(l,o,r))}}}},274:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellColorResolver=void 0;const l=c(855),o=c(160),r=c(374);let _,m=0,d=0,i=!1,t=!1,g=!1,w=0;e.CellColorResolver=class{constructor(L,M,x,a,C,u){this._terminal=L,this._optionService=M,this._selectionRenderModel=x,this._decorationService=a,this._coreBrowserService=C,this._themeService=u,this.result={fg:0,bg:0,ext:0}}resolve(L,M,x,a){if(this.result.bg=L.bg,this.result.fg=L.fg,this.result.ext=268435456&L.bg?L.extended.ext:0,d=0,m=0,t=!1,i=!1,g=!1,_=this._themeService.colors,w=0,L.getCode()!==l.NULL_CELL_CODE&&L.extended.underlineStyle===4){const C=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));w=M*a%(2*Math.round(C))}if(this._decorationService.forEachDecorationAtCell(M,x,"bottom",(C=>{C.backgroundColorRGB&&(d=C.backgroundColorRGB.rgba>>8&16777215,t=!0),C.foregroundColorRGB&&(m=C.foregroundColorRGB.rgba>>8&16777215,i=!0)})),g=this._selectionRenderModel.isCellSelected(this._terminal,M,x),g){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:d=(16777215&this.result.fg)<<8|255;break;default:d=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:d=(16777215&this.result.bg)<<8|255}d=o.rgba.blend(d,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else d=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(t=!0,_.selectionForeground&&(m=_.selectionForeground.rgba>>8&16777215,i=!0),(0,r.treatGlyphAsBackgroundColor)(L.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)m=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:m=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:m=(16777215&this.result.fg)<<8|255;break;default:m=this._themeService.colors.foreground.rgba}m=o.rgba.blend(m,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}i=!0}}this._decorationService.forEachDecorationAtCell(M,x,"top",(C=>{C.backgroundColorRGB&&(d=C.backgroundColorRGB.rgba>>8&16777215,t=!0),C.foregroundColorRGB&&(m=C.foregroundColorRGB.rgba>>8&16777215,i=!0)})),t&&(d=g?-16777216&L.bg&-134217729|d|50331648:-16777216&L.bg|d|50331648),i&&(m=-16777216&L.fg&-67108865|m|50331648),67108864&this.result.fg&&(t&&!i&&(m=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&_.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,i=!0),!t&&i&&(d=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&_.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,t=!0)),_=void 0,this.result.bg=t?d:this.result.bg,this.result.fg=i?m:this.result.fg,this.result.ext&=536870911,this.result.ext|=w<<29&3758096384}}},627:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireTextureAtlas=void 0;const l=c(509),o=c(197),r=[];e.acquireTextureAtlas=function(_,m,d,i,t,g,w,L){const M=(0,o.generateConfig)(i,t,g,w,m,d,L);for(let C=0;C<r.length;C++){const u=r[C],h=u.ownedBy.indexOf(_);if(h>=0){if((0,o.configEquals)(u.config,M))return u.atlas;u.ownedBy.length===1?(u.atlas.dispose(),r.splice(C,1)):u.ownedBy.splice(h,1);break}}for(let C=0;C<r.length;C++){const u=r[C];if((0,o.configEquals)(u.config,M))return u.ownedBy.push(_),u.atlas}const x=_._core,a={atlas:new l.TextureAtlas(document,M,x.unicodeService),config:M,ownedBy:[_]};return r.push(a),a.atlas},e.removeTerminalFromCache=function(_){for(let m=0;m<r.length;m++){const d=r[m].ownedBy.indexOf(_);if(d!==-1){r[m].ownedBy.length===1?(r[m].atlas.dispose(),r.splice(m,1)):r[m].ownedBy.splice(d,1);break}}}},197:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const l=c(160);e.generateConfig=function(o,r,_,m,d,i,t){const g={foreground:i.foreground,background:i.background,cursor:l.NULL_COLOR,cursorAccent:l.NULL_COLOR,selectionForeground:l.NULL_COLOR,selectionBackgroundTransparent:l.NULL_COLOR,selectionBackgroundOpaque:l.NULL_COLOR,selectionInactiveBackgroundTransparent:l.NULL_COLOR,selectionInactiveBackgroundOpaque:l.NULL_COLOR,ansi:i.ansi.slice(),contrastCache:i.contrastCache,halfContrastCache:i.halfContrastCache};return{customGlyphs:d.customGlyphs,devicePixelRatio:t,letterSpacing:d.letterSpacing,lineHeight:d.lineHeight,deviceCellWidth:o,deviceCellHeight:r,deviceCharWidth:_,deviceCharHeight:m,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,drawBoldTextInBrightColors:d.drawBoldTextInBrightColors,minimumContrastRatio:d.minimumContrastRatio,colors:g}},e.configEquals=function(o,r){for(let _=0;_<o.colors.ansi.length;_++)if(o.colors.ansi[_].rgba!==r.colors.ansi[_].rgba)return!1;return o.devicePixelRatio===r.devicePixelRatio&&o.customGlyphs===r.customGlyphs&&o.lineHeight===r.lineHeight&&o.letterSpacing===r.letterSpacing&&o.fontFamily===r.fontFamily&&o.fontSize===r.fontSize&&o.fontWeight===r.fontWeight&&o.fontWeightBold===r.fontWeightBold&&o.allowTransparency===r.allowTransparency&&o.deviceCharWidth===r.deviceCharWidth&&o.deviceCharHeight===r.deviceCharHeight&&o.drawBoldTextInBrightColors===r.drawBoldTextInBrightColors&&o.minimumContrastRatio===r.minimumContrastRatio&&o.colors.foreground.rgba===r.colors.foreground.rgba&&o.colors.background.rgba===r.colors.background.rgba},e.is256Color=function(o){return(50331648&o)==16777216||(50331648&o)==33554432}},237:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const l=c(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorBlinkStateManager=void 0,e.CursorBlinkStateManager=class{constructor(c,l){this._renderCallback=c,this._coreBrowserService=l,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(c=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,l>0)return void this._restartInterval(l)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(l)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),c)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const l=c(374);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const o={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╒":{1:(i,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(i,t)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`},"╔":{1:(i,t)=>`M1,${.5-t} L${.5-i},${.5-t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"╕":{1:(i,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(i,t)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`},"╗":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5+i},${.5-t} L${.5+i},1`},"╘":{1:(i,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(i,t)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╚":{1:(i,t)=>`M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0 M1,${.5+t} L${.5-i},${.5+t} L${.5-i},0`},"╛":{1:(i,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(i,t)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`},"╝":{1:(i,t)=>`M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M0,${.5+t} L${.5+i},${.5+t} L${.5+i},0`},"╞":{1:(i,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`},"╠":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╡":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(i,t)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╣":{1:(i,t)=>`M${.5+i},0 L${.5+i},1 M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0`},"╤":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`},"╦":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"╧":{1:(i,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╩":{1:(i,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╪":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╬":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.tryDrawCustomChar=function(i,t,g,w,L,M,x,a){const C=e.blockElementDefinitions[t];if(C)return(function(v,n,p,f,A,y){for(let R=0;R<n.length;R++){const b=n[R],S=A/8,E=y/8;v.fillRect(p+b.x*S,f+b.y*E,b.w*S,b.h*E)}})(i,C,g,w,L,M),!0;const u=o[t];if(u)return(function(v,n,p,f,A,y){let R=r.get(n);R||(R=new Map,r.set(n,R));const b=v.fillStyle;if(typeof b!="string")throw new Error(`Unexpected fillStyle type "${b}"`);let S=R.get(b);if(!S){const E=n[0].length,O=n.length,B=v.canvas.ownerDocument.createElement("canvas");B.width=E,B.height=O;const W=(0,l.throwIfFalsy)(B.getContext("2d")),I=new ImageData(E,O);let Z,q,k,j;if(b.startsWith("#"))Z=parseInt(b.slice(1,3),16),q=parseInt(b.slice(3,5),16),k=parseInt(b.slice(5,7),16),j=b.length>7&&parseInt(b.slice(7,9),16)||1;else{if(!b.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${b}" when drawing pattern glyph`);[Z,q,k,j]=b.substring(5,b.length-1).split(",").map((z=>parseFloat(z)))}for(let z=0;z<O;z++)for(let Y=0;Y<E;Y++)I.data[4*(z*E+Y)]=Z,I.data[4*(z*E+Y)+1]=q,I.data[4*(z*E+Y)+2]=k,I.data[4*(z*E+Y)+3]=n[z][Y]*(255*j);W.putImageData(I,0,0),S=(0,l.throwIfFalsy)(v.createPattern(B,null)),R.set(b,S)}v.fillStyle=S,v.fillRect(p,f,A,y)})(i,u,g,w,L,M),!0;const h=e.boxDrawingDefinitions[t];if(h)return(function(v,n,p,f,A,y,R){v.strokeStyle=v.fillStyle;for(const[b,S]of Object.entries(n)){let E;v.beginPath(),v.lineWidth=R*Number.parseInt(b),E=typeof S=="function"?S(.15,.15/y*A):S;for(const O of E.split(" ")){const B=O[0],W=m[B];if(!W){console.error(`Could not find drawing instructions for "${B}"`);continue}const I=O.substring(1).split(",");I[0]&&I[1]&&W(v,d(I,A,y,p,f,!0,R))}v.stroke(),v.closePath()}})(i,h,g,w,L,M,a),!0;const s=e.powerlineDefinitions[t];return!!s&&((function(v,n,p,f,A,y,R,b){const S=new Path2D;S.rect(p,f,A,y),v.clip(S),v.beginPath();const E=R/12;v.lineWidth=b*E;for(const O of n.d.split(" ")){const B=O[0],W=m[B];if(!W){console.error(`Could not find drawing instructions for "${B}"`);continue}const I=O.substring(1).split(",");I[0]&&I[1]&&W(v,d(I,A,y,p,f,!1,b,(n.leftPadding??0)*(E/2),(n.rightPadding??0)*(E/2)))}n.type===1?(v.strokeStyle=v.fillStyle,v.stroke()):v.fill(),v.closePath()})(i,s,g,w,L,M,x,a),!0)};const r=new Map;function _(i,t,g=0){return Math.max(Math.min(i,t),g)}const m={C:(i,t)=>i.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(i,t)=>i.lineTo(t[0],t[1]),M:(i,t)=>i.moveTo(t[0],t[1])};function d(i,t,g,w,L,M,x,a=0,C=0){const u=i.map((h=>parseFloat(h)||parseInt(h)));if(u.length<2)throw new Error("Too few arguments for instruction");for(let h=0;h<u.length;h+=2)u[h]*=t-a*x-C*x,M&&u[h]!==0&&(u[h]=_(Math.round(u[h]+.5)-.5,t,0)),u[h]+=w+a*x;for(let h=1;h<u.length;h+=2)u[h]*=g,M&&u[h]!==0&&(u[h]=_(Math.round(u[h]+.5)-.5,g,0)),u[h]+=L;return u}},56:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const l=c(859);e.observeDevicePixelDimensions=function(o,r,_){let m=new r.ResizeObserver((d=>{const i=d.find((w=>w.target===o));if(!i)return;if(!("devicePixelContentBoxSize"in i))return m==null||m.disconnect(),void(m=void 0);const t=i.devicePixelContentBoxSize[0].inlineSize,g=i.devicePixelContentBoxSize[0].blockSize;t>0&&g>0&&_(t,g)}));try{m.observe(o,{box:["device-pixel-content-box"]})}catch{m.disconnect(),m=void 0}return(0,l.toDisposable)((()=>m==null?void 0:m.disconnect()))}},374:(D,e)=>{function c(o){return 57508<=o&&o<=57558}function l(o){return o>=128512&&o<=128591||o>=127744&&o<=128511||o>=128640&&o<=128767||o>=9728&&o<=9983||o>=9984&&o<=10175||o>=65024&&o<=65039||o>=129280&&o<=129535||o>=127462&&o<=127487}Object.defineProperty(e,"__esModule",{value:!0}),e.computeNextVariantOffset=e.createRenderDimensions=e.treatGlyphAsBackgroundColor=e.allowRescaling=e.isEmoji=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(o){if(!o)throw new Error("value must not be falsy");return o},e.isPowerlineGlyph=c,e.isRestrictedPowerlineGlyph=function(o){return 57520<=o&&o<=57527},e.isEmoji=l,e.allowRescaling=function(o,r,_,m){return r===1&&_>Math.ceil(1.5*m)&&o!==void 0&&o>255&&!l(o)&&!c(o)&&!(function(d){return 57344<=d&&d<=63743})(o)},e.treatGlyphAsBackgroundColor=function(o){return c(o)||(function(r){return 9472<=r&&r<=9631})(o)},e.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},e.computeNextVariantOffset=function(o,r,_=0){return(o-(2*Math.round(r)-_))%(2*Math.round(r))}},296:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(o,r,_,m=!1){if(this.selectionStart=r,this.selectionEnd=_,!r||!_||r[0]===_[0]&&r[1]===_[1])return void this.clear();const d=o.buffers.active.ydisp,i=r[1]-d,t=_[1]-d,g=Math.max(i,0),w=Math.min(t,o.rows-1);g>=o.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=i,this.viewportEndRow=t,this.viewportCappedStartRow=g,this.viewportCappedEndRow=w,this.startCol=r[0],this.endCol=_[0])}isCellSelected(o,r,_){return!!this.hasSelection&&(_-=o.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?r>=this.startCol&&_>=this.viewportCappedStartRow&&r<this.endCol&&_<=this.viewportCappedEndRow:r<this.startCol&&_>=this.viewportCappedStartRow&&r>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&r>=this.startCol&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&r>=this.startCol)}}e.createSelectionRenderModel=function(){return new c}},509:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextureAtlas=void 0;const l=c(237),o=c(860),r=c(374),_=c(160),m=c(345),d=c(485),i=c(385),t=c(147),g=c(855),w={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let L;class M{get pages(){return this._pages}constructor(h,s,v){this._document=h,this._config=s,this._unicodeService=v,this._didWarmUp=!1,this._cacheMap=new d.FourKeyMap,this._cacheMapCombined=new d.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new t.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new m.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new m.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=C(h,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,r.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const h of this.pages)h.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const h=new i.IdleTaskQueue;for(let s=33;s<126;s++)h.enqueue((()=>{if(!this._cacheMap.get(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT)){const v=this._drawToCache(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT);this._cacheMap.set(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT,v)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const h of this._pages)h.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(M.maxAtlasPages&&this._pages.length>=Math.max(4,M.maxAtlasPages)){const s=this._pages.filter((R=>2*R.canvas.width<=(M.maxTextureSize||4096))).sort(((R,b)=>b.canvas.width!==R.canvas.width?b.canvas.width-R.canvas.width:b.percentageUsed-R.percentageUsed));let v=-1,n=0;for(let R=0;R<s.length;R++)if(s[R].canvas.width!==n)v=R,n=s[R].canvas.width;else if(R-v==3)break;const p=s.slice(v,v+4),f=p.map((R=>R.glyphs[0].texturePage)).sort(((R,b)=>R>b?1:-1)),A=this.pages.length-p.length,y=this._mergePages(p,A);y.version++;for(let R=f.length-1;R>=0;R--)this._deletePage(f[R]);this.pages.push(y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(y.canvas)}const h=new x(this._document,this._textureSize);return this._pages.push(h),this._activePages.push(h),this._onAddTextureAtlasCanvas.fire(h.canvas),h}_mergePages(h,s){const v=2*h[0].canvas.width,n=new x(this._document,v,h);for(const[p,f]of h.entries()){const A=p*f.canvas.width%v,y=Math.floor(p/2)*f.canvas.height;n.ctx.drawImage(f.canvas,A,y);for(const b of f.glyphs)b.texturePage=s,b.sizeClipSpace.x=b.size.x/v,b.sizeClipSpace.y=b.size.y/v,b.texturePosition.x+=A,b.texturePosition.y+=y,b.texturePositionClipSpace.x=b.texturePosition.x/v,b.texturePositionClipSpace.y=b.texturePosition.y/v;this._onRemoveTextureAtlasCanvas.fire(f.canvas);const R=this._activePages.indexOf(f);R!==-1&&this._activePages.splice(R,1)}return n}_deletePage(h){this._pages.splice(h,1);for(let s=h;s<this._pages.length;s++){const v=this._pages[s];for(const n of v.glyphs)n.texturePage--;v.version++}}getRasterizedGlyphCombinedChar(h,s,v,n,p){return this._getFromCacheMap(this._cacheMapCombined,h,s,v,n,p)}getRasterizedGlyph(h,s,v,n,p){return this._getFromCacheMap(this._cacheMap,h,s,v,n,p)}_getFromCacheMap(h,s,v,n,p,f=!1){return L=h.get(s,v,n,p),L||(L=this._drawToCache(s,v,n,p,f),h.set(s,v,n,p,L)),L}_getColorFromAnsiIndex(h){if(h>=this._config.colors.ansi.length)throw new Error("No color found for idx "+h);return this._config.colors.ansi[h]}_getBackgroundColor(h,s,v,n){if(this._config.allowTransparency)return _.NULL_COLOR;let p;switch(h){case 16777216:case 33554432:p=this._getColorFromAnsiIndex(s);break;case 50331648:const f=t.AttributeData.toColorRGB(s);p=_.channels.toColor(f[0],f[1],f[2]);break;default:p=v?_.color.opaque(this._config.colors.foreground):this._config.colors.background}return p}_getForegroundColor(h,s,v,n,p,f,A,y,R,b){const S=this._getMinimumContrastColor(h,s,v,n,p,f,A,R,y,b);if(S)return S;let E;switch(p){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&R&&f<8&&(f+=8),E=this._getColorFromAnsiIndex(f);break;case 50331648:const O=t.AttributeData.toColorRGB(f);E=_.channels.toColor(O[0],O[1],O[2]);break;default:E=A?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(E=_.color.opaque(E)),y&&(E=_.color.multiplyOpacity(E,l.DIM_OPACITY)),E}_resolveBackgroundRgba(h,s,v){switch(h){case 16777216:case 33554432:return this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return v?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(h,s,v,n){switch(h){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&n&&s<8&&(s+=8),this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return v?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(h,s,v,n,p,f,A,y,R,b){if(this._config.minimumContrastRatio===1||b)return;const S=this._getContrastCache(R),E=S.getColor(h,n);if(E!==void 0)return E||void 0;const O=this._resolveBackgroundRgba(s,v,A),B=this._resolveForegroundRgba(p,f,A,y),W=_.rgba.ensureContrastRatio(O,B,this._config.minimumContrastRatio/(R?2:1));if(!W)return void S.setColor(h,n,null);const I=_.channels.toColor(W>>24&255,W>>16&255,W>>8&255);return S.setColor(h,n,I),I}_getContrastCache(h){return h?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(h,s,v,n,p=!1){const f=typeof h=="number"?String.fromCharCode(h):h,A=Math.min(this._config.deviceCellWidth*Math.max(f.length,2)+4,this._textureSize);this._tmpCanvas.width<A&&(this._tmpCanvas.width=A);const y=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<y&&(this._tmpCanvas.height=y),this._tmpCtx.save(),this._workAttributeData.fg=v,this._workAttributeData.bg=s,this._workAttributeData.extended.ext=n,this._workAttributeData.isInvisible())return w;const R=!!this._workAttributeData.isBold(),b=!!this._workAttributeData.isInverse(),S=!!this._workAttributeData.isDim(),E=!!this._workAttributeData.isItalic(),O=!!this._workAttributeData.isUnderline(),B=!!this._workAttributeData.isStrikethrough(),W=!!this._workAttributeData.isOverline();let I=this._workAttributeData.getFgColor(),Z=this._workAttributeData.getFgColorMode(),q=this._workAttributeData.getBgColor(),k=this._workAttributeData.getBgColorMode();if(b){const T=I;I=q,q=T;const N=Z;Z=k,k=N}const j=this._getBackgroundColor(k,q,b,S);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=j.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const z=R?this._config.fontWeightBold:this._config.fontWeight,Y=E?"italic":"";this._tmpCtx.font=`${Y} ${z} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=l.TEXT_BASELINE;const fe=f.length===1&&(0,r.isPowerlineGlyph)(f.charCodeAt(0)),ee=f.length===1&&(0,r.isRestrictedPowerlineGlyph)(f.charCodeAt(0)),te=this._getForegroundColor(s,k,q,v,Z,I,b,S,R,(0,r.treatGlyphAsBackgroundColor)(f.charCodeAt(0)));this._tmpCtx.fillStyle=te.css;const U=ee?0:4;let ie=!1;this._config.customGlyphs!==!1&&(ie=(0,o.tryDrawCustomChar)(this._tmpCtx,f,U,U,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ae,he=!fe;if(ae=typeof h=="number"?this._unicodeService.wcwidth(h):this._unicodeService.getStringCellWidth(h),O){this._tmpCtx.save();const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),N=T%2==1?.5:0;if(this._tmpCtx.lineWidth=T,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())he=!1,this._tmpCtx.strokeStyle=`rgb(${t.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{he=!1;let K=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&K<8&&(K+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(K).css}this._tmpCtx.beginPath();const J=U,G=Math.ceil(U+this._config.deviceCharHeight)-N-(p?2*T:0),le=G+T,ce=G+2*T;let se=this._workAttributeData.getUnderlineVariantOffset();for(let K=0;K<ae;K++){this._tmpCtx.save();const H=J+K*this._config.deviceCellWidth,X=J+(K+1)*this._config.deviceCellWidth,pe=H+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G),this._tmpCtx.moveTo(H,ce),this._tmpCtx.lineTo(X,ce);break;case 3:const _e=T<=1?ce:Math.ceil(U+this._config.deviceCharHeight-T/2)-N,ue=T<=1?G:Math.ceil(U+this._config.deviceCharHeight+T/2)-N,xe=new Path2D;xe.rect(H,G,this._config.deviceCellWidth,ce-G),this._tmpCtx.clip(xe),this._tmpCtx.moveTo(H-this._config.deviceCellWidth/2,le),this._tmpCtx.bezierCurveTo(H-this._config.deviceCellWidth/2,ue,H,ue,H,le),this._tmpCtx.bezierCurveTo(H,_e,pe,_e,pe,le),this._tmpCtx.bezierCurveTo(pe,ue,X,ue,X,le),this._tmpCtx.bezierCurveTo(X,_e,X+this._config.deviceCellWidth/2,_e,X+this._config.deviceCellWidth/2,le);break;case 4:const ge=se===0?0:se>=T?2*T-se:T-se;se>=T||ge===0?(this._tmpCtx.setLineDash([Math.round(T),Math.round(T)]),this._tmpCtx.moveTo(H+ge,G),this._tmpCtx.lineTo(X,G)):(this._tmpCtx.setLineDash([Math.round(T),Math.round(T)]),this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(H+ge,G),this._tmpCtx.moveTo(H+ge+T,G),this._tmpCtx.lineTo(X,G)),se=(0,r.computeNextVariantOffset)(X-H,T,se);break;case 5:const Re=.6,ye=.3,Ce=X-H,we=Math.floor(Re*Ce),be=Math.floor(ye*Ce),Ae=Ce-we-be;this._tmpCtx.setLineDash([we,be,Ae]),this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G);break;default:this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ie&&this._config.fontSize>=12&&!this._config.allowTransparency&&f!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const K=this._tmpCtx.measureText(f);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in K&&K.actualBoundingBoxDescent>0){this._tmpCtx.save();const H=new Path2D;H.rect(J,G-Math.ceil(T/2),this._config.deviceCellWidth*ae,ce-G+Math.ceil(T/2)),this._tmpCtx.clip(H),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=j.css,this._tmpCtx.strokeText(f,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(W){const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),N=T%2==1?.5:0;this._tmpCtx.lineWidth=T,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+N),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*ae,U+N),this._tmpCtx.stroke()}if(ie||this._tmpCtx.fillText(f,U,U+this._config.deviceCharHeight),f==="_"&&!this._config.allowTransparency){let T=a(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),j,te,he);if(T)for(let N=1;N<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=j.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(f,U,U+this._config.deviceCharHeight-N),T=a(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),j,te,he),T);N++);}if(B){const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),N=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=T,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-N),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*ae,U+Math.floor(this._config.deviceCharHeight/2)-N),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Le;if(Le=this._config.allowTransparency?(function(T){for(let N=0;N<T.data.length;N+=4)if(T.data[N+3]>0)return!1;return!0})(de):a(de,j,te,he),Le)return w;const $=this._findGlyphBoundingBox(de,this._workBoundingBox,A,ee,ie,U);let F,P;for(;;){if(this._activePages.length===0){const T=this._createNewPage();F=T,P=T.currentRow,P.height=$.size.y;break}F=this._activePages[this._activePages.length-1],P=F.currentRow;for(const T of this._activePages)$.size.y<=T.currentRow.height&&(F=T,P=T.currentRow);for(let T=this._activePages.length-1;T>=0;T--)for(const N of this._activePages[T].fixedRows)N.height<=P.height&&$.size.y<=N.height&&(F=this._activePages[T],P=N);if(P.y+$.size.y>=F.canvas.height||P.height>$.size.y+2){let T=!1;if(F.currentRow.y+F.currentRow.height+$.size.y>=F.canvas.height){let N;for(const J of this._activePages)if(J.currentRow.y+J.currentRow.height+$.size.y<J.canvas.height){N=J;break}if(N)F=N;else if(M.maxAtlasPages&&this._pages.length>=M.maxAtlasPages&&P.y+$.size.y<=F.canvas.height&&P.height>=$.size.y&&P.x+$.size.x<=F.canvas.width)T=!0;else{const J=this._createNewPage();F=J,P=J.currentRow,P.height=$.size.y,T=!0}}T||(F.currentRow.height>0&&F.fixedRows.push(F.currentRow),P={x:0,y:F.currentRow.y+F.currentRow.height,height:$.size.y},F.fixedRows.push(P),F.currentRow={x:0,y:P.y+P.height,height:0})}if(P.x+$.size.x<=F.canvas.width)break;P===F.currentRow?(P.x=0,P.y+=P.height,P.height=0):F.fixedRows.splice(F.fixedRows.indexOf(P),1)}return $.texturePage=this._pages.indexOf(F),$.texturePosition.x=P.x,$.texturePosition.y=P.y,$.texturePositionClipSpace.x=P.x/F.canvas.width,$.texturePositionClipSpace.y=P.y/F.canvas.height,$.sizeClipSpace.x/=F.canvas.width,$.sizeClipSpace.y/=F.canvas.height,P.height=Math.max(P.height,$.size.y),P.x+=$.size.x,F.ctx.putImageData(de,$.texturePosition.x-this._workBoundingBox.left,$.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,$.size.x,$.size.y),F.addGlyph($),F.version++,$}_findGlyphBoundingBox(h,s,v,n,p,f){s.top=0;const A=n?this._config.deviceCellHeight:this._tmpCanvas.height,y=n?this._config.deviceCellWidth:v;let R=!1;for(let b=0;b<A;b++){for(let S=0;S<y;S++){const E=b*this._tmpCanvas.width*4+4*S+3;if(h.data[E]!==0){s.top=b,R=!0;break}}if(R)break}s.left=0,R=!1;for(let b=0;b<f+y;b++){for(let S=0;S<A;S++){const E=S*this._tmpCanvas.width*4+4*b+3;if(h.data[E]!==0){s.left=b,R=!0;break}}if(R)break}s.right=y,R=!1;for(let b=f+y-1;b>=f;b--){for(let S=0;S<A;S++){const E=S*this._tmpCanvas.width*4+4*b+3;if(h.data[E]!==0){s.right=b,R=!0;break}}if(R)break}s.bottom=A,R=!1;for(let b=A-1;b>=0;b--){for(let S=0;S<y;S++){const E=b*this._tmpCanvas.width*4+4*S+3;if(h.data[E]!==0){s.bottom=b,R=!0;break}}if(R)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:s.right-s.left+1,y:s.bottom-s.top+1},sizeClipSpace:{x:s.right-s.left+1,y:s.bottom-s.top+1},offset:{x:-s.left+f+(n||p?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-s.top+f+(n||p?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}e.TextureAtlas=M;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(h){this._glyphs.push(h),this._usedPixels+=h.size.x*h.size.y}constructor(h,s,v){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],v)for(const n of v)this._glyphs.push(...n.glyphs),this._usedPixels+=n._usedPixels;this.canvas=C(h,s,s),this.ctx=(0,r.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function a(u,h,s,v){const n=h.rgba>>>24,p=h.rgba>>>16&255,f=h.rgba>>>8&255,A=s.rgba>>>24,y=s.rgba>>>16&255,R=s.rgba>>>8&255,b=Math.floor((Math.abs(n-A)+Math.abs(p-y)+Math.abs(f-R))/12);let S=!0;for(let E=0;E<u.data.length;E+=4)u.data[E]===n&&u.data[E+1]===p&&u.data[E+2]===f||v&&Math.abs(u.data[E]-n)+Math.abs(u.data[E+1]-p)+Math.abs(u.data[E+2]-f)<b?u.data[E+3]=0:S=!1;return S}function C(u,h,s){const v=u.createElement("canvas");return v.width=h,v.height=s,v}},160:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=e.NULL_COLOR=void 0;let c=0,l=0,o=0,r=0;var _,m,d,i,t;function g(L){const M=L.toString(16);return M.length<2?"0"+M:M}function w(L,M){return L<M?(M+.05)/(L+.05):(L+.05)/(M+.05)}e.NULL_COLOR={css:"#00000000",rgba:0},(function(L){L.toCss=function(M,x,a,C){return C!==void 0?`#${g(M)}${g(x)}${g(a)}${g(C)}`:`#${g(M)}${g(x)}${g(a)}`},L.toRgba=function(M,x,a,C=255){return(M<<24|x<<16|a<<8|C)>>>0},L.toColor=function(M,x,a,C){return{css:L.toCss(M,x,a,C),rgba:L.toRgba(M,x,a,C)}}})(_||(e.channels=_={})),(function(L){function M(x,a){return r=Math.round(255*a),[c,l,o]=t.toChannels(x.rgba),{css:_.toCss(c,l,o,r),rgba:_.toRgba(c,l,o,r)}}L.blend=function(x,a){if(r=(255&a.rgba)/255,r===1)return{css:a.css,rgba:a.rgba};const C=a.rgba>>24&255,u=a.rgba>>16&255,h=a.rgba>>8&255,s=x.rgba>>24&255,v=x.rgba>>16&255,n=x.rgba>>8&255;return c=s+Math.round((C-s)*r),l=v+Math.round((u-v)*r),o=n+Math.round((h-n)*r),{css:_.toCss(c,l,o),rgba:_.toRgba(c,l,o)}},L.isOpaque=function(x){return(255&x.rgba)==255},L.ensureContrastRatio=function(x,a,C){const u=t.ensureContrastRatio(x.rgba,a.rgba,C);if(u)return _.toColor(u>>24&255,u>>16&255,u>>8&255)},L.opaque=function(x){const a=(255|x.rgba)>>>0;return[c,l,o]=t.toChannels(a),{css:_.toCss(c,l,o),rgba:a}},L.opacity=M,L.multiplyOpacity=function(x,a){return r=255&x.rgba,M(x,r*a/255)},L.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(m||(e.color=m={})),(function(L){let M,x;try{const a=document.createElement("canvas");a.width=1,a.height=1;const C=a.getContext("2d",{willReadFrequently:!0});C&&(M=C,M.globalCompositeOperation="copy",x=M.createLinearGradient(0,0,1,1))}catch{}L.toColor=function(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return c=parseInt(a.slice(1,2).repeat(2),16),l=parseInt(a.slice(2,3).repeat(2),16),o=parseInt(a.slice(3,4).repeat(2),16),_.toColor(c,l,o);case 5:return c=parseInt(a.slice(1,2).repeat(2),16),l=parseInt(a.slice(2,3).repeat(2),16),o=parseInt(a.slice(3,4).repeat(2),16),r=parseInt(a.slice(4,5).repeat(2),16),_.toColor(c,l,o,r);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}const C=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return c=parseInt(C[1]),l=parseInt(C[2]),o=parseInt(C[3]),r=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),_.toColor(c,l,o,r);if(!M||!x)throw new Error("css.toColor: Unsupported css format");if(M.fillStyle=x,M.fillStyle=a,typeof M.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(M.fillRect(0,0,1,1),[c,l,o,r]=M.getImageData(0,0,1,1).data,r!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,l,o,r),css:a}}})(d||(e.css=d={})),(function(L){function M(x,a,C){const u=x/255,h=a/255,s=C/255;return .2126*(u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4))+.7152*(h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4))+.0722*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))}L.relativeLuminance=function(x){return M(x>>16&255,x>>8&255,255&x)},L.relativeLuminance2=M})(i||(e.rgb=i={})),(function(L){function M(a,C,u){const h=a>>24&255,s=a>>16&255,v=a>>8&255;let n=C>>24&255,p=C>>16&255,f=C>>8&255,A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));for(;A<u&&(n>0||p>0||f>0);)n-=Math.max(0,Math.ceil(.1*n)),p-=Math.max(0,Math.ceil(.1*p)),f-=Math.max(0,Math.ceil(.1*f)),A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));return(n<<24|p<<16|f<<8|255)>>>0}function x(a,C,u){const h=a>>24&255,s=a>>16&255,v=a>>8&255;let n=C>>24&255,p=C>>16&255,f=C>>8&255,A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));for(;A<u&&(n<255||p<255||f<255);)n=Math.min(255,n+Math.ceil(.1*(255-n))),p=Math.min(255,p+Math.ceil(.1*(255-p))),f=Math.min(255,f+Math.ceil(.1*(255-f))),A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));return(n<<24|p<<16|f<<8|255)>>>0}L.blend=function(a,C){if(r=(255&C)/255,r===1)return C;const u=C>>24&255,h=C>>16&255,s=C>>8&255,v=a>>24&255,n=a>>16&255,p=a>>8&255;return c=v+Math.round((u-v)*r),l=n+Math.round((h-n)*r),o=p+Math.round((s-p)*r),_.toRgba(c,l,o)},L.ensureContrastRatio=function(a,C,u){const h=i.relativeLuminance(a>>8),s=i.relativeLuminance(C>>8);if(w(h,s)<u){if(s<h){const p=M(a,C,u),f=w(h,i.relativeLuminance(p>>8));if(f<u){const A=x(a,C,u);return f>w(h,i.relativeLuminance(A>>8))?p:A}return p}const v=x(a,C,u),n=w(h,i.relativeLuminance(v>>8));if(n<u){const p=M(a,C,u);return n>w(h,i.relativeLuminance(p>>8))?v:p}return v}},L.reduceLuminance=M,L.increaseLuminance=x,L.toChannels=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}})(t||(e.rgba=t={})),e.toPaddedHex=g,e.contrastRatio=w},345:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.runAndSubscribe=e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let l=0;l<this._listeners.length;l++)if(this._listeners[l]===c)return void this._listeners.splice(l,1)}}})),this._event}fire(c,l){const o=[];for(let r=0;r<this._listeners.length;r++)o.push(this._listeners[r]);for(let r=0;r<o.length;r++)o[r].call(void 0,c,l)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},e.forwardEvent=function(c,l){return c((o=>l.fire(o)))},e.runAndSubscribe=function(c,l){return l(void 0),c((o=>l(o)))}},859:(D,e)=>{function c(l){for(const o of l)o.dispose();l.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.MutableDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const o=this._disposables.indexOf(l);o!==-1&&this._disposables.splice(o,1)}},e.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){var o;this._isDisposed||l===this._value||((o=this._value)==null||o.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,(l=this._value)==null||l.dispose(),this._value=void 0}},e.toDisposable=function(l){return{dispose:l}},e.disposeArray=c,e.getDisposeArrayDisposable=function(l){return{dispose:()=>c(l)}}},485:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(o,r,_){this._data[o]||(this._data[o]={}),this._data[o][r]=_}get(o,r){return this._data[o]?this._data[o][r]:void 0}clear(){this._data={}}}e.TwoKeyMap=c,e.FourKeyMap=class{constructor(){this._data=new c}set(l,o,r,_,m){this._data.get(l,o)||this._data.set(l,o,new c),this._data.get(l,o).set(r,_,m)}get(l,o,r,_){var m;return(m=this._data.get(l,o))==null?void 0:m.get(r,_)}clear(){this._data.clear()}}},399:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChromeOS=e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.getSafariVersion=e.isSafari=e.isLegacyEdge=e.isFirefox=e.isNode=void 0,e.isNode=typeof process<"u"&&"title"in process;const c=e.isNode?"node":navigator.userAgent,l=e.isNode?"node":navigator.platform;e.isFirefox=c.includes("Firefox"),e.isLegacyEdge=c.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(c),e.getSafariVersion=function(){if(!e.isSafari)return 0;const o=c.match(/Version\/(\d+)/);return o===null||o.length<2?0:parseInt(o[1])},e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),e.isIpad=l==="iPad",e.isIphone=l==="iPhone",e.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),e.isLinux=l.indexOf("Linux")>=0,e.isChromeOS=/\bCrOS\b/.test(c)},385:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DebouncedIdleTask=e.IdleTaskQueue=e.PriorityTaskQueue=void 0;const l=c(399);class o{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(m){this._idleCallback=void 0;let d=0,i=0,t=m.timeRemaining(),g=0;for(;this._i<this._tasks.length;){if(d=Date.now(),this._tasks[this._i]()||this._i++,d=Math.max(1,Date.now()-d),i=Math.max(d,i),g=m.timeRemaining(),1.5*i>g)return t-d<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(t-d))}ms`),void this._start();t=g}this.clear()}}class r extends o{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const d=Date.now()+m;return{timeRemaining:()=>Math.max(0,d-Date.now())}}}e.PriorityTaskQueue=r,e.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends o{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:r,e.DebouncedIdleTask=class{constructor(){this._queue=new e.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},147:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(r){return[r>>>16&255,r>>>8&255,255&r]}static fromColorRGB(r){return(255&r[0])<<16|(255&r[1])<<8|255&r[2]}clone(){const r=new c;return r.fg=this.fg,r.bg=this.bg,r.extended=this.extended.clone(),r}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}e.AttributeData=c;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(r){this._ext=r}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(r){this._ext&=-469762049,this._ext|=r<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(r){this._ext&=-67108864,this._ext|=67108863&r}get urlId(){return this._urlId}set urlId(r){this._urlId=r}get underlineVariantOffset(){const r=(3758096384&this._ext)>>29;return r<0?4294967288^r:r}set underlineVariantOffset(r){this._ext&=536870911,this._ext|=r<<29&3758096384}constructor(r=0,_=0){this._ext=0,this._urlId=0,this._ext=r,this._urlId=_}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}e.ExtendedAttrs=l},782:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const l=c(133),o=c(855),r=c(147);class _ extends r.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new r.ExtendedAttrs,this.combinedData=""}static fromCharData(d){const i=new _;return i.setFromCharData(d),i}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(d){this.fg=d[o.CHAR_DATA_ATTR_INDEX],this.bg=0;let i=!1;if(d[o.CHAR_DATA_CHAR_INDEX].length>2)i=!0;else if(d[o.CHAR_DATA_CHAR_INDEX].length===2){const t=d[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const g=d[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=g&&g<=57343?this.content=1024*(t-55296)+g-56320+65536|d[o.CHAR_DATA_WIDTH_INDEX]<<22:i=!0}else i=!0}else this.content=d[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[o.CHAR_DATA_WIDTH_INDEX]<<22;i&&(this.combinedData=d[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|d[o.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=_},855:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=0,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},e.utf32ToString=function(c,l=0,o=c.length){let r="";for(let _=l;_<o;++_){let m=c[_];m>65535?(m-=65536,r+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):r+=String.fromCharCode(m)}return r},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,l){const o=c.length;if(!o)return 0;let r=0,_=0;if(this._interim){const m=c.charCodeAt(_++);56320<=m&&m<=57343?l[r++]=1024*(this._interim-55296)+m-56320+65536:(l[r++]=this._interim,l[r++]=m),this._interim=0}for(let m=_;m<o;++m){const d=c.charCodeAt(m);if(55296<=d&&d<=56319){if(++m>=o)return this._interim=d,r;const i=c.charCodeAt(m);56320<=i&&i<=57343?l[r++]=1024*(d-55296)+i-56320+65536:(l[r++]=d,l[r++]=i)}else d!==65279&&(l[r++]=d)}return r}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,l){const o=c.length;if(!o)return 0;let r,_,m,d,i=0,t=0,g=0;if(this.interim[0]){let M=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let a,C=0;for(;(a=63&this.interim[++C])&&C<4;)x<<=6,x|=a;const u=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,h=u-C;for(;g<h;){if(g>=o)return 0;if(a=c[g++],(192&a)!=128){g--,M=!0;break}this.interim[C++]=a,x<<=6,x|=63&a}M||(u===2?x<128?g--:l[i++]=x:u===3?x<2048||x>=55296&&x<=57343||x===65279||(l[i++]=x):x<65536||x>1114111||(l[i++]=x)),this.interim.fill(0)}const w=o-4;let L=g;for(;L<o;){for(;!(!(L<w)||128&(r=c[L])||128&(_=c[L+1])||128&(m=c[L+2])||128&(d=c[L+3]));)l[i++]=r,l[i++]=_,l[i++]=m,l[i++]=d,L+=4;if(r=c[L++],r<128)l[i++]=r;else if((224&r)==192){if(L>=o)return this.interim[0]=r,i;if(_=c[L++],(192&_)!=128){L--;continue}if(t=(31&r)<<6|63&_,t<128){L--;continue}l[i++]=t}else if((240&r)==224){if(L>=o)return this.interim[0]=r,i;if(_=c[L++],(192&_)!=128){L--;continue}if(L>=o)return this.interim[0]=r,this.interim[1]=_,i;if(m=c[L++],(192&m)!=128){L--;continue}if(t=(15&r)<<12|(63&_)<<6|63&m,t<2048||t>=55296&&t<=57343||t===65279)continue;l[i++]=t}else if((248&r)==240){if(L>=o)return this.interim[0]=r,i;if(_=c[L++],(192&_)!=128){L--;continue}if(L>=o)return this.interim[0]=r,this.interim[1]=_,i;if(m=c[L++],(192&m)!=128){L--;continue}if(L>=o)return this.interim[0]=r,this.interim[1]=_,this.interim[2]=m,i;if(d=c[L++],(192&d)!=128){L--;continue}if(t=(7&r)<<18|(63&_)<<12|(63&m)<<6|63&d,t<65536||t>1114111)continue;l[i++]=t}}return i}}},776:function(D,e,c){var l=this&&this.__decorate||function(t,g,w,L){var M,x=arguments.length,a=x<3?g:L===null?L=Object.getOwnPropertyDescriptor(g,w):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,g,w,L);else for(var C=t.length-1;C>=0;C--)(M=t[C])&&(a=(x<3?M(a):x>3?M(g,w,a):M(g,w))||a);return x>3&&a&&Object.defineProperty(g,w,a),a},o=this&&this.__param||function(t,g){return function(w,L){g(w,L,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.traceCall=e.setTraceLogger=e.LogService=void 0;const r=c(859),_=c(97),m={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let d,i=e.LogService=class extends r.Disposable{get logLevel(){return this._logLevel}constructor(t){super(),this._optionsService=t,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),d=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let g=0;g<t.length;g++)typeof t[g]=="function"&&(t[g]=t[g]())}_log(t,g,w){this._evalLazyOptionalParams(w),t.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+g,...w)}trace(t,...g){var w;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.trace.bind(this._optionsService.options.logger))??console.log,t,g)}debug(t,...g){var w;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.debug.bind(this._optionsService.options.logger))??console.log,t,g)}info(t,...g){var w;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.info.bind(this._optionsService.options.logger))??console.info,t,g)}warn(t,...g){var w;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.warn.bind(this._optionsService.options.logger))??console.warn,t,g)}error(t,...g){var w;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.error.bind(this._optionsService.options.logger))??console.error,t,g)}};e.LogService=i=l([o(0,_.IOptionsService)],i),e.setTraceLogger=function(t){d=t},e.traceCall=function(t,g,w){if(typeof w.value!="function")throw new Error("not supported");const L=w.value;w.value=function(...M){if(d.logLevel!==_.LogLevelEnum.TRACE)return L.apply(this,M);d.trace(`GlyphRenderer#${L.name}(${M.map((a=>JSON.stringify(a))).join(", ")})`);const x=L.apply(this,M);return d.trace(`GlyphRenderer#${L.name} return`,x),x}}},726:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0;const c="di$target",l="di$dependencies";e.serviceRegistry=new Map,e.getServiceDependencies=function(o){return o[l]||[]},e.createDecorator=function(o){if(e.serviceRegistry.has(o))return e.serviceRegistry.get(o);const r=function(_,m,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(i,t,g){t[c]===t?t[l].push({id:i,index:g}):(t[l]=[{id:i,index:g}],t[c]=t)})(r,_,d)};return r.toString=()=>o,e.serviceRegistry.set(o,r),r}},97:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationService=e.IUnicodeService=e.IOscLinkService=e.IOptionsService=e.ILogService=e.LogLevelEnum=e.IInstantiationService=e.ICharsetService=e.ICoreService=e.ICoreMouseService=e.IBufferService=void 0;const l=c(726);var o;e.IBufferService=(0,l.createDecorator)("BufferService"),e.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),e.ICoreService=(0,l.createDecorator)("CoreService"),e.ICharsetService=(0,l.createDecorator)("CharsetService"),e.IInstantiationService=(0,l.createDecorator)("InstantiationService"),(function(r){r[r.TRACE=0]="TRACE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.OFF=5]="OFF"})(o||(e.LogLevelEnum=o={})),e.ILogService=(0,l.createDecorator)("LogService"),e.IOptionsService=(0,l.createDecorator)("OptionsService"),e.IOscLinkService=(0,l.createDecorator)("OscLinkService"),e.IUnicodeService=(0,l.createDecorator)("UnicodeService"),e.IDecorationService=(0,l.createDecorator)("DecorationService")}},Q={};function V(D){var e=Q[D];if(e!==void 0)return e.exports;var c=Q[D]={exports:{}};return re[D].call(c.exports,c,c.exports,V),c.exports}var oe={};return(()=>{var D=oe;Object.defineProperty(D,"__esModule",{value:!0}),D.WebglAddon=void 0;const e=V(345),c=V(859),l=V(399),o=V(666),r=V(776);class _ extends c.Disposable{constructor(d){if(l.isSafari&&(0,l.getSafariVersion)()<16){const i={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",i))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=d,this._onChangeTextureAtlas=this.register(new e.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new e.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new e.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new e.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(d){const i=d._core;if(!d.element)return void this.register(i.onWillOpen((()=>this.activate(d))));this._terminal=d;const t=i.coreService,g=i.optionsService,w=i,L=w._renderService,M=w._characterJoinerService,x=w._charSizeService,a=w._coreBrowserService,C=w._decorationService,u=w._logService,h=w._themeService;(0,r.setTraceLogger)(u),this._renderer=this.register(new o.WebglRenderer(d,M,x,a,t,C,g,h,this._preserveDrawingBuffer)),this.register((0,e.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,e.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,e.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,e.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),L.setRenderer(this._renderer),this.register((0,c.toDisposable)((()=>{const s=this._terminal._core._renderService;s.setRenderer(this._terminal._core._createRenderer()),s.handleResize(d.cols,d.rows)})))}get textureAtlas(){var d;return(d=this._renderer)==null?void 0:d.textureAtlas}clearTextureAtlas(){var d;(d=this._renderer)==null||d.clearTextureAtlas()}}D.WebglAddon=_})(),oe})()))})(me)),me.exports}var Te=Se();const De=Ee({__proto__:null},[Te]);export{De as a};
|